1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Menu name via setting and typo fix

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-11-22 15:51:31 +01:00
parent 89c036b6f5
commit 937872e05c
6 changed files with 42 additions and 26 deletions

View file

@ -31,6 +31,10 @@
-- * Many tests
-%>
<%+header%>
<%
local ucic = luci.model.uci.cursor()
menuentry = ucic:get("openmptcprouter","settings","menu") or "openmptcprouter"
%>
<link rel="stylesheet" type="text/css" href="<%=resource%>/openmptcprouter/css/wanstatus.css?v=git-20"/>
<script type="text/javascript" src="<%=resource%>/seedrandom.js?v=git-20"></script>
<script type="text/javascript" src="<%=resource%>/cbi.js?v=git-20"></script>
@ -48,7 +52,7 @@
}
}
function formatBytes(a,b=2){if(0===a)return"0 Bytes";const c=0>b?0:b,d=Math.floor(Math.log(a)/Math.log(1024));return parseFloat((a/Math.pow(1024,d)).toFixed(c))+" "+["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"][d]}
XHR.poll(20, '<%=build_url("admin/system/openmptcprouter/interfaces_status")%>', null,
XHR.poll(20, '<%=build_url("admin/system/" .. menuentry:lower() .. "/interfaces_status")%>', null,
function(x, mArray)
{
var status = document.getElementById('openmptcprouter_status');
@ -218,7 +222,7 @@
temp += '</td></tr>';
temp += '<tr><td><div class="vertdash" ></div></td></tr>';
temp += '<tr><td>';
temp += '<a href="<%=url('admin/system/openmptcprouter/wizard')%>" id="omr-vps">';
temp += '<a href="<%=url('admin/system/' .. menuentry:lower() .. '/wizard')%>" id="omr-vps">';
var statusIcon = "<%=resource%>/openmptcprouter/images/statusOK.png";
var equipmentIcon = '<img src="<%=resource%>/server.png" />';
content = "";