From e32761292f0c24a79b496f4be202f7afdeccc0c5 Mon Sep 17 00:00:00 2001 From: pedro Date: Tue, 19 Nov 2024 17:31:50 +0100 Subject: [PATCH] GUI: QoS: Classification: use ajax to refresh info on page; also fix commit 77cb5c9 --- .../router/www/qos-classify.asp | 58 +++++++++++-------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/release/src-rt-6.x.4708/router/www/qos-classify.asp b/release/src-rt-6.x.4708/router/www/qos-classify.asp index 676859f830..5e05a019f7 100644 --- a/release/src-rt-6.x.4708/router/www/qos-classify.asp +++ b/release/src-rt-6.x.4708/router/www/qos-classify.asp @@ -14,6 +14,7 @@ [<% ident(); %>] QoS: Classification <% css(); %> + @@ -23,26 +24,28 @@ // <% layer7(); %> +function show() { + elem.setInnerHTML('notice_container', '
'+isup.notice_iptables.replace(/\n/g, '
')+'<\/div>
'); + elem.display('notice_container', isup.notice_iptables != ''); +} + var abc = nvram.qos_classnames.split(' '); if (nvram.qos_mode == 2) { - var position; - if (nvram.qos_cake_prio_mode == 1 || nvram.qos_cake_prio_mode == 4) { - position = 7; - } - else if (nvram.qos_cake_prio_mode == 2) { - position = 3; - } - else if (nvram.qos_cake_prio_mode == 3) { - position = 2; - } + var position; + if (nvram.qos_cake_prio_mode == 1 || nvram.qos_cake_prio_mode == 4) + position = 7; + else if (nvram.qos_cake_prio_mode == 2) + position = 3; + else if (nvram.qos_cake_prio_mode == 3) + position = 2; + for (var i = 0; i < position + 1; i++) { - var p = i+1; - abc[i] = 'Priority '+p; - } - for (var i = position + 1; i < abc.length; i++) { - abc[i] = '- unused -'; - } + var p = i+1; + abc[i] = 'Priority '+p; + } + for (var i = position + 1; i < abc.length; i++) + abc[i] = '- unused -'; } var ipp2p = [[0,'IPP2P (disabled)'],[0xFFF,'All IPP2P filters'],[1,'AppleJuice'],[2,'Ares'],[4,'BitTorrent'],[8,'Direct Connect'], @@ -261,11 +264,10 @@ qosg.enDiFields = function(row) { f[3].disabled = x; if (f[3].selectedIndex == 0) x = 1; - f[4].disabled = x; + f[4].disabled = x; f[6].disabled = (f[5].selectedIndex != 0); f[5].disabled = (f[6].selectedIndex != 0); - f[8].disabled = (f[7].value != '*'); } @@ -359,6 +361,7 @@ function save() { function init() { qosg.recolor(); + up.initPage(250, 5); } @@ -387,16 +390,25 @@ function init() { if (nvram.qos_enable != '1') W('