From 61425793a78ea60b564f9767b60b001da0e4cc96 Mon Sep 17 00:00:00 2001 From: "Fritz D. Ansel" Date: Mon, 2 Aug 2021 20:20:37 +0200 Subject: 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 --- .../htdocs/luci-static/resources/view/status/include/20_memory.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/luci-mod-status/htdocs/luci-static/resources/view/status') 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); -- cgit v1.2.3