mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-15 01:32:57 -07:00
Fix manual refreshing the libraries/users list
This commit is contained in:
parent
dc4e6edc9a
commit
b4a4f60b04
3 changed files with 34 additions and 22 deletions
|
@ -180,18 +180,19 @@
|
|||
|
||||
% if _session['user_group'] == 'admin':
|
||||
$("#refresh-libraries-list").click(function () {
|
||||
showMsg('Refreshing libraries list...', true, false);
|
||||
$.ajax({
|
||||
url: 'refresh_libraries_list',
|
||||
cache: false,
|
||||
async: true,
|
||||
success: function (data) {
|
||||
showMsg('<i class="fa fa-refresh"></i> Libraries list refresh started...', false, true, 2000, false);
|
||||
},
|
||||
complete: function (data) {
|
||||
showMsg('<i class="fa fa-check"></i> Libraries list refreshed.', false, true, 2000, false);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
showMsg('<i class="fa fa-exclamation-circle"></i> Unable to refresh libraries list.', false, true, 2000, true);
|
||||
complete: function (xhr, status) {
|
||||
var result = $.parseJSON(xhr.responseText);
|
||||
var msg = result.message;
|
||||
if (result.result == 'success') {
|
||||
showMsg('<i class="fa fa-check"></i> ' + msg, false, true, 2000, false);
|
||||
} else {
|
||||
showMsg('<i class="fa fa-times"></i> ' + msg, false, true, 2000, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -184,18 +184,19 @@
|
|||
|
||||
% if _session['user_group'] == 'admin':
|
||||
$("#refresh-users-list").click(function() {
|
||||
showMsg('Refreshing users list...', true, false);
|
||||
$.ajax({
|
||||
url: 'refresh_users_list',
|
||||
cache: false,
|
||||
async: true,
|
||||
success: function(data) {
|
||||
showMsg('<i class="fa fa-check"></i> Users list refresh started...', false, true, 2000, false);
|
||||
},
|
||||
complete: function (data) {
|
||||
showMsg('<i class="fa fa-check"></i> Users list refreshed.', false, true, 2000, false);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
showMsg('<i class="fa fa-exclamation-circle"></i> Unable to refresh users list.', false, true, 2000, true);
|
||||
complete: function (xhr, status) {
|
||||
var result = $.parseJSON(xhr.responseText);
|
||||
var msg = result.message;
|
||||
if (result.result == 'success') {
|
||||
showMsg('<i class="fa fa-check"></i> ' + msg, false, true, 2000, false);
|
||||
} else {
|
||||
showMsg('<i class="fa fa-times"></i> ' + msg, false, true, 2000, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue