mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-30 11:38:36 -07:00
Return success/failed message for testing notifications
This commit is contained in:
parent
698275633f
commit
ff532a5c6c
3 changed files with 46 additions and 29 deletions
|
@ -190,7 +190,10 @@ from plexpy import helpers
|
|||
});
|
||||
|
||||
$('#test_notifier').click(function () {
|
||||
doAjaxCall('set_notification_config', $(this), 'tabs', true);
|
||||
doAjaxCall('set_notification_config', $(this), 'tabs', true, sendTestNotification);
|
||||
});
|
||||
|
||||
function sendTestNotification() {
|
||||
$.ajax({
|
||||
url: 'test_notifier',
|
||||
data: {
|
||||
|
@ -203,11 +206,16 @@ from plexpy import helpers
|
|||
cache: false,
|
||||
async: true,
|
||||
complete: function (xhr, status) {
|
||||
msg = '<i class="fa fa-check"></i> ' + xhr.responseText;
|
||||
showMsg(msg, false, true, 2000);
|
||||
if (xhr.responseText.indexOf('sent') > -1) {
|
||||
msg = '<i class="fa fa-check"></i> ' + xhr.responseText;
|
||||
showMsg(msg, false, true, 2000);
|
||||
} else {
|
||||
msg = '<i class="fa fa-times"></i> ' + xhr.responseText;
|
||||
showMsg(msg, false, true, 2000, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$('#pushbullet_apikey, #pushover_apitoken, #scripts_folder').on('change', function () {
|
||||
// Reload modal to update certain fields
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue