1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-11 15:52:25 -05:00

changed the player history to reflect correct timezone

added result count to find clients
only show unique aliases on profile page
some rcon socket changes
This commit is contained in:
RaidMax
2018-04-02 22:11:19 -05:00
parent 3e094b0b61
commit 071cab1ecf
7 changed files with 98 additions and 60 deletions

View File

@ -167,7 +167,7 @@ namespace IW4MAdmin
else if (e.GetType() == typeof(NetworkException))
{
Logger.WriteDebug(e.Message);
Logger.WriteDebug($"Internal Exception: {e.Data["internal_exception"]}");
//Logger.WriteDebug($"Internal Exception: {e.Data["internal_exception"]}");
}
// throw the exception to the main method to stop before instantly exiting

View File

@ -57,13 +57,16 @@ namespace WebfrontCore.Controllers
if (Authorized)
{
clientDto.Meta.AddRange(client.AliasLink.Children.Select(a => new ProfileMeta()
{
Key = "AliasEvent",
Value = $"Connected with name {a.Name}",
Sensitive = true,
When = a.DateAdded
}));
clientDto.Meta.AddRange(client.AliasLink.Children
.GroupBy(a => a.Name)
.Select(a => a.First())
.Select(a => new ProfileMeta()
{
Key = "AliasEvent",
Value = $"Connected with name {a.Name}",
Sensitive = true,
When = a.DateAdded
}));
}
clientDto.Meta.AddRange(Authorized ? meta : meta.Where(m => !m.Sensitive));
@ -89,6 +92,7 @@ namespace WebfrontCore.Controllers
.Where(a => a.Active)
.OrderByDescending(a => a.Level);
var adminsDict = new Dictionary<SharedLibrary.Objects.Player.Permission, IList<ClientInfo>>();
foreach (var admin in admins)
{
if (!adminsDict.ContainsKey(admin.Level))
@ -123,7 +127,7 @@ namespace WebfrontCore.Controllers
})
.ToList();
ViewBag.Title = $"Clients Matching \"{clientName}\"";
ViewBag.Title = $"{clientsDto.Count} Clients Matching \"{clientName}\"";
return View("Find/Index", clientsDto);
}
}

View File

@ -14,7 +14,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>65340d7d-5831-406c-acad-b13ba634bde2</ProjectGuid>
<publishUrl>D:\IW4M-Admin\Publish</publishUrl>
<DeleteExistingFiles>False</DeleteExistingFiles>
<DeleteExistingFiles>True</DeleteExistingFiles>
<TargetFramework>net452</TargetFramework>
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
</PropertyGroup>

View File

@ -19,6 +19,12 @@
<OutputPath>bin\x86\Debug\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Content Remove="bower.json" />
<Content Remove="bundleconfig.json" />
<Content Remove="compilerconfig.json" />
</ItemGroup>
<ItemGroup>
<None Update="wwwroot\**\*">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
@ -54,6 +60,12 @@
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.2.301" />
</ItemGroup>
<ItemGroup>
<None Include="bower.json" />
<None Include="bundleconfig.json" />
<None Include="compilerconfig.json" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SharedLibrary\SharedLibrary.csproj">
<Private>true</Private>

View File

@ -12,8 +12,8 @@
animationEnabled: true,
toolTip: {
contentFormatter: function (e) {
var date = new Date(e.entries[0].dataPoint.x);
return date.toLocaleTimeString('en-US', { timeZone: 'America/New_York', hour12: true }) + " - " + e.entries[0].dataPoint.y + " players";
const date = moment.utc(e.entries[0].dataPoint.x);
return date.local().format('h:mm A') + " - " + e.entries[0].dataPoint.y + " players";
}
},
axisX: {
@ -86,4 +86,4 @@ function refreshClientActivity() {
});
}
setInterval(refreshClientActivity, 2000);
setInterval(refreshClientActivity, 2000);