fix bug with loading top stats for individual servers

This commit is contained in:
RaidMax 2022-06-09 13:50:58 -05:00
parent 215037095f
commit 2ac9cc4379
2 changed files with 3 additions and 1 deletions

View File

@ -61,6 +61,7 @@ namespace IW4MAdmin.Plugins.Web.StatsWeb.Controllers
}
ViewBag.TotalRankedClients = await _serverDataViewer.RankedClientsCountAsync(matchedServerId, token);
ViewBag.ServerId = matchedServerId;
return View("~/Views/Client/Statistics/Index.cshtml", _manager.GetServers()
.Select(server => new ServerInfo

View File

@ -43,6 +43,7 @@
{
<environment include="Development">
<script type="text/javascript" src="~/js/stats.js"></script>
<script type="text/javascript" src="~/lib/canvas.js/canvasjs.js"></script>
</environment>
<script>initLoader('/Stats/GetTopPlayersAsync', '#topPlayersContainer', 25);</script>
<script>initLoader('/Stats/GetTopPlayersAsync', '#topPlayersContainer', 25, 25, [{ 'name': 'serverId', 'value' : () => @(ViewBag.ServerId ?? 0) }]);</script>
}