mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 13:41:15 -07:00
Don't ping for activity if websocket is not connected
This commit is contained in:
parent
559a9b393e
commit
a082109045
1 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
<% from plexpy import PLEX_SERVER_UP %>
|
||||||
<%inherit file="base.html"/>
|
<%inherit file="base.html"/>
|
||||||
|
|
||||||
<%def name="headIncludes()">
|
<%def name="headIncludes()">
|
||||||
|
@ -22,7 +23,15 @@
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div id="currentActivity">
|
<div id="currentActivity">
|
||||||
|
% if PLEX_SERVER_UP:
|
||||||
<div class="text-muted" id="dashboard-checking-activity"><i class="fa fa-refresh fa-spin"></i> Checking for activity...</div>
|
<div class="text-muted" id="dashboard-checking-activity"><i class="fa fa-refresh fa-spin"></i> Checking for activity...</div>
|
||||||
|
% else:
|
||||||
|
<div id="dashboard-no-activity" class="text-muted">There was an error communicating with your Plex Server.
|
||||||
|
% if _session['user_group'] == 'admin':
|
||||||
|
Check the <a href="logs">logs</a> and verify your server connection in the <a href="settings#tab_tabs-plex_media_server">settings</a>.
|
||||||
|
% endif
|
||||||
|
</div>
|
||||||
|
% endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -241,9 +250,9 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
% if 'current_activity' in config['home_sections']:
|
% if 'current_activity' in config['home_sections'] and PLEX_SERVER_UP:
|
||||||
<script>
|
<script>
|
||||||
var defaultHandler = {
|
var defaultHandler = {
|
||||||
get: function(target, name) {
|
get: function(target, name) {
|
||||||
|
@ -280,9 +289,9 @@
|
||||||
|
|
||||||
if (!(current_activity)) {
|
if (!(current_activity)) {
|
||||||
% if _session['user_group'] == 'admin':
|
% if _session['user_group'] == 'admin':
|
||||||
var msg_settings = ' Verify your server connection in the <a href="settings#tab_tabs-plex_media_server">settings</a>.';
|
var msg_settings = ' Check the <a href="logs">logs</a> and verify your server connection in the <a href="settings#tab_tabs-plex_media_server">settings</a>.';
|
||||||
% else:
|
% else:
|
||||||
var msg_settings = ''
|
var msg_settings = '';
|
||||||
% endif
|
% endif
|
||||||
$('#currentActivityHeader').hide();
|
$('#currentActivityHeader').hide();
|
||||||
$('#currentActivity').html('<div id="dashboard-no-activity" class="text-muted">There was an error communicating with your Plex Server.' + msg_settings + '</div>');
|
$('#currentActivity').html('<div id="dashboard-no-activity" class="text-muted">There was an error communicating with your Plex Server.' + msg_settings + '</div>');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue