summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-status/htdocs/luci-static/resources/view/status
diff options
context:
space:
mode:
authorFritz D. Ansel <fdansel@yandex.ru>2021-08-02 20:20:37 +0200
committerFritz D. Ansel <fdansel@yandex.ru>2021-08-11 09:25:48 +0200
commit61425793a78ea60b564f9767b60b001da0e4cc96 (patch)
treedbd5a7fce62f3c27c11366d320bef5ff00220630 /modules/luci-mod-status/htdocs/luci-static/resources/view/status
parentb5af813318316e26592971c73a10a455493de7d5 (diff)
status: make buffered conditional
when buffered could not be read, there is just a questionmark (on e8450 non-ubi) Signed-off-by: Fritz D. Ansel <fdansel@yandex.ru>
Diffstat (limited to 'modules/luci-mod-status/htdocs/luci-static/resources/view/status')
-rw-r--r--modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/20_memory.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/20_memory.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/20_memory.js
index 3e89578002..0a885c01c9 100644
--- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/20_memory.js
+++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/20_memory.js
@@ -34,9 +34,11 @@ return baseclass.extend({
var fields = [
_('Total Available'), (mem.available) ? mem.available : (mem.total && mem.free && mem.buffered) ? mem.free + mem.buffered : null, mem.total,
_('Used'), (mem.total && mem.free) ? (mem.total - mem.free) : null, mem.total,
- _('Buffered'), (mem.total && mem.buffered) ? mem.buffered : null, mem.total
];
+ if (mem.buffered)
+ fields.push(_('Buffered'), mem.buffered, mem.total);
+
if (mem.cached)
fields.push(_('Cached'), mem.cached, mem.total);