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-bootstrap | |
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-bootstrap')
-rw-r--r-- | themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm | 7 |
1 files changed, 4 insertions, 3 deletions
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 12818cbc5..2df3386b5 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 <html lang="<%=luci.i18n.context.lang%>"> <head> <meta charset="utf-8"> - <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 9]><script src="<%=media%>/html5.js"></script><![endif]--> <meta name="viewport" content="initial-scale=1.0"> <link rel="stylesheet" href="<%=media%>/cascade.css"> @@ -119,7 +120,7 @@ You may obtain a copy of the License at <header> <div class="fill"> <div class="container"> - <a class="brand" href="#"><%=hostname%></a> + <a class="brand" href="#"><%=boardinfo.hostname or "?"%></a> <ul class="nav"> <%- local function submenu(prefix, node) |