mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 05:13:21 -07:00
Concurrent Streams per Day Graph (#2046)
* initial commit * fix grouping in webserve * remove event handler and adapt cursor * optimize most concurrent calculation * update branch from nightly and user filter * max concurrent streams in graph * made several changes mentioned in review
This commit is contained in:
parent
4938954c61
commit
59fe34982e
5 changed files with 265 additions and 5 deletions
|
@ -137,6 +137,20 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h4><i class="fa fa-video-camera"></i> Daily concurrent stream count</span> by stream type <small>Last <span class="days">30</span> days</small></h4>
|
||||
<p class="help-block">
|
||||
The total count of concurrent streams of tv, movies, and music by the transcode decision.
|
||||
</p>
|
||||
<div class="graphs-instance">
|
||||
<div class="watch-chart" id="graph_concurrent_streams_by_stream_type">
|
||||
<div class="graphs-load"><i class="fa fa-refresh fa-spin"></i> Loading chart...</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h4><i class="fa fa-expand-arrows-alt"></i> <span class="yaxis-text">Play count</span> by source resolution <small>Last <span class="days">30</span> days</small></h4>
|
||||
|
@ -312,7 +326,8 @@
|
|||
'Live TV': '#19A0D7',
|
||||
'Direct Play': '#E5A00D',
|
||||
'Direct Stream': '#FFFFFF',
|
||||
'Transcode': '#F06464'
|
||||
'Transcode': '#F06464',
|
||||
'Max. Concurrent Streams': '#1014FC'
|
||||
};
|
||||
var series_colors = [];
|
||||
$.each(data_series, function(index, series) {
|
||||
|
@ -327,6 +342,7 @@
|
|||
<script src="${http_root}js/graphs/plays_by_platform.js${cache_param}"></script>
|
||||
<script src="${http_root}js/graphs/plays_by_user.js${cache_param}"></script>
|
||||
<script src="${http_root}js/graphs/plays_by_stream_type.js${cache_param}"></script>
|
||||
<script src="${http_root}js/graphs/concurrent_streams_by_stream_type.js${cache_param}"></script>
|
||||
<script src="${http_root}js/graphs/plays_by_source_resolution.js${cache_param}"></script>
|
||||
<script src="${http_root}js/graphs/plays_by_stream_resolution.js${cache_param}"></script>
|
||||
<script src="${http_root}js/graphs/plays_by_platform_by_stream_type.js${cache_param}"></script>
|
||||
|
@ -540,6 +556,33 @@
|
|||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: "get_concurrent_streams_by_stream_type",
|
||||
type: 'get',
|
||||
data: { time_range: time_range, user_id: selected_user_id },
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
var dateArray = [];
|
||||
$.each(data.categories, function (i, day) {
|
||||
dateArray.push(moment(day, 'YYYY-MM-DD').valueOf());
|
||||
// Highlight the weekend
|
||||
if ((moment(day, 'YYYY-MM-DD').format('ddd') == 'Sat') ||
|
||||
(moment(day, 'YYYY-MM-DD').format('ddd') == 'Sun')) {
|
||||
hc_plays_by_day_options.xAxis.plotBands.push({
|
||||
from: i-0.5,
|
||||
to: i+0.5,
|
||||
color: 'rgba(80,80,80,0.3)'
|
||||
});
|
||||
}
|
||||
});
|
||||
hc_concurrent_streams_by_stream_type_options.yAxis.min = 0;
|
||||
hc_concurrent_streams_by_stream_type_options.xAxis.categories = dateArray;
|
||||
hc_concurrent_streams_by_stream_type_options.series = getGraphVisibility(hc_concurrent_streams_by_stream_type_options.chart.renderTo, data.series);
|
||||
hc_concurrent_streams_by_stream_type_options.colors = getGraphColors(data.series);
|
||||
var hc_plays_by_stream_type = new Highcharts.Chart(hc_concurrent_streams_by_stream_type_options);
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: "get_plays_by_source_resolution",
|
||||
type: 'get',
|
||||
|
@ -754,6 +797,7 @@
|
|||
|
||||
hc_plays_by_day_options.xAxis.plotBands = [];
|
||||
hc_plays_by_stream_type_options.xAxis.plotBands = [];
|
||||
hc_concurrent_streams_by_stream_type_options.xAxis.plotBands = [];
|
||||
|
||||
hc_plays_by_day_options.yAxis.labels.formatter = yaxis_format;
|
||||
hc_plays_by_dayofweek_options.yAxis.labels.formatter = yaxis_format;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue