Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library Statistics Graph Tab #1472

Open
wants to merge 33 commits into
base: nightly
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
099148b
Additions count by media type graph
herby2212 Jul 20, 2021
5fa5e68
addition of seasons and episodes count
herby2212 Jul 20, 2021
0f96924
fix show count including tracks
herby2212 Jul 20, 2021
01bce8b
Library Statistics tab and move + new graph
herby2212 Jul 20, 2021
0c5832b
Daily addition by media type graph
herby2212 Jul 20, 2021
8ce9369
fixed highlighting of weekends
herby2212 Jul 21, 2021
1811e87
move episode count on second yAxis
herby2212 Jul 23, 2021
2a7a211
addition count by source resolution graph
herby2212 Aug 1, 2021
a524630
optimizing query with resolution_identifier
herby2212 Aug 1, 2021
039bead
optimized query and fixed sorting for ByResolution
herby2212 Aug 1, 2021
65fcb9a
query optimizing + library growth graph synced
herby2212 Aug 18, 2021
8e6cf7c
Merge branch 'feature-library-statistics-graph' of https://github.com…
herby2212 Aug 18, 2021
799a806
library growth graph content
herby2212 Aug 18, 2021
13e01c7
fix console error, tooltip shadow, cursor
herby2212 Aug 19, 2021
76581f3
sync enable/disable axis, labels, storage
herby2212 Aug 19, 2021
5c8abd3
fix tooltip position->sync graphs based on x value
herby2212 Aug 19, 2021
13bf9f9
cleanup; fix sync data range change or tab switch
herby2212 Aug 19, 2021
94f2dbe
library_stats_items table creation and data setup
herby2212 Aug 20, 2021
e4122a0
library stats data refresh settings implementation
herby2212 Aug 20, 2021
dafb09c
optimized & based queries on library_stats_items
herby2212 Aug 20, 2021
827fff3
cleanup & switch to updated_at
herby2212 Aug 21, 2021
0b4c733
bug fixing and robustness improvements
herby2212 Aug 21, 2021
5988652
bug fixing & music integration for library stats
herby2212 Aug 22, 2021
2386cab
bug fix for graph out of scope and timestamp
herby2212 Sep 5, 2021
c78c721
remove detail dialog for additions_by_day
herby2212 Feb 13, 2022
f87fce6
factor in deleted and active libraries
herby2212 Feb 13, 2022
9379932
query optimization
herby2212 Feb 17, 2022
42d5ad5
hide not needed options on lib stats graph tab
herby2212 Jan 7, 2023
4350c9a
update chart and tooltip date format
herby2212 Jan 7, 2023
6d7b9a5
tooltip und points fadeout for synced graphs + fix
herby2212 Jan 7, 2023
95670fb
code update for conform structure
herby2212 Jan 7, 2023
668d7d3
Merge branch 'nightly' into feature-library-statistics-graph
herby2212 Jul 23, 2023
0cc69c2
update config
herby2212 Jul 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
383 changes: 378 additions & 5 deletions data/interfaces/default/graphs.html

Large diffs are not rendered by default.

