From bfbc7f4bdf6b60edf9d52d995c14d156d8349757 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 15 Jan 2015 14:26:27 +0100 Subject: themes: eliminate uses of luci.sys.loadavg() Signed-off-by: Jo-Philipp Wich --- .../luasrc/view/themes/freifunk-bno/header.htm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'themes/luci-theme-freifunk-bno/luasrc') 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") - <%=striptags( hostname .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI + <%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI