mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -07:00
Added latest version code and view. Need to finish the view #11
This commit is contained in:
parent
67ecbbf178
commit
33130589ae
20 changed files with 297 additions and 16 deletions
|
@ -100,6 +100,7 @@ namespace PlexRequests.UI.Modules
|
|||
|
||||
Get["/emailnotification"] = _ => EmailNotifications();
|
||||
Post["/emailnotification"] = _ => SaveEmailNotifications();
|
||||
Get["/status"] = _ => Status();
|
||||
}
|
||||
|
||||
private Negotiator Authentication()
|
||||
|
@ -272,5 +273,12 @@ namespace PlexRequests.UI.Modules
|
|||
Log.Info("Saved email settings, result: {0}", result);
|
||||
return Context.GetRedirect("~/admin/emailnotification");
|
||||
}
|
||||
|
||||
private Negotiator Status()
|
||||
{
|
||||
var checker = new StatusChecker();
|
||||
var status = checker.GetStatus();
|
||||
return View["Status", status];
|
||||
}
|
||||
}
|
||||
}
|
|
@ -300,6 +300,9 @@
|
|||
<Content Include="Views\Admin\EmailNotifications.cshtml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Views\Admin\Status.cshtml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>web.config</DependentUpon>
|
||||
</None>
|
||||
|
|
18
PlexRequests.UI/Views/Admin/Status.cshtml
Normal file
18
PlexRequests.UI/Views/Admin/Status.cshtml
Normal file
|
@ -0,0 +1,18 @@
|
|||
@Html.Partial("_Sidebar")
|
||||
|
||||
<div class="col-sm-8 col-sm-push-1">
|
||||
<fieldset>
|
||||
<legend>Status</legend>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="portNumber" class="control-label">Latest Version</label>
|
||||
|
||||
<div class="">
|
||||
<input type="text" class="form-control form-control-custom " id="portNumber" name="Port" placeholder="Port Number" value="@port">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</fieldset>
|
||||
</div>
|
|
@ -54,5 +54,14 @@
|
|||
{
|
||||
<a class="list-group-item" href="/admin/emailnotification">Email Notifications</a>
|
||||
}
|
||||
|
||||
@if (Context.Request.Path == "/admin/status")
|
||||
{
|
||||
<a class="list-group-item active" href="/admin/status">Status/a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a class="list-group-item" href="/admin/status">Status</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue