mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Implement graphs page (WIP)
This commit is contained in:
parent
849078dab0
commit
b47de65e5f
70 changed files with 15087 additions and 2 deletions
|
@ -98,6 +98,10 @@ class WebInterface(object):
|
|||
def users(self):
|
||||
return serve_template(templatename="users.html", title="Users")
|
||||
|
||||
@cherrypy.expose
|
||||
def graphs(self):
|
||||
return serve_template(templatename="graphs.html", title="Graphs")
|
||||
|
||||
@cherrypy.expose
|
||||
def user(self, user=None):
|
||||
return serve_template(templatename="user.html", title="User", user=user)
|
||||
|
@ -721,4 +725,16 @@ class WebInterface(object):
|
|||
cherrypy.response.headers['Content-type'] = 'application/json'
|
||||
return json.dumps(result)
|
||||
else:
|
||||
logger.warn('Unable to retrieve data.')
|
||||
logger.warn('Unable to retrieve data.')
|
||||
|
||||
@cherrypy.expose
|
||||
def get_plays_by_date(self, time_range='30', **kwargs):
|
||||
|
||||
plex_watch = plexwatch.PlexWatch()
|
||||
result = plex_watch.get_total_plays_per_day(time_range)
|
||||
|
||||
if result:
|
||||
cherrypy.response.headers['Content-type'] = 'application/json'
|
||||
return json.dumps(result)
|
||||
else:
|
||||
logger.warn('Unable to retrieve data.')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue