mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 12:59:42 -07:00
Add sortcut to /status/sessions
This commit is contained in:
parent
bf7e432c0c
commit
63814584e9
4 changed files with 15 additions and 1 deletions
|
@ -178,7 +178,7 @@ DOCUMENTATION :: END
|
||||||
<ul class="list-unstyled dashboard-activity-info-list">
|
<ul class="list-unstyled dashboard-activity-info-list">
|
||||||
<li class="dashboard-activity-info-item">
|
<li class="dashboard-activity-info-item">
|
||||||
% if _session['user_group'] == 'admin':
|
% if _session['user_group'] == 'admin':
|
||||||
<div class="sub-heading"><span class="raw-stream-info-modal" data-toggle="modal" data-target="#raw-stream-info-modal" data-key="${sk}">Stream</span></div>\
|
<div class="sub-heading"><span class="raw-stream-info-modal" data-toggle="modal" data-target="#raw-stream-info-modal" data-key="${sk}">Stream</span></div>
|
||||||
% else:
|
% else:
|
||||||
<div class="sub-heading">Stream</div>
|
<div class="sub-heading">Stream</div>
|
||||||
% endif
|
% endif
|
||||||
|
|
|
@ -207,6 +207,7 @@
|
||||||
<script src="${http_root}js/moment-with-locale.js"></script>
|
<script src="${http_root}js/moment-with-locale.js"></script>
|
||||||
<script src="${http_root}js/jquery.scrollbar.min.js"></script>
|
<script src="${http_root}js/jquery.scrollbar.min.js"></script>
|
||||||
<script src="${http_root}js/jquery.mousewheel.min.js"></script>
|
<script src="${http_root}js/jquery.mousewheel.min.js"></script>
|
||||||
|
<script src="${http_root}js/jquery.tripleclick.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var date_format = 'YYYY-MM-DD';
|
var date_format = 'YYYY-MM-DD';
|
||||||
var time_format = 'hh:mm a';
|
var time_format = 'hh:mm a';
|
||||||
|
@ -647,6 +648,12 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#sessions-shortcut').on('tripleclick', function () {
|
||||||
|
$.getJSON('return_sessions_url', function(sessions_url) {
|
||||||
|
window.open(sessions_url, '_blank');
|
||||||
|
});
|
||||||
|
});
|
||||||
% endif
|
% endif
|
||||||
</script>
|
</script>
|
||||||
% endif
|
% endif
|
||||||
|
|
1
data/interfaces/default/js/jquery.tripleclick.min.js
vendored
Normal file
1
data/interfaces/default/js/jquery.tripleclick.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
!function(t){function i(t){var i=jQuery(this);settings=jQuery.extend({},e,t.data);var a=i.data("triclick_clicks")||0,c=i.data("triclick_start")||0;0===a&&(c=t.timeStamp),0!=c&&t.timeStamp>c+settings.threshold&&(a=0,c=t.timeStamp),a+=1,3===a&&(a=0,c=0,t.type="tripleclick",void 0===jQuery.event.handle?jQuery.event.dispatch.apply(this,arguments):jQuery.event.handle.apply(this,arguments)),i.data("triclick_clicks",a),i.data("triclick_start",c)}var e={threshold:1e3};t.event.special.tripleclick={setup:function(e,a){t(this).bind("touchstart click.triple",e,i)},teardown:function(e){t(this).unbind("touchstart click.triple",i)}}}(jQuery);
|
|
@ -263,6 +263,12 @@ class WebInterface(object):
|
||||||
else:
|
else:
|
||||||
return {'result': 'error', 'message': 'Failed to terminate session.'}
|
return {'result': 'error', 'message': 'Failed to terminate session.'}
|
||||||
|
|
||||||
|
@cherrypy.expose
|
||||||
|
@cherrypy.tools.json_out()
|
||||||
|
@requireAuth(member_of("admin"))
|
||||||
|
def return_sessions_url(self, **kwargs):
|
||||||
|
return plexpy.CONFIG.PMS_URL + '/status/sessions?X-Plex-Token=' + plexpy.CONFIG.PMS_TOKEN
|
||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
@requireAuth()
|
@requireAuth()
|
||||||
def home_stats(self, time_range=30, stats_type=0, stats_count=10, **kwargs):
|
def home_stats(self, time_range=30, stats_type=0, stats_count=10, **kwargs):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue