mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-08 22:28:15 -05:00
fix source issue on home page
This commit is contained in:
parent
3b13ad2b4f
commit
1e19966ff2
@ -41,7 +41,8 @@ namespace WebfrontCore.ViewComponents
|
|||||||
.FirstOrDefault(history => history.ServerId == serverId) ??
|
.FirstOrDefault(history => history.ServerId == serverId) ??
|
||||||
new ClientHistoryInfo
|
new ClientHistoryInfo
|
||||||
{
|
{
|
||||||
ServerId = serverId
|
ServerId = serverId,
|
||||||
|
ClientCounts = new List<ClientCountSnapshot>()
|
||||||
};
|
};
|
||||||
|
|
||||||
var counts = clientHistory.ClientCounts?.AsEnumerable() ?? Enumerable.Empty<ClientCountSnapshot>();
|
var counts = clientHistory.ClientCounts?.AsEnumerable() ?? Enumerable.Empty<ClientCountSnapshot>();
|
||||||
@ -50,7 +51,7 @@ namespace WebfrontCore.ViewComponents
|
|||||||
{
|
{
|
||||||
counts = counts.Union(server.ClientHistory
|
counts = counts.Union(server.ClientHistory
|
||||||
.Select(history => history.ToClientCountSnapshot()).Where(history =>
|
.Select(history => history.ToClientCountSnapshot()).Where(history =>
|
||||||
history.Time > (clientHistory.ClientCounts.LastOrDefault()?.Time ?? DateTime.MinValue)));
|
history.Time > (clientHistory.ClientCounts?.LastOrDefault()?.Time ?? DateTime.MinValue)));
|
||||||
}
|
}
|
||||||
|
|
||||||
serverInfo.Add(new ServerInfo()
|
serverInfo.Add(new ServerInfo()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user