86 changes: 86 additions & 0 deletions data/interfaces/default/js/graphs/library_additions_by_day.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
var hc_library_additions_by_day_options = {
chart: {
type: 'line',
backgroundColor: 'rgba(0,0,0,0)',
renderTo: 'graph_additions_by_day'
},
title: {
text: ''
},
legend: {
enabled: true,
itemStyle: {
font: '9pt "Open Sans", sans-serif',
color: '#A0A0A0'
},
itemHoverStyle: {
color: '#FFF'
},
itemHiddenStyle: {
color: '#444'
}
},
credits: {
enabled: false
},
plotOptions: {
series: {
allowPointSelect: false,
threshold: 0,
events: {
legendItemClick: function(event) {
syncGraphs(this, this.chart.renderTo.id, this.name, event.browserEvent);
setGraphVisibility(this.chart.renderTo.id, this.chart.series, this.name);
}
}
}
},
xAxis: {
type: 'datetime',
labels: {
formatter: function() {
return moment(this.value).format("YY MMM D");
},
style: {
color: '#aaa'
}
},
categories: [{}],
plotBands: []
},
yAxis: [{
title: {
text: null
},
labels: {
style: {
color: '#aaa'
}
}
}, {
title: {
text: 'Episodes'
},
labels: {
style: {
color: '#aaa'
}
},
opposite: true
}, {
title: {
text: 'Tracks'
},
labels: {
style: {
color: '#aaa'
}
},
opposite: true
}],
tooltip: {
shared: true,
crosshairs: true
},
series: [{}]
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
var hc_library_additions_by_media_type_options = {
chart: {
type: 'column',
backgroundColor: 'rgba(0,0,0,0)',
renderTo: 'graph_additions_by_media_type'
},
title: {
text: ''
},
legend: {
enabled: true,
itemStyle: {
font: '9pt "Open Sans", sans-serif',
color: '#A0A0A0'
},
itemHoverStyle: {
color: '#FFF'
},
itemHiddenStyle: {
color: '#444'
}
},
credits: {
enabled: false
},
xAxis: {
categories: [{}],
labels: {
style: {
color: '#aaa'
}
}
},
yAxis: {
title: {
text: null
},
labels: {
style: {
color: '#aaa'
}
},
stackLabels: {
enabled: false,
style: {
color: '#fff'
}
}
},
plotOptions: {
column: {
borderWidth: 0,
stacking: 'normal',
dataLabels: {
enabled: false,
style: {
color: '#000'
}
}
},
series: {
events: {
legendItemClick: function () {
setGraphVisibility(this.chart.renderTo.id, this.chart.series, this.name);
}
}
}
},
tooltip: {
shared: true
},
series: [{}]
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
var hc_library_additions_by_source_resolution_options = {
chart: {
type: 'column',
backgroundColor: 'rgba(0,0,0,0)',
renderTo: 'graph_additions_by_source_resolution'
},
title: {
text: ''
},
legend: {
enabled: true,
itemStyle: {
font: '9pt "Open Sans", sans-serif',
color: '#A0A0A0'
},
itemHoverStyle: {
color: '#FFF'
},
itemHiddenStyle: {
color: '#444'
}
},
credits: {
enabled: false
},
xAxis: {
categories: [{}],
labels: {
style: {
color: '#aaa'
}
}
},
yAxis: {
title: {
text: null
},
labels: {
style: {
color: '#aaa'
}
},
stackLabels: {
enabled: false,
style: {
color: '#fff'
}
}
},
plotOptions: {
column: {
borderWidth: 0,
stacking: 'normal',
dataLabels: {
enabled: false,
style: {
color: '#000'
}
}
},
series: {
events: {
legendItemClick: function () {
setGraphVisibility(this.chart.renderTo.id, this.chart.series, this.name);
}
}
}
},
tooltip: {
shared: true
},
series: [{}]
};
86 changes: 86 additions & 0 deletions data/interfaces/default/js/graphs/library_growth_by_day.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
var hc_library_growth_by_day_options = {
chart: {
type: 'line',
backgroundColor: 'rgba(0,0,0,0)',
renderTo: 'library_growth_by_day'
},
title: {
text: ''
},
legend: {
enabled: true,
itemStyle: {
font: '9pt "Open Sans", sans-serif',
color: '#A0A0A0'
},
itemHoverStyle: {
color: '#FFF'
},
itemHiddenStyle: {
color: '#444'
}
},
credits: {
enabled: false
},
plotOptions: {
series: {
allowPointSelect: false,
threshold: 0,
events: {
legendItemClick: function(event) {
syncGraphs(this, this.chart.renderTo.id, this.name, event.browserEvent);
setGraphVisibility(this.chart.renderTo.id, this.chart.series, this.name);
}
}
}
},
xAxis: {
type: 'datetime',
labels: {
formatter: function() {
return moment(this.value).format("YY MMM D");
},
style: {
color: '#aaa'
}
},
categories: [{}],
plotBands: []
},
yAxis: [{
title: {
text: null
},
labels: {
style: {
color: '#aaa'
}
}
}, {
title: {
text: 'Episodes'
},
labels: {
style: {
color: '#aaa'
}
},
opposite: true
}, {
title: {
text: 'Tracks'
},
labels: {
style: {
color: '#aaa'
}
},
opposite: true
}],
tooltip: {
shared: true,
crosshairs: true
},
series: [{}]
};
19 changes: 19 additions & 0 deletions data/interfaces/default/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,25 @@ <h3>Server Monitoring</h3>
<p class="help-block">Refresh the libraries list when Tautulli starts.</p>
</div>

<div class="form-group advanced-setting">
<label for="refresh_library_stats_data_interval">Library Statistics Data Refresh Interval</label>
<div class="row">
<div class="col-md-2">
<input type="text" class="form-control" data-parsley-type="integer" id="refresh_library_stats_data_interval" name="refresh_library_stats_data_interval" value="${config['refresh_library_stats_data_interval']}" size="5" data-parsley-range="[6,24]" data-parsley-trigger="change" data-parsley-errors-container="#refresh_library_stats_data_interval_error" required>
</div>
<div id="refresh_library_stats_data_interval_error" class="alert alert-danger settings-alert" role="alert"></div>
</div>
<p class="help-block">The interval (in hours) Tautulli will request an update of all media items from your Plex Media Server.</p>
<p class="help-block">Minimum 6, maximum 24, default 12.</p>
<p class="help-block">This process, depending on your library sizes, can take multiple minutes up to half an hour.</p>
</div>
<div class="checkbox advanced-setting">
<label>
<input type="checkbox" id="refresh_library_stats_data_on_startup" name="refresh_library_stats_data_on_startup" value="1" ${config['refresh_library_stats_data_on_startup']}> Refresh Library Statistics Data on Startup
</label>
<p class="help-block">Refresh the library statistics data when Tautulli starts.</p>
</div>

<div class="padded-header">
<h3>Plex.tv Authentication</h3>
</div>
Expand Down