pull/860/head
Jamie.Rees 8 years ago
parent 8a288db2b0
commit 7081eac5bb

@ -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; }
}
}

@ -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<PlexRequestSettings> settingsService,
ISettingsService<SystemSettings> 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<SystemSettings> SettingsService { get; }
private IStatusChecker StatusChecker { get; }
private IResourceLinker Linker { get; }
private ISqliteConfiguration SqlConfig { get; }
private async Task<Negotiator> 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<Branches>.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();

@ -6,34 +6,114 @@
<div class="col-sm-8 col-sm-push-1">
<fieldset>
<legend>About</legend>
<div class="form-group">
<label>Application Version: </label>
<label>@Model.ApplicationVersion</label>
</div>
<div class="form-group">
<label class="control-label">OS: </label>
<label class="control-label">@Model.Os</label>
</div>
<div class="form-group">
<label class="control-label">System Version: </label>
<label class="control-label">@Model.SystemVersion</label>
</div>
<div class="form-group">
<label class="control-label">Branch: </label>
<label class="control-label">@Model.Branch</label>
</div>
<div class="form-group">
<label class="control-label">Log Level: </label>
<label class="control-label">@Model.LogLevel</label>
</div>
<hr />
<table class="table table-condensed">
<tr>
<td>
Application Version:
</td>
<td>
@Model.ApplicationVersion
</td>
</tr>
<tr>
<td>
OS:
</td>
<td>
@Model.Os
</td>
</tr>
<tr>
<td>
System Version:
</td>
<td>
@Model.SystemVersion
</td>
</tr>
<tr>
<td>
Branch:
</td>
<td>
@Model.Branch
</td>
</tr>
<tr>
<td>
Log Level:
</td>
<td>
@Model.LogLevel
</td>
</tr>
<tr>
<td>
Database Location:
</td>
<td>
@Model.DbLocation
</td>
</tr>
<tr>
<td>
Running Directory:
</td>
<td>
@Model.RunningDir
</td>
</tr>
</table>
<hr />
<table class="table table-condensed">
<tr>
<td>
Github
</td>
<td>
<a href="https://github.com/tidusjar/Ombi" target="_blank">https://github.com/tidusjar/Ombi</a>
</td>
</tr>
<tr>
<td>
Wiki
</td>
<td>
<a href="https://github.com/tidusjar/Ombi/wiki" target="_blank">https://github.com/tidusjar/Ombi/wiki</a>
</td>
</tr>
<tr>
<td>
Issues
</td>
<td>
<a href="https://github.com/tidusjar/Ombi/issues" target="_blank">https://github.com/tidusjar/Ombi/issues</a>
</td>
</tr>
<tr>
<td>
Chat
</td>
<td>
<a href="https://gitter.im/tidusjar/Ombi" target="_blank">https://gitter.im/tidusjar/Ombi</a>
</td>
</tr>
<tr>
<td>
Feature Requests
</td>
<td>
<a href="https://feathub.com/tidusjar/Ombi" target="_blank">https://feathub.com/tidusjar/Ombi</a>
</td>
</tr>
</table>
<hr />
@if (Model.OAuthEnabled)
{
{
<div class="form-group">
<div>
<button id="save" type="submit" class="btn btn-danger-outline">Report a bug</button>
@ -45,10 +125,11 @@
{
<div class="form-group">
<div>
<button id="oAuth" type="submit" class="btn btn-primary-outline">Log in via Github</button>
<button id="oAuth" type="submit" class="btn btn-primary-outline">Log in via Github to Report an Issue</button>
</div>
</div>
}
</fieldset>
</div>

Loading…
Cancel
Save