mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 09:12:58 -07:00
Fix homepage server status when sections are disabled
This commit is contained in:
parent
249533ac51
commit
defceed696
1 changed files with 11 additions and 1 deletions
|
@ -280,22 +280,32 @@
|
||||||
|
|
||||||
var error_msg = 'There was an error communicating with your Plex Server.' + msg_settings;
|
var error_msg = 'There was an error communicating with your Plex Server.' + msg_settings;
|
||||||
|
|
||||||
|
% if 'current_activity' in config['home_sections'] or 'recently_added' in config['home_sections']:
|
||||||
var server_status;
|
var server_status;
|
||||||
server_status = setInterval(function() {
|
server_status = setInterval(function() {
|
||||||
$.getJSON('server_status', function (data) {
|
$.getJSON('server_status', function (data) {
|
||||||
if (data.connected === true) {
|
if (data.connected === true) {
|
||||||
clearInterval(server_status);
|
clearInterval(server_status);
|
||||||
|
% if 'current_activity' in config['home_sections']:
|
||||||
$('#currentActivity').html('<div id="dashboard-checking-activity" class="text-muted"><i class="fa fa-refresh fa-spin"></i> Checking for activity...</div>');
|
$('#currentActivity').html('<div id="dashboard-checking-activity" class="text-muted"><i class="fa fa-refresh fa-spin"></i> Checking for activity...</div>');
|
||||||
$('#recentlyAdded').html('<div id="dashboard-checking-recently-added" class="text-muted"><i class="fa fa-refresh fa-spin"></i> Looking for new items...</div>');
|
|
||||||
activityConnected();
|
activityConnected();
|
||||||
|
% endif
|
||||||
|
% if 'recently_added' in config['home_sections']:
|
||||||
|
$('#recentlyAdded').html('<div id="dashboard-checking-recently-added" class="text-muted"><i class="fa fa-refresh fa-spin"></i> Looking for new items...</div>');
|
||||||
recentlyAddedConnected();
|
recentlyAddedConnected();
|
||||||
|
% endif
|
||||||
} else if (data.connected === false) {
|
} else if (data.connected === false) {
|
||||||
clearInterval(server_status);
|
clearInterval(server_status);
|
||||||
|
% if 'current_activity' in config['home_sections']:
|
||||||
$('#currentActivity').html('<div id="dashboard-no-activity" class="text-muted">' + error_msg + '</div>');
|
$('#currentActivity').html('<div id="dashboard-no-activity" class="text-muted">' + error_msg + '</div>');
|
||||||
|
% endif
|
||||||
|
% if 'recently_added' in config['home_sections']:
|
||||||
$('#recentlyAdded').html('<div id="dashboard-no-recently-added" class="text-muted">' + error_msg + '</div>');
|
$('#recentlyAdded').html('<div id="dashboard-no-recently-added" class="text-muted">' + error_msg + '</div>');
|
||||||
|
% endif
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
% endif
|
||||||
</script>
|
</script>
|
||||||
% if 'current_activity' in config['home_sections']:
|
% if 'current_activity' in config['home_sections']:
|
||||||
<script>
|
<script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue