<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008-2011 Jo-Philipp Wich <xm@subsignal.org>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
+ Copyright 2008 Steven Barth <steven@midlink.org>
+ Copyright 2008-2011 Jo-Philipp Wich <jow@openwrt.org>
+ Licensed to the public under the Apache License 2.0.
-%>
<%
- local fs = require "luci.fs"
+ local fs = require "nixio.fs"
local sys = require "luci.sys"
local util = require "luci.util"
local http = require "luci.http"
local disp = require "luci.dispatcher"
+ local version = require "luci.version"
local sysinfo = util.ubus("system", "info") or { }
local loadinfo = sysinfo.load or { 0, 0, 0 }
local banner = false
local show_comm = true
- local lo = fs.glob("/www/luci-static/resources/custom_logo.*")
- if lo[1] then
- logo = string.gsub(lo[1], "/www", "")
+ local file
+ for file in fs.glob("/www/luci-static/resources/custom_logo.*") do
+ logo = string.gsub(file, "/www", "")
+ break
end
- local lon = fs.glob("/www/luci-static/resources/custom_logo_only.*")
- if lon[1] then
- logo = string.gsub(lon[1], "/www", "")
+ for file in fs.glob("/www/luci-static/resources/custom_logo_only.*") do
+ logo = string.gsub(file, "/www", "")
show_comm = false
+ break
end
- local hea = fs.glob("/www/luci-static/resources/custom_header.*")
- if hea[1] then
- logo = string.gsub(hea[1], "/www", "")
+ for file in fs.glob("/www/luci-static/resources/custom_header.*") do
+ logo = string.gsub(file, "/www", "")
show_comm = false
banner = true
end
<%end%>
</div>
<div class="header_right">
- <%=luci.version.distversion%><br />
- <%:Load%>: <%="%.2f" % loadinfo[1] / 65535.0%> <%="%.2f" % loadinfo[2] / 65535.0%> <%="%.2f" % loadinfo[3] / 65535.0%><br />
+ <%=version.distversion%><br />
+ <%:Load%>: <%="%.2f" % (loadinfo[1] / 65535.0)%> <%="%.2f" % (loadinfo[2] / 65535.0)%> <%="%.2f" % (loadinfo[3] / 65535.0)%><br />
<%:Hostname%>: <%=boardinfo.hostname or "?"%><br />
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
<%:Auto Refresh%>:
<% if category ~= "freifunk" and category ~= "splash" then %>
<noscript>
<div class="errorbox">
- <strong><%:Java Script required!%></strong><br />
- <%:You must enable Java Script in your browser or LuCI will not work properly.%>
+ <strong><%:JavaScript required!%></strong><br />
+ <%:You must enable JavaScript in your browser or LuCI will not work properly.%>
</div>
</noscript>
<% end %>