diff options
author | Fritz D. Ansel <fdansel@yandex.ru> | 2021-08-02 20:20:37 +0200 |
---|---|---|
committer | Fritz D. Ansel <fdansel@yandex.ru> | 2021-08-11 09:25:48 +0200 |
commit | 61425793a78ea60b564f9767b60b001da0e4cc96 (patch) | |
tree | dbd5a7fce62f3c27c11366d320bef5ff00220630 /modules/luci-mod-status/htdocs/luci-static/resources/view/status | |
parent | b5af813318316e26592971c73a10a455493de7d5 (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.js | 4 |
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); |