summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-status/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2019-11-03 12:03:13 +0100
committerGitHub <noreply@github.com>2019-11-03 12:03:13 +0100
commit6c7b1e156d8a3342864a5e5e03a8331f6819109f (patch)
tree0fd59007c6ed2dc3a19ddcd6271652110e80e14f /modules/luci-mod-status/htdocs/luci-static/resources
parentaa5151e2d1720ea2c815d1d28c910f7274d77a0f (diff)
parentb436eb0545c710a3f0490a8721f78f4dc97a4144 (diff)
Merge pull request #2672 from ZachCook/feature_status_add_available_cached
luci-mod-status: use available and cached memory for progress bars
Diffstat (limited to 'modules/luci-mod-status/htdocs/luci-static/resources')
-rw-r--r--modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/20_memory.js5
1 files changed, 4 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 9baf0420d7..2e84774346 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
@@ -31,11 +31,14 @@ return L.Class.extend({
swap = L.isObject(systeminfo.swap) ? systeminfo.swap : {};
var fields = [
- _('Total Available'), (mem.total && mem.free && mem.buffered) ? mem.free + mem.buffered : null,
+ _('Total Available'), (mem.available) ? mem.available : (mem.total && mem.free && mem.buffered) ? mem.free + mem.buffered : null,
_('Free'), (mem.total && mem.free) ? mem.free : null,
_('Buffered'), (mem.total && mem.buffered) ? mem.buffered : null
];
+ if (mem.cached)
+ fields.push(_('Cached'), mem.cached);
+
if (swap.total > 0)
fields.push(_('Swap free'), swap.free);