X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=themes%2Fluci-theme-freifunk-generic%2Fluasrc%2Fview%2Fthemes%2Ffreifunk-generic%2Fheader.htm;fp=themes%2Fluci-theme-freifunk-generic%2Fluasrc%2Fview%2Fthemes%2Ffreifunk-generic%2Fheader.htm;h=3eacf0a1e431aca5af3bbedd99641b30614b6386;hp=e8b1c062d1101fae0a2f9768b62ec9f03999ad79;hb=bfbc7f4bdf6b60edf9d52d995c14d156d8349757;hpb=64d0031233a7e1b7e4df71953bc0fa72462e6bf5 diff --git a/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm b/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm index e8b1c062d..3eacf0a1e 100644 --- a/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm +++ b/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm @@ -13,11 +13,13 @@ You may obtain a copy of the License at <% local fs = require "luci.fs" local sys = require "luci.sys" + local util = require "luci.util" local http = require "luci.http" local disp = require "luci.dispatcher" - local hostname = sys.hostname() - local load1, load5, load15 = sys.loadavg() + local sysinfo = util.ubus("system", "info") or { } + local loadinfo = sysinfo.load or { 0, 0, 0 } + local boardinfo = util.ubus("system", "board") or { } local request = disp.context.path local category = request[1] @@ -87,7 +89,7 @@ You may obtain a copy of the License at -<%=striptags( hostname .. ( (node and node.title) and ' - ' .. translate(tostring(node.title)) or '')) %> - LuCI +<%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(tostring(node.title)) or '')) %> - LuCI @@ -127,8 +129,8 @@ You may obtain a copy of the License at
<%=luci.version.distversion%>
- <%:Load%>: <%="%.2f" % load1%> <%="%.2f" % load5%> <%="%.2f" % load15%>
- <%:Hostname%>: <%=hostname%>
+ <%:Load%>: <%="%.2f" % loadinfo[1] / 65535.0%> <%="%.2f" % loadinfo[2] / 65535.0%> <%="%.2f" % loadinfo[3] / 65535.0%>
+ <%:Hostname%>: <%=boardinfo.hostname or "?"%>