mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 13:23:24 -07:00
Fix music visible on graph only if "Log music" is enabled
This commit is contained in:
parent
285946bf94
commit
048b31c87a
2 changed files with 14 additions and 1 deletions
|
@ -294,6 +294,8 @@
|
||||||
$('a[data-toggle=tab][href=' + current_tab + ']').trigger('click');
|
$('a[data-toggle=tab][href=' + current_tab + ']').trigger('click');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var music_visible = (${config['music_logging_enable']} == 1 ? true : false);
|
||||||
|
|
||||||
function loadGraphsTab1(time_range, yaxis) {
|
function loadGraphsTab1(time_range, yaxis) {
|
||||||
setGraphFormat(yaxis);
|
setGraphFormat(yaxis);
|
||||||
|
|
||||||
|
@ -319,6 +321,7 @@
|
||||||
hc_plays_by_day_options.yAxis.min = 0;
|
hc_plays_by_day_options.yAxis.min = 0;
|
||||||
hc_plays_by_day_options.xAxis.categories = dateArray;
|
hc_plays_by_day_options.xAxis.categories = dateArray;
|
||||||
hc_plays_by_day_options.series = data.series;
|
hc_plays_by_day_options.series = data.series;
|
||||||
|
hc_plays_by_day_options.series[2].visible = music_visible;
|
||||||
var hc_plays_by_day = new Highcharts.Chart(hc_plays_by_day_options);
|
var hc_plays_by_day = new Highcharts.Chart(hc_plays_by_day_options);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -331,6 +334,7 @@
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
hc_plays_by_dayofweek_options.xAxis.categories = data.categories;
|
hc_plays_by_dayofweek_options.xAxis.categories = data.categories;
|
||||||
hc_plays_by_dayofweek_options.series = data.series;
|
hc_plays_by_dayofweek_options.series = data.series;
|
||||||
|
hc_plays_by_dayofweek_options.series[2].visible = music_visible;
|
||||||
var hc_plays_by_dayofweek = new Highcharts.Chart(hc_plays_by_dayofweek_options);
|
var hc_plays_by_dayofweek = new Highcharts.Chart(hc_plays_by_dayofweek_options);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -343,6 +347,7 @@
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
hc_plays_by_hourofday_options.xAxis.categories = data.categories;
|
hc_plays_by_hourofday_options.xAxis.categories = data.categories;
|
||||||
hc_plays_by_hourofday_options.series = data.series;
|
hc_plays_by_hourofday_options.series = data.series;
|
||||||
|
hc_plays_by_hourofday_options.series[2].visible = music_visible;
|
||||||
var hc_plays_by_hourofday = new Highcharts.Chart(hc_plays_by_hourofday_options);
|
var hc_plays_by_hourofday = new Highcharts.Chart(hc_plays_by_hourofday_options);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -355,6 +360,7 @@
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
hc_plays_by_platform_options.xAxis.categories = data.categories;
|
hc_plays_by_platform_options.xAxis.categories = data.categories;
|
||||||
hc_plays_by_platform_options.series = data.series;
|
hc_plays_by_platform_options.series = data.series;
|
||||||
|
hc_plays_by_platform_options.series[2].visible = music_visible;
|
||||||
var hc_plays_by_platform = new Highcharts.Chart(hc_plays_by_platform_options);
|
var hc_plays_by_platform = new Highcharts.Chart(hc_plays_by_platform_options);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -367,6 +373,7 @@
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
hc_plays_by_user_options.xAxis.categories = data.categories;
|
hc_plays_by_user_options.xAxis.categories = data.categories;
|
||||||
hc_plays_by_user_options.series = data.series;
|
hc_plays_by_user_options.series = data.series;
|
||||||
|
hc_plays_by_user_options.series[2].visible = music_visible;
|
||||||
var hc_plays_by_user = new Highcharts.Chart(hc_plays_by_user_options);
|
var hc_plays_by_user = new Highcharts.Chart(hc_plays_by_user_options);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -462,6 +469,7 @@
|
||||||
hc_plays_by_month_options.yAxis.min = 0;
|
hc_plays_by_month_options.yAxis.min = 0;
|
||||||
hc_plays_by_month_options.xAxis.categories = data.categories;
|
hc_plays_by_month_options.xAxis.categories = data.categories;
|
||||||
hc_plays_by_month_options.series = data.series;
|
hc_plays_by_month_options.series = data.series;
|
||||||
|
hc_plays_by_month_options.series[2].visible = music_visible;
|
||||||
var hc_plays_by_month = new Highcharts.Chart(hc_plays_by_month_options);
|
var hc_plays_by_month = new Highcharts.Chart(hc_plays_by_month_options);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -144,7 +144,12 @@ class WebInterface(object):
|
||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def graphs(self):
|
def graphs(self):
|
||||||
return serve_template(templatename="graphs.html", title="Graphs")
|
|
||||||
|
config = {
|
||||||
|
"music_logging_enable": plexpy.CONFIG.MUSIC_LOGGING_ENABLE
|
||||||
|
}
|
||||||
|
|
||||||
|
return serve_template(templatename="graphs.html", title="Graphs", config=config)
|
||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def sync(self):
|
def sync(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue