From e4153e0c2faf3b98401c76fbbd65e08396dad6ca Mon Sep 17 00:00:00 2001 From: RaidMax Date: Tue, 19 Oct 2021 21:33:21 -0500 Subject: [PATCH] post webfront url to master --- Application/API/Master/ApiInstance.cs | 8 +++++++- Application/Misc/MasterCommunication.cs | 3 ++- WebfrontCore/Views/Shared/_Layout.cshtml | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Application/API/Master/ApiInstance.cs b/Application/API/Master/ApiInstance.cs index f2f0332ca..01a98bafa 100644 --- a/Application/API/Master/ApiInstance.cs +++ b/Application/API/Master/ApiInstance.cs @@ -22,7 +22,7 @@ namespace IW4MAdmin.Application.API.Master public int Uptime { get; set; } /// - /// Specifices the version of the instance + /// Specifies the version of the instance /// [JsonProperty("version")] [JsonConverter(typeof(BuildNumberJsonConverter))] @@ -33,5 +33,11 @@ namespace IW4MAdmin.Application.API.Master /// [JsonProperty("servers")] public List Servers { get; set; } + + /// + /// Url IW4MAdmin is listening on + /// + [JsonProperty("webfront_url")] + public string WebfrontUrl { get; set; } } } diff --git a/Application/Misc/MasterCommunication.cs b/Application/Misc/MasterCommunication.cs index e94b80896..fcc21053e 100644 --- a/Application/Misc/MasterCommunication.cs +++ b/Application/Misc/MasterCommunication.cs @@ -179,7 +179,8 @@ namespace IW4MAdmin.Application.Misc Id = s.EndPoint, Port = (short)s.Port, IPAddress = s.IP - }).ToList() + }).ToList(), + WebfrontUrl = _appConfig.WebfrontUrl }; Response response = null; diff --git a/WebfrontCore/Views/Shared/_Layout.cshtml b/WebfrontCore/Views/Shared/_Layout.cshtml index 1a073ff08..1cfb2e51e 100644 --- a/WebfrontCore/Views/Shared/_Layout.cshtml +++ b/WebfrontCore/Views/Shared/_Layout.cshtml @@ -202,6 +202,6 @@ }); @await RenderSectionAsync("scripts", required: false) - @Html.Raw(ViewBag.ScriptInjection); + @Html.Raw(ViewBag.ScriptInjection) \ No newline at end of file