diff --git a/Ombi.Services/Interfaces/IAvailabilityChecker.cs b/Ombi.Services/Interfaces/IAvailabilityChecker.cs index 1e4f66af4..f2915faa0 100644 --- a/Ombi.Services/Interfaces/IAvailabilityChecker.cs +++ b/Ombi.Services/Interfaces/IAvailabilityChecker.cs @@ -34,6 +34,7 @@ namespace Ombi.Services.Interfaces { public interface IAvailabilityChecker { + void Start(); void CheckAndUpdateAll(); IEnumerable GetPlexMovies(IEnumerable content); bool IsMovieAvailable(PlexContent[] plexMovies, string title, string year, string providerId = null); diff --git a/Ombi.Services/Jobs/IPlexContentCacher.cs b/Ombi.Services/Interfaces/IPlexContentCacher.cs similarity index 100% rename from Ombi.Services/Jobs/IPlexContentCacher.cs rename to Ombi.Services/Interfaces/IPlexContentCacher.cs diff --git a/Ombi.Services/Jobs/IRecentlyAdded.cs b/Ombi.Services/Interfaces/IRecentlyAdded.cs similarity index 88% rename from Ombi.Services/Jobs/IRecentlyAdded.cs rename to Ombi.Services/Interfaces/IRecentlyAdded.cs index 4aa279b9a..09a7220f5 100644 --- a/Ombi.Services/Jobs/IRecentlyAdded.cs +++ b/Ombi.Services/Interfaces/IRecentlyAdded.cs @@ -6,5 +6,6 @@ namespace Ombi.Services.Jobs { void Execute(IJobExecutionContext context); void Test(); + void Start(); } } \ No newline at end of file diff --git a/Ombi.Services/Interfaces/IStoreBackup.cs b/Ombi.Services/Interfaces/IStoreBackup.cs new file mode 100644 index 000000000..0673dc0ab --- /dev/null +++ b/Ombi.Services/Interfaces/IStoreBackup.cs @@ -0,0 +1,10 @@ +using Quartz; + +namespace Ombi.Services.Jobs +{ + public interface IStoreBackup + { + void Start(); + void Execute(IJobExecutionContext context); + } +} \ No newline at end of file diff --git a/Ombi.Services/Interfaces/IStoreCleanup.cs b/Ombi.Services/Interfaces/IStoreCleanup.cs new file mode 100644 index 000000000..7313bf8ce --- /dev/null +++ b/Ombi.Services/Interfaces/IStoreCleanup.cs @@ -0,0 +1,10 @@ +using Quartz; + +namespace Ombi.Services.Jobs +{ + public interface IStoreCleanup + { + void Execute(IJobExecutionContext context); + void Start(); + } +} \ No newline at end of file diff --git a/Ombi.Services/Interfaces/IUserRequestLimitResetter.cs b/Ombi.Services/Interfaces/IUserRequestLimitResetter.cs new file mode 100644 index 000000000..9fd72f401 --- /dev/null +++ b/Ombi.Services/Interfaces/IUserRequestLimitResetter.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; +using Ombi.Core.SettingModels; +using Ombi.Store.Models; +using Quartz; + +namespace Ombi.Services.Jobs +{ + public interface IUserRequestLimitResetter + { + void AlbumLimit(PlexRequestSettings s, IEnumerable allUsers); + void Execute(IJobExecutionContext context); + void MovieLimit(PlexRequestSettings s, IEnumerable allUsers); + void Start(); + void TvLimit(PlexRequestSettings s, IEnumerable allUsers); + } +} \ No newline at end of file diff --git a/Ombi.Services/Jobs/FaultQueueHandler.cs b/Ombi.Services/Jobs/FaultQueueHandler.cs index 09c311225..6d18efa2a 100644 --- a/Ombi.Services/Jobs/FaultQueueHandler.cs +++ b/Ombi.Services/Jobs/FaultQueueHandler.cs @@ -45,7 +45,7 @@ using Quartz; namespace Ombi.Services.Jobs { - public class FaultQueueHandler : IJob + public class FaultQueueHandler : IJob, IFaultQueueHandler { private static readonly Logger Log = LogManager.GetCurrentClassLogger(); @@ -91,9 +91,8 @@ namespace Ombi.Services.Jobs private ISettingsService HeadphoneSettings { get; } private ISecurityExtensions Security { get; } - public void Execute(IJobExecutionContext context) + public void Start() { - Record.SetRunning(true, JobNames.CpCacher); try { @@ -116,6 +115,11 @@ namespace Ombi.Services.Jobs Record.SetRunning(false, JobNames.CpCacher); } } + public void Execute(IJobExecutionContext context) + { + + Start(); + } private void ProcessMissingInformation(List requests) diff --git a/Ombi.Services/Jobs/IFaultQueueHandler.cs b/Ombi.Services/Jobs/IFaultQueueHandler.cs new file mode 100644 index 000000000..18f51a47f --- /dev/null +++ b/Ombi.Services/Jobs/IFaultQueueHandler.cs @@ -0,0 +1,14 @@ +using System.Collections.Generic; +using Ombi.Core.SettingModels; +using Ombi.Store; +using Quartz; + +namespace Ombi.Services.Jobs +{ + public interface IFaultQueueHandler + { + void Execute(IJobExecutionContext context); + bool ShouldAutoApprove(RequestType requestType, PlexRequestSettings prSettings, List username); + void Start(); + } +} \ No newline at end of file diff --git a/Ombi.Services/Jobs/IPlexEpisodeCacher.cs b/Ombi.Services/Jobs/IPlexEpisodeCacher.cs new file mode 100644 index 000000000..fc13d285b --- /dev/null +++ b/Ombi.Services/Jobs/IPlexEpisodeCacher.cs @@ -0,0 +1,12 @@ +using Ombi.Core.SettingModels; +using Quartz; + +namespace Ombi.Services.Jobs +{ + public interface IPlexEpisodeCacher + { + void CacheEpisodes(PlexSettings settings); + void Execute(IJobExecutionContext context); + void Start(); + } +} \ No newline at end of file diff --git a/Ombi.Services/Jobs/IPlexUserChecker.cs b/Ombi.Services/Jobs/IPlexUserChecker.cs new file mode 100644 index 000000000..a19bce971 --- /dev/null +++ b/Ombi.Services/Jobs/IPlexUserChecker.cs @@ -0,0 +1,10 @@ +using Quartz; + +namespace Ombi.Services.Jobs +{ + public interface IPlexUserChecker + { + void Execute(IJobExecutionContext context); + void Start(); + } +} \ No newline at end of file diff --git a/Ombi.Services/Jobs/PlexAvailabilityChecker.cs b/Ombi.Services/Jobs/PlexAvailabilityChecker.cs index 936b128dc..e205b5b1b 100644 --- a/Ombi.Services/Jobs/PlexAvailabilityChecker.cs +++ b/Ombi.Services/Jobs/PlexAvailabilityChecker.cs @@ -473,5 +473,23 @@ namespace Ombi.Services.Jobs Job.SetRunning(false, JobNames.PlexChecker); } } + + public void Start() + { + Job.SetRunning(true, JobNames.PlexChecker); + try + { + CheckAndUpdateAll(); + } + catch (Exception e) + { + Log.Error(e); + } + finally + { + Job.Record(JobNames.PlexChecker); + Job.SetRunning(false, JobNames.PlexChecker); + } + } } } \ No newline at end of file diff --git a/Ombi.Services/Jobs/PlexEpisodeCacher.cs b/Ombi.Services/Jobs/PlexEpisodeCacher.cs index 1dae188d6..b7af87022 100644 --- a/Ombi.Services/Jobs/PlexEpisodeCacher.cs +++ b/Ombi.Services/Jobs/PlexEpisodeCacher.cs @@ -43,7 +43,7 @@ using Quartz; namespace Ombi.Services.Jobs { - public class PlexEpisodeCacher : IJob + public class PlexEpisodeCacher : IJob, IPlexEpisodeCacher { public PlexEpisodeCacher(ISettingsService plexSettings, IPlexApi plex, ICacheProvider cache, IJobRecord rec, IRepository repo, ISettingsService jobs) @@ -140,6 +140,38 @@ namespace Ombi.Services.Jobs } } + public void Start() + { + try + { + var s = Plex.GetSettings(); + if (!s.EnableTvEpisodeSearching) + { + return; + } + + var jobs = Job.GetJobs(); + var job = jobs.FirstOrDefault(x => x.Name.Equals(JobNames.EpisodeCacher, StringComparison.CurrentCultureIgnoreCase)); + if (job != null) + { + if (job.LastRun > DateTime.Now.AddHours(-11)) // If it's been run in the last 11 hours + { + return; + } + } + Job.SetRunning(true, JobNames.EpisodeCacher); + CacheEpisodes(s); + } + catch (Exception e) + { + Log.Error(e); + } + finally + { + Job.Record(JobNames.EpisodeCacher); + Job.SetRunning(false, JobNames.EpisodeCacher); + } + } public void Execute(IJobExecutionContext context) { diff --git a/Ombi.Services/Jobs/PlexUserChecker.cs b/Ombi.Services/Jobs/PlexUserChecker.cs index 5ea9c74a7..3303d1dcf 100644 --- a/Ombi.Services/Jobs/PlexUserChecker.cs +++ b/Ombi.Services/Jobs/PlexUserChecker.cs @@ -42,7 +42,7 @@ using Quartz; namespace Ombi.Services.Jobs { - public class PlexUserChecker : IJob + public class PlexUserChecker : IJob, IPlexUserChecker { private static readonly Logger Log = LogManager.GetCurrentClassLogger(); @@ -68,7 +68,7 @@ namespace Ombi.Services.Jobs private IRequestService RequestService { get; } private IUserRepository LocalUserRepository { get; } - public void Execute(IJobExecutionContext context) + public void Start() { JobRecord.SetRunning(true, JobNames.PlexUserChecker); @@ -153,7 +153,7 @@ namespace Ombi.Services.Jobs } // Looks like it's a new user! - var m = new PlexUsers + var m = new PlexUsers { PlexUserId = user.Id, Permissions = UserManagementHelper.GetPermissions(userManagementSettings), @@ -170,7 +170,7 @@ namespace Ombi.Services.Jobs // Main Plex user var dbMainAcc = dbUsers.FirstOrDefault(x => x.Username.Equals(mainPlexAccount.Username, StringComparison.CurrentCulture)); var localMainAcc = localUsers.FirstOrDefault(x => x.UserName.Equals(mainPlexAccount.Username, StringComparison.CurrentCulture)); - + // TODO if admin acc does exist, check if we need to update it @@ -188,7 +188,7 @@ namespace Ombi.Services.Jobs LoginId = Guid.NewGuid().ToString() }; - a.Permissions += (int) Permissions.Administrator; // Make admin + a.Permissions += (int)Permissions.Administrator; // Make admin Repo.Insert(a); } @@ -205,5 +205,9 @@ namespace Ombi.Services.Jobs JobRecord.Record(JobNames.PlexUserChecker); } } + public void Execute(IJobExecutionContext context) + { + Start(); + } } } \ No newline at end of file diff --git a/Ombi.Services/Jobs/RecentlyAdded.cs b/Ombi.Services/Jobs/RecentlyAdded.cs index 667ce542e..8ac7b6743 100644 --- a/Ombi.Services/Jobs/RecentlyAdded.cs +++ b/Ombi.Services/Jobs/RecentlyAdded.cs @@ -78,7 +78,7 @@ namespace Ombi.Services.Jobs private static readonly Logger Log = LogManager.GetCurrentClassLogger(); - public void Execute(IJobExecutionContext context) + public void Start() { try { @@ -100,6 +100,10 @@ namespace Ombi.Services.Jobs JobRecord.SetRunning(false, JobNames.RecentlyAddedEmail); } } + public void Execute(IJobExecutionContext context) + { + Start(); + } public void Test() { diff --git a/Ombi.Services/Jobs/StoreBackup.cs b/Ombi.Services/Jobs/StoreBackup.cs index 6a9f4ac6c..d90aadd76 100644 --- a/Ombi.Services/Jobs/StoreBackup.cs +++ b/Ombi.Services/Jobs/StoreBackup.cs @@ -35,7 +35,7 @@ using Quartz; namespace Ombi.Services.Jobs { - public class StoreBackup : IJob + public class StoreBackup : IJob, IStoreBackup { public StoreBackup(ISqliteConfiguration sql, IJobRecord rec) { @@ -48,6 +48,13 @@ namespace Ombi.Services.Jobs private static Logger Log = LogManager.GetCurrentClassLogger(); + public void Start() + { + JobRecord.SetRunning(true, JobNames.CpCacher); + TakeBackup(); + Cleanup(); + } + public void Execute(IJobExecutionContext context) { JobRecord.SetRunning(true, JobNames.CpCacher); diff --git a/Ombi.Services/Jobs/StoreCleanup.cs b/Ombi.Services/Jobs/StoreCleanup.cs index 75bdd2f34..fd9df3aa9 100644 --- a/Ombi.Services/Jobs/StoreCleanup.cs +++ b/Ombi.Services/Jobs/StoreCleanup.cs @@ -36,7 +36,7 @@ using Quartz; namespace Ombi.Services.Jobs { - public class StoreCleanup : IJob + public class StoreCleanup : IJob, IStoreCleanup { private static readonly Logger Log = LogManager.GetCurrentClassLogger(); @@ -81,6 +81,11 @@ namespace Ombi.Services.Jobs } + public void Start() + { + JobRecord.SetRunning(true, JobNames.CpCacher); + Cleanup(); + } public void Execute(IJobExecutionContext context) { JobRecord.SetRunning(true, JobNames.CpCacher); diff --git a/Ombi.Services/Jobs/UserRequestLimitResetter.cs b/Ombi.Services/Jobs/UserRequestLimitResetter.cs index 446b2d7ba..0a97a912b 100644 --- a/Ombi.Services/Jobs/UserRequestLimitResetter.cs +++ b/Ombi.Services/Jobs/UserRequestLimitResetter.cs @@ -39,7 +39,7 @@ using Quartz; namespace Ombi.Services.Jobs { - public class UserRequestLimitResetter : IJob + public class UserRequestLimitResetter : IJob, IUserRequestLimitResetter { private static readonly Logger Log = LogManager.GetCurrentClassLogger(); @@ -94,6 +94,31 @@ namespace Ombi.Services.Jobs } } + + public void Start() + { + Record.SetRunning(true, JobNames.CpCacher); + try + { + var settings = Settings.GetSettings(); + var users = Repo.GetAll(); + var requestLimits = users as RequestLimit[] ?? users.ToArray(); + + MovieLimit(settings, requestLimits); + TvLimit(settings, requestLimits); + AlbumLimit(settings, requestLimits); + } + catch (Exception e) + { + Log.Error(e); + } + finally + { + Record.Record(JobNames.RequestLimitReset); + Record.SetRunning(false, JobNames.CpCacher); + } + } + public void Execute(IJobExecutionContext context) { Record.SetRunning(true, JobNames.CpCacher); diff --git a/Ombi.Services/Ombi.Services.csproj b/Ombi.Services/Ombi.Services.csproj index 444f86980..6705cf939 100644 --- a/Ombi.Services/Ombi.Services.csproj +++ b/Ombi.Services/Ombi.Services.csproj @@ -90,11 +90,17 @@ + + + + + + - - + + diff --git a/Ombi.UI/Content/site.js b/Ombi.UI/Content/site.js index 85cae41f8..8d4af151f 100644 --- a/Ombi.UI/Content/site.js +++ b/Ombi.UI/Content/site.js @@ -8,7 +8,7 @@ return s; } -$(function() { +$(function () { $('[data-toggle="tooltip"]').tooltip(); }); @@ -93,6 +93,19 @@ function createBaseUrl(base, url) { return url; } + +function createBaseUrl(url) { + var base = $('#baseUrl').text(); + if (base) { + if (url.charAt(0) === "/") { + url = "/" + base + url; + } else { + url = "/" + base + "/" + url; + } + } + return url; +} + var noResultsHtml = "
" + "
Sorry, we didn't find any results!
"; var noResultsMusic = "
" + diff --git a/Ombi.UI/Modules/Admin/ScheduledJobsRunnerModule.cs b/Ombi.UI/Modules/Admin/ScheduledJobsRunnerModule.cs new file mode 100644 index 000000000..a21ebd16a --- /dev/null +++ b/Ombi.UI/Modules/Admin/ScheduledJobsRunnerModule.cs @@ -0,0 +1,150 @@ +#region Copyright +// /************************************************************************ +// Copyright (c) 2016 Jamie Rees +// File: AboutModule.cs +// Created By: Jamie Rees +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// ************************************************************************/ +#endregion + +using System; +using System.Threading.Tasks; +using Nancy; +using Ombi.Core; +using Ombi.Core.SettingModels; +using Ombi.Helpers.Permissions; +using Ombi.Services.Interfaces; +using Ombi.Services.Jobs; +using Ombi.UI.Models; +using ISecurityExtensions = Ombi.Core.ISecurityExtensions; + +namespace Ombi.UI.Modules.Admin +{ + public class ScheduledJobsRunnerModule : BaseModule + { + public ScheduledJobsRunnerModule(ISettingsService settingsService, + ISecurityExtensions security, IPlexContentCacher contentCacher, ISonarrCacher sonarrCacher, IWatcherCacher watcherCacher, + IRadarrCacher radarrCacher, ICouchPotatoCacher cpCacher, IStoreBackup store, ISickRageCacher srCacher, IAvailabilityChecker plexChceker, + IStoreCleanup cleanup, IUserRequestLimitResetter requestLimit, IPlexEpisodeCacher episodeCacher, IRecentlyAdded recentlyAdded, + IFaultQueueHandler faultQueueHandler, IPlexUserChecker plexUserChecker) : base("admin", settingsService, security) + { + Before += (ctx) => Security.AdminLoginRedirect(Permissions.Administrator, ctx); + + PlexContentCacher = contentCacher; + SonarrCacher = sonarrCacher; + RadarrCacher = radarrCacher; + WatcherCacher = watcherCacher; + CpCacher = cpCacher; + StoreBackup = store; + SrCacher = srCacher; + AvailabilityChecker = plexChceker; + StoreCleanup = cleanup; + RequestLimit = requestLimit; + EpisodeCacher = episodeCacher; + RecentlyAdded = recentlyAdded; + FaultQueueHandler = faultQueueHandler; + PlexUserChecker = plexUserChecker; + + Post["/schedulerun", true] = async (x, ct) => await ScheduleRun((string)Request.Form.key); + } + + private IPlexContentCacher PlexContentCacher { get; } + private IRadarrCacher RadarrCacher { get; } + private ISonarrCacher SonarrCacher { get; } + private IWatcherCacher WatcherCacher { get; } + private ICouchPotatoCacher CpCacher { get; } + private IStoreBackup StoreBackup { get; } + private ISickRageCacher SrCacher { get; } + private IAvailabilityChecker AvailabilityChecker { get; } + private IStoreCleanup StoreCleanup { get; } + private IUserRequestLimitResetter RequestLimit { get; } + private IPlexEpisodeCacher EpisodeCacher { get; } + private IRecentlyAdded RecentlyAdded { get; } + private IFaultQueueHandler FaultQueueHandler { get; } + private IPlexUserChecker PlexUserChecker { get; } + + + private async Task ScheduleRun(string key) + { + if (key.Equals(JobNames.PlexCacher, StringComparison.CurrentCultureIgnoreCase)) + { + PlexContentCacher.CacheContent(); + } + + if (key.Equals(JobNames.WatcherCacher, StringComparison.CurrentCultureIgnoreCase)) + { + WatcherCacher.Queued(); + } + + if (key.Equals(JobNames.SonarrCacher, StringComparison.CurrentCultureIgnoreCase)) + { + SonarrCacher.Queued(); + } + if (key.Equals(JobNames.RadarrCacher, StringComparison.CurrentCultureIgnoreCase)) + { + RadarrCacher.Queued(); + } + if (key.Equals(JobNames.CpCacher, StringComparison.CurrentCultureIgnoreCase)) + { + CpCacher.Queued(); + } + if (key.Equals(JobNames.StoreBackup, StringComparison.CurrentCultureIgnoreCase)) + { + StoreBackup.Start(); + } + if (key.Equals(JobNames.SrCacher, StringComparison.CurrentCultureIgnoreCase)) + { + SrCacher.Queued(); + } + if (key.Equals(JobNames.PlexChecker, StringComparison.CurrentCultureIgnoreCase)) + { + AvailabilityChecker.Start(); + } + if (key.Equals(JobNames.StoreCleanup, StringComparison.CurrentCultureIgnoreCase)) + { + StoreCleanup.Start(); + } + if (key.Equals(JobNames.RequestLimitReset, StringComparison.CurrentCultureIgnoreCase)) + { + RequestLimit.Start(); + } + if (key.Equals(JobNames.EpisodeCacher, StringComparison.CurrentCultureIgnoreCase)) + { + EpisodeCacher.Start(); + } + if (key.Equals(JobNames.RecentlyAddedEmail, StringComparison.CurrentCultureIgnoreCase)) + { + RecentlyAdded.Start(); + } + if (key.Equals(JobNames.FaultQueueHandler, StringComparison.CurrentCultureIgnoreCase)) + { + FaultQueueHandler.Start(); + } + if (key.Equals(JobNames.PlexUserChecker, StringComparison.CurrentCultureIgnoreCase)) + { + RequestLimit.Start(); + } + + + return Response.AsJson(new JsonResponseModel { Result = true }); + } + } +} \ No newline at end of file diff --git a/Ombi.UI/NinjectModules/ServicesModule.cs b/Ombi.UI/NinjectModules/ServicesModule.cs index 3b02a0213..edafddb03 100644 --- a/Ombi.UI/NinjectModules/ServicesModule.cs +++ b/Ombi.UI/NinjectModules/ServicesModule.cs @@ -52,6 +52,12 @@ namespace Ombi.UI.NinjectModules Bind().To(); Bind().To(); Bind().To(); + Bind().To(); + Bind().To(); + Bind().To(); + Bind().To(); + Bind().To(); + Bind().To(); Bind().To(); Bind().To(); diff --git a/Ombi.UI/Ombi.UI.csproj b/Ombi.UI/Ombi.UI.csproj index 25745546a..32f4b17a3 100644 --- a/Ombi.UI/Ombi.UI.csproj +++ b/Ombi.UI/Ombi.UI.csproj @@ -258,6 +258,7 @@ + diff --git a/Ombi.UI/Views/Admin/SchedulerSettings.cshtml b/Ombi.UI/Views/Admin/SchedulerSettings.cshtml index 9ba6ed904..904a86ec0 100644 --- a/Ombi.UI/Views/Admin/SchedulerSettings.cshtml +++ b/Ombi.UI/Views/Admin/SchedulerSettings.cshtml @@ -3,22 +3,32 @@
+ + + + + + + + + + + @foreach (var record in Model.JobRecorder) + { + + + + + + + } + +
Job NameLast Run
+ @record.Key + + @record.Value.ToString("R") +
-
-
Job Name -
-
Last Run -
-
-
- @foreach (var record in Model.JobRecorder) - { -
-
@record.Key
-
@record.Value.ToString("R")
-
-
- }

@@ -122,6 +132,34 @@ $obj.text(newDate); }); + + $('.refresh').click(function(e) { + var id = e.currentTarget.id; + + var ev = $(e.currentTarget.children[0]); + ev.addClass("fa-spin"); + + var url = createBaseUrl("/admin/schedulerun"); + $.ajax({ + type: 'POST', + data: {key:id}, + url: url, + dataType: "json", + success: function (response) { + if (response.result === true) { + generateNotify("Success!", "success"); + } else { + generateNotify(response.message, "warning"); + } + }, + error: function (e) { + console.log(e); + generateNotify("Something went wrong!", "danger"); + } + }); + + }); + $('#save') .click(function (e) { e.preventDefault(); diff --git a/Ombi.UI/Views/FaultQueue/RequestFaultQueue.cshtml b/Ombi.UI/Views/FaultQueue/RequestFaultQueue.cshtml index 59f2dde6b..f5df31e65 100644 --- a/Ombi.UI/Views/FaultQueue/RequestFaultQueue.cshtml +++ b/Ombi.UI/Views/FaultQueue/RequestFaultQueue.cshtml @@ -2,7 +2,7 @@ @Html.Partial("Shared/Partial/_Sidebar")
- Release Fault Queue + Request Fault Queue