mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -07:00
Renamed folders
This commit is contained in:
parent
4ce66195d4
commit
d1827cd3be
117 changed files with 16 additions and 16 deletions
69
PlexRequests.UI/Views/Admin/CouchPotato.cshtml
Normal file
69
PlexRequests.UI/Views/Admin/CouchPotato.cshtml
Normal file
|
@ -0,0 +1,69 @@
|
|||
@Html.Partial("/Admin/_Sidebar")
|
||||
@{
|
||||
int port;
|
||||
if (Model.Port == 0)
|
||||
{
|
||||
port = 5050;
|
||||
}
|
||||
else
|
||||
{
|
||||
port = Model.Port;
|
||||
}
|
||||
}
|
||||
<div class="col-sm-8">
|
||||
<form class="form-horizontal" method="POST" id="mainForm">
|
||||
<fieldset>
|
||||
<legend>CouchPotato Settings</legend>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="Enabled" class="col-lg-2 control-label">Enable CouchPotato</label>
|
||||
<div class="col-lg-10 checkbox">
|
||||
<label>
|
||||
@if (Model.Enabled)
|
||||
{
|
||||
<input type="checkbox" id="Enabled" name="Enabled" checked="checked">
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="checkbox" id="Enabled" name="Enabled">
|
||||
}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="Ip" class="col-lg-2 control-label">CouchPotato Hostname or IP</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" id="Ip" name="Ip" placeholder="localhost" value="@Model.Ip">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="portNumber" class="col-lg-2 control-label">Port</label>
|
||||
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" id="portNumber" name="Port" placeholder="Port Number" value="@port">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="ApiKey" class="col-lg-2 control-label">CouchPotato API Key</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" id="ApiKey" name="ApiKey" value="@Model.ApiKey">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-lg-10 col-lg-offset-2">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
198
PlexRequests.UI/Views/Admin/Settings.cshtml
Normal file
198
PlexRequests.UI/Views/Admin/Settings.cshtml
Normal file
|
@ -0,0 +1,198 @@
|
|||
@Html.Partial("/Admin/_Sidebar")
|
||||
@{
|
||||
int port;
|
||||
var authToken = string.Empty;
|
||||
if (Model.Port == 0)
|
||||
{
|
||||
port = 3579;
|
||||
}
|
||||
else
|
||||
{
|
||||
port = Model.Port;
|
||||
}
|
||||
|
||||
}
|
||||
<div class="col-sm-8">
|
||||
<form class="form-horizontal" method="POST" action="/admin/couchpotato" id="mainForm">
|
||||
<fieldset>
|
||||
<legend>Request Plex Settings</legend>
|
||||
<div class="form-group">
|
||||
<label for="portNumber" class="col-lg-2 control-label">Port</label>
|
||||
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" id="portNumber" name="Port" placeholder="Port Number" value="@port">
|
||||
</div>
|
||||
</div>
|
||||
<small class="col-lg-10 col-lg-offset-2">You will have to restart after changing the port.</small>
|
||||
<div class="form-group">
|
||||
<label for="SearchForMovies" class="col-lg-2 control-label">Search for Movies</label>
|
||||
<div class="col-lg-10 checkbox">
|
||||
<label>
|
||||
@if (Model.SearchForMovies)
|
||||
{
|
||||
<input type="checkbox" id="SearchForMovies" name="SearchForMovies" checked="checked">
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="checkbox" id="SearchForMovies" name="SearchForMovies">
|
||||
}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="SearchForTvShows" class="col-lg-2 control-label">Search for TV Shows</label>
|
||||
<div class="col-lg-10 checkbox">
|
||||
<label>
|
||||
@if (Model.SearchForTvShows)
|
||||
{
|
||||
<input type="checkbox" id="SearchForTvShows" name="SearchForTvShows" checked="checked">
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="checkbox" id="SearchForTvShows" name="SearchForTvShows">
|
||||
}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="WeeklyRequestLimit" class="col-lg-2 control-label">Weekly Request Limit</label>
|
||||
<div class="col-lg-10 checkbox">
|
||||
<label>
|
||||
<input type="number" id="WeeklyRequestLimit" name="WeeklyRequestLimit" value="@Model.WeeklyRequestLimit">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="authToken" class="col-lg-2 control-label">Plex Authorization Token</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" id="authToken" name="PlexAuthToken" placeholder="Plex Auth Token" value="@Model.PlexAuthToken">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="username" class="col-lg-2 control-label">Username and Password</label>
|
||||
<div class="col-lg-4">
|
||||
<input type="text" class="form-control" id="username" name="Username" placeholder="Username">
|
||||
</div>
|
||||
<div class="col-lg-4 col-lg-push-1">
|
||||
<input type="password" class="form-control" id="password" name="Password" placeholder="Password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-10 col-lg-offset-2">
|
||||
<button id="requestToken" class="btn btn-primary">Request Token</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="userAuth" class="col-lg-2 control-label">Enable User Authentication</label>
|
||||
<div class="col-lg-4 checkbox">
|
||||
<label>
|
||||
@if (Model.UserAuthentication)
|
||||
{
|
||||
<input type="checkbox" id="userAuth" name="UserAuthentication" checked="checked">
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="checkbox" id="userAuth" name="UserAuthentication">
|
||||
}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<small class="col-lg-offset-2">Current users that are allowed to authenticate: </small>
|
||||
<br />
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<select id="users" multiple="" class="col-lg-10 col-lg-offset-2"></select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<br />
|
||||
<br />
|
||||
<div class="col-lg-10 col-lg-offset-2">
|
||||
<button id="refreshUsers" class="btn btn-primary">Refresh Users</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-10 col-lg-offset-2">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
if ($('#PlexAuthToken')) {
|
||||
loadUserList();
|
||||
}
|
||||
|
||||
$('#refreshUsers').click(function () {
|
||||
loadUserList();
|
||||
});
|
||||
|
||||
$('#requestToken').click(function (e) {
|
||||
e.preventDefault();
|
||||
var $form = $("#mainForm");
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
url: "admin/requestauth",
|
||||
data: $form.serialize(),
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
if (response.result === true) {
|
||||
generateNotify("Success!", "success");
|
||||
$('#authToken').val(response.authToken);
|
||||
} else {
|
||||
generateNotify(response.message, "warning");
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
function loadUserList() {
|
||||
$.ajax({
|
||||
type: "Get",
|
||||
url: "admin/getusers",
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if (response.length > 1) {
|
||||
response.each(function(user) {
|
||||
$('#users').append("<option>" + user + "</option>");
|
||||
});
|
||||
} else {
|
||||
$('#users').append("<option>No Users!</option>");
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
</script>
|
8
PlexRequests.UI/Views/Admin/_Sidebar.cshtml
Normal file
8
PlexRequests.UI/Views/Admin/_Sidebar.cshtml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<div class="col-lg-3 col-md-3 col-sm-4">
|
||||
<div class="list-group table-of-contents">
|
||||
<a class="list-group-item" href="/admin">Request Plex Settings</a>
|
||||
<a class="list-group-item" href="/admin/couchpotato">CouchPotato Settings</a>
|
||||
<a class="list-group-item" href="/admin/sonarr">Sonarr Settings</a>
|
||||
<a class="list-group-item" href="/admin/sickbeard">Sickbeard Settings</a>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue