Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/serverinfo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-08-18 16:33:27 +0300
committerGitHub <noreply@github.com>2016-08-18 16:33:27 +0300
commit0a11424d1a7b351e7a53c2521b04293984ee271c (patch)
treee94e5dc96ecf43ac3b5ae11154e1a97b3fa43621
parent21be086487bc6784be845cecd71bdf50e70b42c6 (diff)
parent07d843888beedad88d6bfd460f8ac7f503209318 (diff)
Merge pull request #33 from nextcloud/stable10-backport-32
[stable10] Properly handle not available memory information
-rw-r--r--js/script.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/js/script.js b/js/script.js
index 2bc64e1..9239ed3 100644
--- a/js/script.js
+++ b/js/script.js
@@ -76,6 +76,11 @@
}
function updateMemoryStatistics (memTotal, memFree) {
+ if (memTotal === 'N/A' || memFree === 'N/A') {
+ $('#memFooterInfo').text(t('serverinfo', 'Memory info not available'));
+ $('#memorycanvas').addClass('hidden');
+ return;
+ }
var memTotalBytes = memTotal * 1024,
memUsageBytes = (memTotal - memFree) * 1024,