diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-01-15 14:26:27 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-01-15 14:26:27 +0100 |
commit | bfbc7f4bdf6b60edf9d52d995c14d156d8349757 (patch) | |
tree | 6ae65cbaf01f8b2101594ad78c20edd1adefc251 /themes/luci-theme-freifunk-bno/luasrc | |
parent | 64d0031233a7e1b7e4df71953bc0fa72462e6bf5 (diff) |
themes: eliminate uses of luci.sys.loadavg()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'themes/luci-theme-freifunk-bno/luasrc')
-rw-r--r-- | themes/luci-theme-freifunk-bno/luasrc/view/themes/freifunk-bno/header.htm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/themes/luci-theme-freifunk-bno/luasrc/view/themes/freifunk-bno/header.htm b/themes/luci-theme-freifunk-bno/luasrc/view/themes/freifunk-bno/header.htm index 5099d186fe..790dbb00b5 100644 --- a/themes/luci-theme-freifunk-bno/luasrc/view/themes/freifunk-bno/header.htm +++ b/themes/luci-theme-freifunk-bno/luasrc/view/themes/freifunk-bno/header.htm @@ -14,13 +14,15 @@ $Id$ -%> <% require("luci.sys") -local load1, load5, load15 = luci.sys.loadavg() +require("luci.util") + +local boardinfo = luci.util.ubus("system", "board") + local request = require("luci.dispatcher").context.path local category = request[1] local tree = luci.dispatcher.node() local cattree = category and luci.dispatcher.node(category) local node = luci.dispatcher.context.dispatched -local hostname = luci.sys.hostname() local c = tree for i,r in ipairs(request) do @@ -48,7 +50,7 @@ require("luci.http").prepare_content("text/html") <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" /> <meta http-equiv="content-script-type" content="text/javascript" /> <script type="text/javascript" src="<%=resource%>/xhr.js"></script> - <title><%=striptags( hostname .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title> + <title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title> <!--[if lt IE 7]> <script type="text/javascript"> |