From 58196720a1e513bef93dc60c6bdb37c538034bbc Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 23 Sep 2020 09:49:05 +0200 Subject: [PATCH] Graph data URL as setting --- luci-app-mptcp/luasrc/view/mptcp/multipath.htm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/luci-app-mptcp/luasrc/view/mptcp/multipath.htm b/luci-app-mptcp/luasrc/view/mptcp/multipath.htm index ec781bac5..5df6ddd81 100644 --- a/luci-app-mptcp/luasrc/view/mptcp/multipath.htm +++ b/luci-app-mptcp/luasrc/view/mptcp/multipath.htm @@ -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;