From 55a5ad57ba1796f00aa0a68dc9bfcdd002f675be Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 4 Mar 2016 15:27:59 +0000 Subject: [PATCH] more logging to figure out why the we cannot access the admin module in a release build. --- PlexRequests.UI/Modules/AdminModule.cs | 13 +++++++++---- PlexRequests.UI/Startup.cs | 2 ++ PlexRequests.UI/Views/Admin/Settings.cshtml | 1 - 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/PlexRequests.UI/Modules/AdminModule.cs b/PlexRequests.UI/Modules/AdminModule.cs index a69c996d0..60c79ee5f 100644 --- a/PlexRequests.UI/Modules/AdminModule.cs +++ b/PlexRequests.UI/Modules/AdminModule.cs @@ -33,9 +33,12 @@ using Nancy.ModelBinding; using Nancy.Responses.Negotiation; using Nancy.Security; +using NLog; + using PlexRequests.Api; using PlexRequests.Core; using PlexRequests.Core.SettingModels; +using PlexRequests.Helpers; using PlexRequests.UI.Models; namespace PlexRequests.UI.Modules @@ -45,6 +48,8 @@ namespace PlexRequests.UI.Modules private ISettingsService RpService { get; set; } private ISettingsService CpService { get; set; } private ISettingsService AuthService { get; set; } + + private static Logger Log = LogManager.GetCurrentClassLogger(); public AdminModule(ISettingsService rpService, ISettingsService cpService, ISettingsService auth) : base("admin") { RpService = rpService; @@ -89,11 +94,11 @@ namespace PlexRequests.UI.Modules private Negotiator Admin() { - dynamic model = new ExpandoObject(); var settings = RpService.GetSettings(); - - model = settings; - return View["/Settings", model]; + Log.Trace("Getting Settings:"); + Log.Trace(settings.DumpJson()); + + return View["/Settings", settings]; } private Response SaveAdmin() diff --git a/PlexRequests.UI/Startup.cs b/PlexRequests.UI/Startup.cs index ca4b5fa89..3c1cda5ad 100644 --- a/PlexRequests.UI/Startup.cs +++ b/PlexRequests.UI/Startup.cs @@ -45,5 +45,7 @@ namespace PlexRequests.UI } } + + } } diff --git a/PlexRequests.UI/Views/Admin/Settings.cshtml b/PlexRequests.UI/Views/Admin/Settings.cshtml index d5f4a1b70..3bb514d5e 100644 --- a/PlexRequests.UI/Views/Admin/Settings.cshtml +++ b/PlexRequests.UI/Views/Admin/Settings.cshtml @@ -1,7 +1,6 @@ @Html.Partial("/Admin/_Sidebar") @{ int port; - var authToken = string.Empty; if (Model.Port == 0) { port = 3579;