mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 12:59:42 -07:00
Add secure/insecure icon to activity card
This commit is contained in:
parent
61fac10079
commit
6e9f299c19
2 changed files with 19 additions and 5 deletions
|
@ -283,10 +283,17 @@ DOCUMENTATION :: END
|
||||||
<li class="dashboard-activity-info-item">
|
<li class="dashboard-activity-info-item">
|
||||||
<div class="sub-heading">Location</div>
|
<div class="sub-heading">Location</div>
|
||||||
<div class="sub-value time-right">
|
<div class="sub-value time-right">
|
||||||
|
% if data['secure'] is not None:
|
||||||
|
% if data['secure']:
|
||||||
|
<span data-toggle="tooltip" title="Secure Connection"><i class="fa fa-lock"></i></span>
|
||||||
|
% else:
|
||||||
|
<span data-toggle="tooltip" title="Insecure Connection"><i class="fa fa-unlock"></i></span>
|
||||||
|
% endif
|
||||||
|
% endif
|
||||||
<span id="location-${sk}">${data['location'].upper()}</span>:
|
<span id="location-${sk}">${data['location'].upper()}</span>:
|
||||||
% if data['ip_address'] != 'N/A':
|
% if data['ip_address'] != 'N/A':
|
||||||
<span class="ip-container"><span class="ip-address">${data['ip_address']}</span></span>
|
<span class="ip-container"><span class="ip-address">${data['ip_address']}</span></span>
|
||||||
% if data['relay']:
|
% if data['relayed']:
|
||||||
<span data-toggle="tooltip" title="Plex Relay"><i class="fa fa-exclamation-circle"></i></span>
|
<span data-toggle="tooltip" title="Plex Relay"><i class="fa fa-exclamation-circle"></i></span>
|
||||||
% else:
|
% else:
|
||||||
<a href="#" class="external_ip-modal" data-toggle="modal" data-target="#ip-info-modal" data-ip="${data['ip_address']}">
|
<a href="#" class="external_ip-modal" data-toggle="modal" data-target="#ip-info-modal" data-ip="${data['ip_address']}">
|
||||||
|
|
|
@ -1510,7 +1510,9 @@ class PmsConnect(object):
|
||||||
'player': helpers.get_xml_attr(player_info, 'title') or helpers.get_xml_attr(player_info, 'product'),
|
'player': helpers.get_xml_attr(player_info, 'title') or helpers.get_xml_attr(player_info, 'product'),
|
||||||
'machine_id': helpers.get_xml_attr(player_info, 'machineIdentifier'),
|
'machine_id': helpers.get_xml_attr(player_info, 'machineIdentifier'),
|
||||||
'state': helpers.get_xml_attr(player_info, 'state'),
|
'state': helpers.get_xml_attr(player_info, 'state'),
|
||||||
'local': helpers.get_xml_attr(player_info, 'local')
|
'local': int(helpers.get_xml_attr(player_info, 'local') == '1'),
|
||||||
|
'relayed': helpers.get_xml_attr(player_info, 'relayed', default_return=None),
|
||||||
|
'secure': helpers.get_xml_attr(player_info, 'secure', default_return=None)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get the session details
|
# Get the session details
|
||||||
|
@ -1524,12 +1526,17 @@ class PmsConnect(object):
|
||||||
else:
|
else:
|
||||||
session_details = {'session_id': '',
|
session_details = {'session_id': '',
|
||||||
'bandwidth': '',
|
'bandwidth': '',
|
||||||
'location': 'wan' if player_details['local'] == '0' else 'lan'
|
'location': 'lan' if player_details['local'] else 'wan'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if using Plex Relay
|
# Check if using Plex Relay
|
||||||
session_details['relay'] = int(session_details['location'] != 'lan'
|
if player_details['relayed'] is None:
|
||||||
and player_details['ip_address_public'] == '127.0.0.1')
|
player_details['relayed'] = int(session_details['location'] != 'lan' and
|
||||||
|
player_details['ip_address_public'] == '127.0.0.1')
|
||||||
|
|
||||||
|
# Check if secure connection
|
||||||
|
if player_details['secure'] is not None:
|
||||||
|
player_details['secure'] = int(player_details['secure'] == '1')
|
||||||
|
|
||||||
# Get the transcode details
|
# Get the transcode details
|
||||||
if session.getElementsByTagName('TranscodeSession'):
|
if session.getElementsByTagName('TranscodeSession'):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue