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

huge commit for webfront facelift

This commit is contained in:
RaidMax
2022-04-19 18:43:58 -05:00
parent 7b78e0803a
commit d5b4c60e5a
105 changed files with 2981 additions and 2545 deletions

View File

@ -24,20 +24,22 @@ namespace LiveRadar.Web.Controllers
[HttpGet]
[Route("Radar/{serverId}")]
public IActionResult Index(long? serverId = null)
public IActionResult Index(string serverId = null)
{
ViewBag.IsFluid = true;
ViewBag.Title = Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_RADAR_TITLE"];
ViewBag.ActiveServerId = serverId ?? _manager.GetServers().FirstOrDefault()?.EndPoint;
ViewBag.Servers = _manager.GetServers()
.Where(_server => _server.GameName == Server.Game.IW4)
.Select(_server => new ServerInfo()
var servers = _manager.GetServers()
.Where(server => server.GameName == Server.Game.IW4)
.Select(server => new ServerInfo
{
Name = _server.Hostname,
ID = _server.EndPoint
Name = server.Hostname,
IPAddress = server.IP,
Port = server.Port
});
ViewBag.Title = Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_RADAR_TITLE"];
ViewBag.SelectedServerId = string.IsNullOrEmpty(serverId) ? servers.FirstOrDefault()?.Endpoint : serverId;
return View();
// ReSharper disable once Mvc.ViewNotResolved
return View("~/Views/Plugins/LiveRadar/Radar/Index.cshtml", servers);
}
[HttpGet]