From 7081eac5bb86f4c0ec93027b6020dfe017573aac Mon Sep 17 00:00:00 2001 From: "Jamie.Rees" Date: Thu, 29 Dec 2016 15:27:21 +0000 Subject: [PATCH] #399 and #398 finished --- Ombi.UI/Models/AboutAdminViewModel.cs | 2 + Ombi.UI/Modules/Admin/AboutModule.cs | 10 +- Ombi.UI/Views/About/About.cshtml | 137 ++++++++++++++++++++------ 3 files changed, 120 insertions(+), 29 deletions(-) diff --git a/Ombi.UI/Models/AboutAdminViewModel.cs b/Ombi.UI/Models/AboutAdminViewModel.cs index b173cea2a..9417d8a20 100644 --- a/Ombi.UI/Models/AboutAdminViewModel.cs +++ b/Ombi.UI/Models/AboutAdminViewModel.cs @@ -34,5 +34,7 @@ namespace Ombi.UI.Models public string Branch { get; set; } public string LogLevel { get; set; } public bool OAuthEnabled { get; set; } + public string DbLocation { get; set; } + public string RunningDir { get; set; } } } \ No newline at end of file diff --git a/Ombi.UI/Modules/Admin/AboutModule.cs b/Ombi.UI/Modules/Admin/AboutModule.cs index 714390365..120f01246 100644 --- a/Ombi.UI/Modules/Admin/AboutModule.cs +++ b/Ombi.UI/Modules/Admin/AboutModule.cs @@ -40,6 +40,7 @@ using Ombi.Core; using Ombi.Core.SettingModels; using Ombi.Helpers; using Ombi.Helpers.Permissions; +using Ombi.Store; using Ombi.UI.Models; using ISecurityExtensions = Ombi.Core.ISecurityExtensions; @@ -49,13 +50,14 @@ namespace Ombi.UI.Modules.Admin { public AboutModule(ISettingsService settingsService, ISettingsService systemService, ISecurityExtensions security, - IStatusChecker statusChecker, IResourceLinker linker) : base("admin", settingsService, security) + IStatusChecker statusChecker, IResourceLinker linker, ISqliteConfiguration config) : base("admin", settingsService, security) { Before += (ctx) => Security.AdminLoginRedirect(Permissions.Administrator, ctx); SettingsService = systemService; StatusChecker = statusChecker; Linker = linker; + SqlConfig = config; Get["AboutPage","/about", true] = async (x,ct) => await Index(); Post["/about", true] = async (x,ct) => await ReportIssue(); @@ -67,6 +69,7 @@ namespace Ombi.UI.Modules.Admin private ISettingsService SettingsService { get; } private IStatusChecker StatusChecker { get; } private IResourceLinker Linker { get; } + private ISqliteConfiguration SqlConfig { get; } private async Task Index() @@ -105,6 +108,9 @@ namespace Ombi.UI.Modules.Admin vm.SystemVersion = Environment.Version.ToString(); } + vm.RunningDir = Environment.CurrentDirectory; + vm.DbLocation = SqlConfig.CurrentPath; + vm.ApplicationVersion = AssemblyHelper.GetFileVersion(); vm.Branch = EnumHelper.GetDisplayValue(systemSettings.Branch); vm.LogLevel = LogManager.Configuration.LoggingRules.FirstOrDefault(x => x.NameMatches("database"))?.Levels?.FirstOrDefault()?.Name ?? "Unknown"; @@ -173,6 +179,8 @@ namespace Ombi.UI.Modules.Admin sb.AppendLine(model.Branch); sb.AppendLine("#### Operating System:"); sb.AppendLine(model.Os); + sb.AppendLine("#### Log Level:"); + sb.AppendLine(model.LogLevel); sb.AppendLine(body); return sb.ToString(); diff --git a/Ombi.UI/Views/About/About.cshtml b/Ombi.UI/Views/About/About.cshtml index 6256c6331..18a5aeb40 100644 --- a/Ombi.UI/Views/About/About.cshtml +++ b/Ombi.UI/Views/About/About.cshtml @@ -6,34 +6,114 @@
About - - -
- - -
- -
- - -
- -
- - -
- -
- - -
-
- - -
- +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Application Version: + + @Model.ApplicationVersion +
+ OS: + + @Model.Os +
+ System Version: + + @Model.SystemVersion +
+ Branch: + + @Model.Branch +
+ Log Level: + + @Model.LogLevel +
+ Database Location: + + @Model.DbLocation +
+ Running Directory: + + @Model.RunningDir +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Github + + https://github.com/tidusjar/Ombi +
+ Wiki + + https://github.com/tidusjar/Ombi/wiki +
+ Issues + + https://github.com/tidusjar/Ombi/issues +
+ Chat + + https://gitter.im/tidusjar/Ombi +
+ Feature Requests + + https://feathub.com/tidusjar/Ombi +
+
@if (Model.OAuthEnabled) - { + {
@@ -45,10 +125,11 @@ {
- +
} +