mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Use buildurl for status
This commit is contained in:
parent
50fea5b815
commit
698e52c243
1 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@
|
||||||
-- along with OverTheBox. If not, see (http://www.gnu.org/licenses/)
|
-- along with OverTheBox. If not, see (http://www.gnu.org/licenses/)
|
||||||
-%>
|
-%>
|
||||||
<%
|
<%
|
||||||
-- Copyright 2018 Ycarus (Yannick Chabanois) ycarus@zugaina.org
|
-- Copyright 2018-2020 Ycarus (Yannick Chabanois) ycarus@zugaina.org for OpenMPTCProuter
|
||||||
--
|
--
|
||||||
-- Small changes to make this work with OpenMPTCProuter
|
-- Small changes to make this work with OpenMPTCProuter
|
||||||
-- New features:
|
-- New features:
|
||||||
|
@ -48,7 +48,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]}
|
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, '/cgi-bin/luci/admin/system/openmptcprouter/interfaces_status', null,
|
XHR.poll(20, '<%=build_url("admin/system/openmptcprouter/interfaces_status")%>', null,
|
||||||
function(x, mArray)
|
function(x, mArray)
|
||||||
{
|
{
|
||||||
var status = document.getElementById('openmptcprouter_status');
|
var status = document.getElementById('openmptcprouter_status');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue