diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-03-04 02:41:32 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-03-04 02:41:32 +0000 |
commit | f9780f645bc94f2f79fc4e266e671d15232d4b9d (patch) | |
tree | ba25e6d23f9a89891d4a01c5d1ffe4c59718c914 /health-model.lua | |
parent | b0f4fadb7b62297b6dbd574b2a7d8eee0f990eb4 (diff) | |
download | acf-alpine-baselayout-f9780f645bc94f2f79fc4e266e671d15232d4b9d.tar.bz2 acf-alpine-baselayout-f9780f645bc94f2f79fc4e266e671d15232d4b9d.tar.xz |
Change HTML views to use htmlviewfunctions.displayheader
Modified some models to change labels
Diffstat (limited to 'health-model.lua')
-rw-r--r-- | health-model.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/health-model.lua b/health-model.lua index 424a0e4..9398b14 100644 --- a/health-model.lua +++ b/health-model.lua @@ -65,7 +65,7 @@ mymodule.get_system = function (self) system.memory.free = math.floor(100 * meminfo["MemFree"] / meminfo["MemTotal"]) system.memory.buffers = math.floor(100 * (meminfo["Buffers"] + meminfo["Cached"]) / meminfo["MemTotal"]) system.memory.used = 100 - math.floor(100 * (meminfo["MemFree"] + meminfo["Buffers"] + meminfo["Cached"]) / meminfo["MemTotal"]) - return cfe({ type="group", value=system }) + return cfe({ type="group", value=system, label="System" }) end mymodule.get_storage = function (self) @@ -105,7 +105,7 @@ mymodule.get_storage = function (self) end end storage.partitions = cfe({ value=fs.read_file("/proc/partitions") or "", label="Partitions" }) - return cfe({ type="group", value=storage }) + return cfe({ type="group", value=storage, label="Storage" }) end mymodule.get_network = function (self) @@ -113,18 +113,18 @@ mymodule.get_network = function (self) network.interfaces = cfe({ value=querycmd("ip addr"), label="Interfaces" }) network.routes = cfe({ value=querycmd("ip route"), label="Routes" }) network.tunnel = cfe({ value=querycmd("ip tunnel"), label="Tunnels" }) - return cfe({ type="group", value=network }) + return cfe({ type="group", value=network, label="Network" }) end mymodule.get_proc = function (self) local proc = {} proc.processor = cfe({ value=fs.read_file("/proc/cpuinfo") or "", label="Processor" }) proc.memory = cfe({ value=fs.read_file("/proc/meminfo") or "", label="Memory" }) - return cfe({ type="group", value=proc }) + return cfe({ type="group", value=proc, label="Hardware Information" }) end mymodule.get_networkstats = function () - local stats = cfe({ type="structure", value={}, label="Network Stats", timestamp=os.time() }) + local stats = cfe({ type="structure", value={}, label="Network Statistics", timestamp=os.time() }) local result = fs.read_file("/proc/net/dev") or "" -- parse the result local i=0 |