diff options
author | Frank Karlitschek <karlitschek@gmx.de> | 2019-04-01 00:59:20 +0300 |
---|---|---|
committer | Frank Karlitschek <karlitschek@gmx.de> | 2019-04-01 00:59:20 +0300 |
commit | bc1ac0b7450a97ad3f195f1cf6c797c55224dfc0 (patch) | |
tree | 713f9ef702a895ef6794aa35080254cba8435034 /js | |
parent | b8bdeb75da876b97ba243ffbae0724d6305dc6d1 (diff) |
handle case where theming is not enabled. Fixing permissions
Diffstat (limited to 'js')
-rw-r--r--[-rwxr-xr-x] | js/script.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/script.js b/js/script.js index cdf42ba..56a66f0 100755..100644 --- a/js/script.js +++ b/js/script.js @@ -30,7 +30,7 @@ $(document).ready(function () { var x = document.getElementById('rambox'); - x.style.backgroundColor = OCA.Theming.color; + x.style.backgroundColor = OCA.Theming ? OCA.Theming.color : 'rgb(54, 129, 195)'; var x = document.getElementById('swapbox'); x.style.backgroundColor = 'rgba(100, 100, 100, 0.8)'; @@ -91,7 +91,7 @@ }); cpuLoadChart.streamTo(document.getElementById("cpuloadcanvas"), 1000/*delay*/); cpuLoadLine = new TimeSeries(); - cpuLoadChart.addTimeSeries(cpuLoadLine, { lineWidth: 1, strokeStyle: 'rgb(180, 180, 180)', fillStyle: OCA.Theming.color }); + cpuLoadChart.addTimeSeries(cpuLoadLine, { lineWidth: 1, strokeStyle: 'rgb(180, 180, 180)', fillStyle: OCA.Theming ? OCA.Theming.color : 'rgb(54, 129, 195)' }); } $('#cpuFooterInfo').text(t('serverinfo', 'Load average')+": "+cpu1+" ("+t('serverinfo', 'Last minute')+")"); @@ -135,7 +135,7 @@ }); memoryUsageChart.streamTo(document.getElementById("memorycanvas"), 1000/*delay*/); memoryUsageLine = new TimeSeries(); - memoryUsageChart.addTimeSeries(memoryUsageLine, {lineWidth:1, strokeStyle:'rgb(180, 180, 180)', fillStyle:OCA.Theming.color}); + memoryUsageChart.addTimeSeries(memoryUsageLine, {lineWidth:1, strokeStyle:'rgb(180, 180, 180)', fillStyle:OCA.Theming ? OCA.Theming.color : 'rgb(54, 129, 195)'}); swapUsageLine = new TimeSeries(); memoryUsageChart.addTimeSeries(swapUsageLine, {lineWidth:1, strokeStyle:'rgb(100, 100, 100)', fillStyle:'rgba(100, 100, 100, 0.2)'}); } @@ -360,7 +360,7 @@ $(document).ready(function(){ datasets : [ { backgroundColor: [ - OCA.Theming.color, + OCA.Theming ? OCA.Theming.color : 'rgb(54, 129, 195)', 'rgb(249, 249, 249)', ], borderWidth: 0, |