diff --git a/res/include/script/admin.js b/res/include/script/admin.js index 33d7402..5f97413 100644 --- a/res/include/script/admin.js +++ b/res/include/script/admin.js @@ -117,13 +117,22 @@ function loadGraph(minutes, interval, live){ window.graph.data.datasets[0].data = resp.downloads; window.graph.data.datasets[1].data = resp.views; window.graph.update(); + + document.getElementById("time_start").innerText = resp.labels[0]; + document.getElementById("time_end").innerText = resp.labels.slice(-1)[0]; + let total = 0 + resp.downloads.forEach(e => { total += e; }); + document.getElementById("total_bandwidth").innerText = formatDataVolume(total, 3); + total = 0 + resp.views.forEach(e => { total += e; }); + document.getElementById("total_views").innerText = formatThousands(total); } }).catch(e => { alert("Error requesting time series: "+e); }) } -loadGraph(60, 1, true); +loadGraph(1440, 10, true); // Load performance statistics diff --git a/res/include/script/file_viewer/Viewer.js b/res/include/script/file_viewer/Viewer.js index d0f0e24..d161904 100644 --- a/res/include/script/file_viewer/Viewer.js +++ b/res/include/script/file_viewer/Viewer.js @@ -21,7 +21,7 @@ function Viewer(type, viewToken, data) { // On small screens the toolbar takes too much space, so it collapses // automatically - if (this.divFilepreview.clientWidth > 600 && !this.toolbar.visible) { + if (this.divFilepreview.clientWidth > 800 && !this.toolbar.visible) { this.toolbar.toggle() } diff --git a/res/include/style/viewer.css b/res/include/style/viewer.css index d9d916f..49b4b9d 100644 --- a/res/include/style/viewer.css +++ b/res/include/style/viewer.css @@ -53,7 +53,7 @@ margin: -0.25em; margin-right: 0.2em; } -@media (max-width: 500px) { +@media (max-width: 600px) { .file_viewer > .file_viewer_headerbar > .button_home::after { content: "pd"; } diff --git a/res/template/admin.html b/res/template/admin.html index 1317f41..1cd6c9d 100644 --- a/res/template/admin.html +++ b/res/template/admin.html @@ -12,7 +12,8 @@ {{if $isAdmin}}

Bandwidth and views

- + + @@ -23,8 +24,12 @@
-
+
+ Total usage from to
+ bandwidth and views +
+
Update global settings

Database connection statistics