summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/20_memory.js14
1 files changed, 7 insertions, 7 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 2e84774346..b2ebdec710 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,24 +31,24 @@ return L.Class.extend({
swap = L.isObject(systeminfo.swap) ? systeminfo.swap : {};
var fields = [
- _('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
+ _('Total Available'), (mem.available) ? mem.available : (mem.total && mem.free && mem.buffered) ? mem.free + mem.buffered : null, mem.total,
+ _('Free'), (mem.total && mem.free) ? mem.free : null, mem.total,
+ _('Buffered'), (mem.total && mem.buffered) ? mem.buffered : null, mem.total
];
if (mem.cached)
- fields.push(_('Cached'), mem.cached);
+ fields.push(_('Cached'), mem.cached, mem.total);
if (swap.total > 0)
- fields.push(_('Swap free'), swap.free);
+ fields.push(_('Swap free'), swap.free, swap.total);
var table = E('div', { 'class': 'table' });
- for (var i = 0; i < fields.length; i += 2) {
+ for (var i = 0; i < fields.length; i += 3) {
table.appendChild(E('div', { 'class': 'tr' }, [
E('div', { 'class': 'td left', 'width': '33%' }, [ fields[i] ]),
E('div', { 'class': 'td left' }, [
- (fields[i + 1] != null) ? progressbar(fields[i + 1], mem.total, true) : '?'
+ (fields[i + 1] != null) ? progressbar(fields[i + 1], fields[i + 2], true) : '?'
])
]));
}