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 --- .../luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'themes/luci-theme-bootstrap/luasrc') diff --git a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm index 12818cbc5f..2df3386b52 100644 --- a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm +++ b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm @@ -13,10 +13,11 @@ You may obtain a copy of the License at -%> <% 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 boardinfo = util.ubus("system", "board") local request = disp.context.path local request2 = disp.context.request @@ -100,7 +101,7 @@ You may obtain a copy of the License at - <%=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 @@ -119,7 +120,7 @@ You may obtain a copy of the License at
- <%=hostname%> + <%=boardinfo.hostname or "?"%>