From: Fritz D. Ansel Date: Mon, 2 Aug 2021 18:20:37 +0000 (+0200) Subject: status: make buffered conditional X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=61425793a78ea60b564f9767b60b001da0e4cc96;p=project%2Fluci.git 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 --- 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);