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

Graph data URL as setting

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-09-23 09:49:05 +02:00
parent c0564e34ad
commit 58196720a1

View file

@ -3,9 +3,9 @@
-- Copyright 2015 OVH (OverTheBox@ovh.net)
-- Simon Lelievre (simon.lelievre@corp.ovh.com)
-- Sebastien Duponcheel (sebastien.duponcheel@ovh.net)
-- Copyright 2018-2020 Ycarus - Yannick Chabanois (ycarus@zugaina.org)
-- Copyright 2018-2020 Ycarus - Yannick Chabanois (ycarus@zugaina.org) for OpenMPTCProuter
--
-- This file is part of OverTheBox for OpenWrt.
-- Part of this file come from OverTheBox for OpenWrt.
--
-- OverTheBox is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@ -45,6 +45,9 @@
end
local curifname = luci.http.formvalue("dev") or "all"
local bandwidthtotalurl = "admin/network/mptcp/multipath_bandwidth"
local bandwidthintfurl = "admin/network/mptcp/interface_bandwidth"
-%>
<%+header%>
@ -246,7 +249,7 @@
labelup_scale.innerHTML = String.format('<%:(%d minutes window, %d seconds interval)%>', 3, data_wanted / 60);
/* render datasets, start update interval */
XHR.poll(3, '<%=build_url("admin/network/mptcp/multipath_bandwidth", all)%>', null,
XHR.poll(3, '<%=build_url(bandwidthtotalurl, all)%>', null,
function(x, dataarray)
{
var data_max_dnl = 0;
@ -779,7 +782,7 @@
label_scale.innerHTML = String.format('<%:(%d minute window, %d second interval)%>', data_wanted / 60, 3);
/* render datasets, start update interval */
XHR.poll(3, '<%=build_url("admin/network/mptcp/interface_bandwidth", curifname)%>', null,
XHR.poll(3, '<%=build_url(bandwidthintfurl, curifname)%>', null,
function(x, data)
{
var data_max = 0;