Developing lightweight computation at the DSG edge

Commit c2d399a5 authored by conxuro's avatar conxuro
Browse files

Added version to web interface and some changes

parent 66afc778
......@@ -48,60 +48,64 @@ function index()
---------------------------
--- neighbours/descriptions (default)
entry(place,call("action_neighbours_j"),place[#place])
entry(place,call("action_neighbours_j"),place[#place], 3)
table.insert(place,"neighbours_js")
entry(place, call("action_neighbours_j"), "Nodes", 1)
table.remove(place)
table.insert(place,"neighbours_nojs")
entry(place, call("action_neighbours"), nil)
table.remove(place)
--- status (this is default one)
--- status
table.insert(place,"Status")
entry(place,call("action_status"),"Status")
entry(place,call("action_status"),"Status", 2)
table.remove(place)
--- links
table.insert(place,"Links")
entry(place,call("action_links"),"Links").leaf = true
entry(place,call("action_links"),"Links", 3).leaf = true
table.remove(place)
-- Gateways
table.insert(place,"Gateways")
entry(place,call("action_gateways_j"),"Gateways").leaf = true
entry(place,call("action_gateways_j"),"Gateways", 4).leaf = true
table.remove(place)
--- chat
table.insert(place,"Chat")
entry(place,call("action_chat"),"Chat")
entry(place,call("action_chat"),"Chat", 5)
table.remove(place)
--- Graph
table.insert(place,"Graph")
entry(place, template("bmx6/graph"), "Graph")
entry(place, template("bmx6/graph"), "Graph", 6)
table.remove(place)
--- Topology (hidden)
table.insert(place,"topology")
entry(place, call("action_topology"), nil)
entry(place, call("action_topology"), nil, 7)
table.remove(place)
--- configuration (CBI)
table.insert(place,"Configuration")
entry(place, cbi("bmx6/main"), "Configuration").dependent=false
table.insert(place,"Advanced")
entry(place, cbi("bmx6/advanced"), "Advanced")
table.remove(place)
entry(place, cbi("bmx6/main"), "Configuration", 8).dependent=false
table.insert(place,"Interfaces")
entry(place, cbi("bmx6/interfaces"), "Interfaces")
entry(place, cbi("bmx6/interfaces"), "Interfaces", 1)
table.remove(place)
table.insert(place,"Plugins")
entry(place, cbi("bmx6/plugins"), "Plugins")
entry(place, cbi("bmx6/plugins"), "Plugins", 2)
table.remove(place)
table.insert(place,"HNA")
entry(place, cbi("bmx6/hna"), "HNA")
entry(place, cbi("bmx6/hna"), "HNA", 3)
table.remove(place)
table.insert(place,"Advanced")
entry(place, cbi("bmx6/advanced"), "Advanced", 4)
table.remove(place)
table.remove(place)
......
......@@ -16,6 +16,6 @@ $Id: footer.htm 7810 2011-10-28 15:15:27Z jow $
</div>
</div>
<p class="luci">Powered by <%= luci.__appname__ .. " (" .. luci.__version__ .. ")" %></p>
<p class="luci">qMp - Powered by <%= luci.__appname__ .. " (" .. luci.__version__ .. ")" %></p>
</body>
</html>
......@@ -13,10 +13,14 @@ $Id: header.htm 7810 2011-10-28 15:15:27Z jow $
-%>
<%
package.path = package.path .. ";/etc/qmp/?.lua"
local sys = require "luci.sys"
local http = require "luci.http"
local disp = require "luci.dispatcher"
local qmp = require "qmpinfo"
local qmpheader = "qMp "..qmp.get_version("branch").." r."..qmp.get_version("revision")..string.sub(qmp.get_version("build"),1,8)
local hostname = sys.hostname()
local load1, load5, load15 = sys.loadavg()
......@@ -63,6 +67,7 @@ $Id: header.htm 7810 2011-10-28 15:15:27Z jow $
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="shortcut icon" href="/luci-static/qmp/favicon.ico" />
<link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/cascade.css" />
<!--[if IE 6]><link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/ie6.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/ie7.css" /><![endif]-->
......@@ -79,7 +84,7 @@ $Id: header.htm 7810 2011-10-28 15:15:27Z jow $
<span id="skiplink2"><a href="#content"><%:Skip to content%></a></span>
</p>
<div class="hostinfo">
<%=hostname%> | <%=luci.version.distversion%> |
<%=hostname%> | <%=qmpheader%> | <%=luci.version.distversion%> |
<%:Load%>: <%="%.2f" % load1%> <%="%.2f" % load5%> <%="%.2f" % load15%>
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
| <%:Auto Refresh%>:
......@@ -89,7 +94,7 @@ $Id: header.htm 7810 2011-10-28 15:15:27Z jow $
</div>
<div id="header">
<div class="banner" style="background-color: #000; display: block; clear: both; height: 58px;">
<div style="float:left;padding-left:24px"><a href="http://qmp.cat"><img src="/luci-static/qmp/qmp_small.png" height="45px" alt="qMp" style="padding: 5px;" border="0"/></a></div>
<div style="float:left;padding-left:24px"><a href="http://qmp.cat" target="_blank"><img src="/luci-static/qmp/qmp_small.png" height="45px" alt="qMp" style="padding: 5px;" border="0"/></a></div>
<div style="float:left; padding-top:20px;padding-left:5px;color:#ff9900"><h2>Quick Mesh Project</h2></div>
</div>
</div>
......
......@@ -45,8 +45,9 @@ function index()
entry({"qmp","configuration","node"}, cbi("qmp/node"), "Node", 4).dependent=false
entry({"qmp","tools"}, call("action_tools"), "Tools", 5).dependent=false
entry({"qmp","tools","splash"}, call("action_splash"), "Splash", 1).dependent=false
entry({"qmp","tools","map"}, call("action_map"), "Map", 2).dependent=false
entry({"qmp","tools","tools"}, call("action_tools"), "Tools", 1).dependent=false
entry({"qmp","tools","splash"}, call("action_splash"), "Splash", 2).dependent=false
entry({"qmp","tools","map"}, call("action_map"), "Map", 3).dependent=false
entry({"qmp","about"}, call("action_status"), "About", 9).dependent=false
end
......@@ -57,8 +58,9 @@ function action_status()
local ipv4 = qmp.get_ipv4()
local hostname = qmp.get_hostname()
local uname = qmp.get_uname()
local version = qmp.get_version()
luci.template.render("qmp/overview",{ipv4=ipv4,hostname=hostname,uname=uname})
luci.template.render("qmp/overview",{ipv4=ipv4,hostname=hostname,uname=uname,version=version})
end
function action_tools()
......
......@@ -2,7 +2,7 @@
<div align="center">
<img src="/luci-static/resources/qmp/logo.png" />
<a href="http://qmp.cat" target="_blank"><img src="/luci-static/resources/qmp/logo.png" /></a>
</div>
<h2>About qMp</h2>
......@@ -12,7 +12,7 @@
<li>It is a fast and reliable way to extend an Internet uplink to end-users</li>
</ul>
<br />
<p>Visit our web page for more information: <a href="http://qmp.cat" target="_blank">qmp.cat</a> </p>
<p>Visit our web page for more information: <a href="http://qmp.cat" target="_blank">http://qmp.cat</a> </p>
<h2>About this device</h2>
<p>
......@@ -23,6 +23,10 @@
<strong>System:</strong> <%=uname%>
</p>
<p>
<strong>Version:</strong> <%=string.sub(version,2,-3)%>
</p>
<p>
<strong>IPv4 addresses</strong>
<ul>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment