2 Copyright
2008 Steven Barth
<steven@midlink.org
>
3 Copyright
2008-
2018 Jo-Philipp Wich
<jo@mein.io
>
4 Licensed to the public under the Apache License
2.0.
8 local sysinfo = luci.util.ubus(
"system",
"info") or { }
9 local has_swap = sysinfo.swap and sysinfo.swap.total
> 0 or false
12 <div class=
"cbi-section">
15 <div class=
"table" width=
"100%">
16 <div class=
"tr"><div class=
"td left" width=
"33%"><%:Total Available%
></div><div class=
"td left"><div id=
"memtotal" class=
"cbi-progressbar" title=
"-"><div></div></div></div></div>
17 <div class=
"tr"><div class=
"td left" width=
"33%"><%:Free%
></div><div class=
"td left"><div id=
"memfree" class=
"cbi-progressbar" title=
"-"><div></div></div></div></div>
18 <div class=
"tr"><div class=
"td left" width=
"33%"><%:Buffered%
></div><div class=
"td left"><div id=
"membuff" class=
"cbi-progressbar" title=
"-"><div></div></div></div></div>
22 <% if has_swap then %
>
23 <div class=
"cbi-section">
26 <div class=
"table" width=
"100%">
27 <div class=
"tr"><div class=
"td left" width=
"33%"><%:Total Available%
></div><div class=
"td left"><div id=
"swaptotal" class=
"cbi-progressbar" title=
"-"><div></div></div></div></div>
28 <div class=
"tr"><div class=
"td left" width=
"33%"><%:Free%
></div><div class=
"td left"><div id=
"swapfree" class=
"cbi-progressbar" title=
"-"><div></div></div></div></div>