ui tweaks/improvements including recent players and ip info lookup
This commit is contained in:
@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Commands;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using WebfrontCore.Permissions;
|
||||
using WebfrontCore.ViewModels;
|
||||
@ -317,17 +318,21 @@ namespace WebfrontCore.Controllers
|
||||
public async Task<IActionResult> RecentClientsForm()
|
||||
{
|
||||
var clients = await Manager.GetClientService().GetRecentClients();
|
||||
foreach (var client in clients)
|
||||
{
|
||||
client.IPAddress =
|
||||
_appConfig.HasPermission(Client.Level, WebfrontEntity.ClientIPAddress, WebfrontPermission.Read)
|
||||
? client.IPAddress
|
||||
: null;
|
||||
}
|
||||
|
||||
return View("~/Views/Shared/Components/Client/_RecentClients.cshtml", clients);
|
||||
}
|
||||
|
||||
public IActionResult RecentReportsForm()
|
||||
{
|
||||
var serverInfo = Manager.GetServers().Select(server =>
|
||||
new ServerInfo
|
||||
{
|
||||
Name = server.Hostname,
|
||||
Reports = server.Reports
|
||||
});
|
||||
|
||||
return View("Partials/_Reports", serverInfo);
|
||||
}
|
||||
|
||||
public IActionResult FlagForm()
|
||||
{
|
||||
var info = new ActionInfo
|
||||
|
@ -176,11 +176,12 @@ namespace WebfrontCore.Controllers
|
||||
adminsDict.Add(admin.Level, new List<ClientInfo>());
|
||||
}
|
||||
|
||||
adminsDict[admin.Level].Add(new ClientInfo()
|
||||
adminsDict[admin.Level].Add(new ClientInfo
|
||||
{
|
||||
Name = admin.Name,
|
||||
ClientId = admin.ClientId,
|
||||
LastConnection = admin.LastConnection
|
||||
LastConnection = admin.LastConnection,
|
||||
IsMasked = admin.Masked
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user