diff --git a/data/interfaces/default/js/script.js b/data/interfaces/default/js/script.js
index 9f3ff621..5eac0f22 100644
--- a/data/interfaces/default/js/script.js
+++ b/data/interfaces/default/js/script.js
@@ -54,7 +54,7 @@ function showMsg(msg,loader,timeout,ms,error) {
}
}
-function doAjaxCall(url,elem,reload,form) {
+function doAjaxCall(url, elem, reload, form, callback) {
// Set Message
feedback = $("#ajaxMsg");
update = $("#updatebar");
@@ -157,6 +157,9 @@ function doAjaxCall(url,elem,reload,form) {
complete: function(jqXHR, textStatus) {
// Remove loaders and stuff, ajax request is complete!
loader.remove();
+ if (typeof callback === "function") {
+ callback();
+ }
}
});
}
diff --git a/data/interfaces/default/notification_config.html b/data/interfaces/default/notification_config.html
index fab610d4..d1dd0675 100644
--- a/data/interfaces/default/notification_config.html
+++ b/data/interfaces/default/notification_config.html
@@ -147,9 +147,8 @@ from plexpy import helpers
})
$('#save-notification-item').click(function () {
- doAjaxCall('set_notification_config', $(this), 'tabs', true);
// Reload modal to update certain fields
- reloadModal();
+ doAjaxCall('set_notification_config', $(this), 'tabs', true, reloadModal);
return false;
});
@@ -211,8 +210,8 @@ from plexpy import helpers
});
$('#pushbullet_apikey, #pushover_apitoken, #scripts_folder').on('change', function () {
- doAjaxCall('set_notification_config', $(this), 'tabs', true);
- reloadModal();
+ // Reload modal to update certain fields
+ doAjaxCall('set_notification_config', $(this), 'tabs', true, reloadModal);
return false;
});
diff --git a/data/interfaces/default/scheduler_table.html b/data/interfaces/default/scheduler_table.html
new file mode 100644
index 00000000..b01c4b11
--- /dev/null
+++ b/data/interfaces/default/scheduler_table.html
@@ -0,0 +1,64 @@
+<%doc>
+USAGE DOCUMENTATION :: PLEASE LEAVE THIS AT THE TOP OF THIS FILE
+
+For Mako templating syntax documentation please visit: http://docs.makotemplates.org/en/latest/
+
+Filename: scheduler_table.html
+Version: 0.1
+
+DOCUMENTATION :: END
+%doc>
+
+<%!
+import arrow
+import plexpy
+from plexpy import common
+
+scheduled_jobs = [j.id for j in plexpy.SCHED.get_jobs()]
+%>
+
+
+
+
+ Scheduled Task |
+ State |
+ Interval |
+ Next Run In |
+ Next Run Time |
+
+
+
+ % for job in common.SCHEDULER_LIST:
+ % if job in scheduled_jobs:
+ <%
+ sched_job = plexpy.SCHED.get_job(job)
+ run_interval = arrow.get(str(sched_job.trigger.interval), ['H:mm:ss', 'HH:mm:ss'])
+ next_run_interval = arrow.get(sched_job.next_run_time).timestamp - arrow.now().timestamp
+ %>
+
+ ${sched_job.id} |
+ Active |
+ ${arrow.get(run_interval).format('HH:mm:ss')} |
+ ${arrow.get(next_run_interval).format('HH:mm:ss')} |
+ ${arrow.get(sched_job.next_run_time).format('YYYY-MM-DD HH:mm:ss')} |
+
+ % elif job == 'Check for active sessions' and plexpy.CONFIG.MONITORING_USE_WEBSOCKET:
+
+ ${job} |
+ Using Websockets |
+ N/A |
+ N/A |
+ N/A |
+
+ % else:
+
+ ${job} |
+ Inactive |
+ N/A |
+ N/A |
+ N/A |
+
+ % endif
+ % endfor
+
+
\ No newline at end of file
diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html
index 458d6a04..d302590c 100644
--- a/data/interfaces/default/settings.html
+++ b/data/interfaces/default/settings.html
@@ -130,51 +130,10 @@ scheduled_jobs = [j.id for j in plexpy.SCHED.get_jobs()]
-
-
-
- Scheduled Task |
- State |
- Interval |
- Next Run In |
- Next Run Time |
-
-
-
- % for job in plexpy.common.SCHEDULER_LIST:
- % if job in scheduled_jobs:
- <%
- sched_job = plexpy.SCHED.get_job(job)
- run_interval = arrow.get(str(sched_job.trigger.interval), ['H:mm:ss', 'HH:mm:ss'])
- next_run_interval = arrow.get(sched_job.next_run_time).timestamp - arrow.now().timestamp
- %>
-
- ${sched_job.id} |
- Active |
- ${arrow.get(run_interval).format('HH:mm:ss')} |
- ${arrow.get(next_run_interval).format('HH:mm:ss')} |
- ${arrow.get(sched_job.next_run_time).format('YYYY-MM-DD HH:mm:ss')} |
-
- % elif job == 'Check for active sessions' and plexpy.CONFIG.MONITORING_USE_WEBSOCKET:
-
- ${job} |
- Using Websockets |
- N/A |
- N/A |
- N/A |
-
- % else:
-
- ${job} |
- Inactive |
- N/A |
- N/A |
- N/A |
-
- % endif
- % endfor
-
-
+
+
Loading scheduler table...
+
+