mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Fix language select, stat port index, devWalk polling, and duplicate BW command
This commit is contained in:
1 parent
774e04816e
commit
af4101f060
2 files changed
+14
-6
No files matched your search
+2
-2
@@ -250,7 +250,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="lcol"> <label for="lang-select" data-i18n="sys_language">Language:</label></div>
|
<div class="lcol"> <label for="lang-select" data-i18n="sys_language">Language:</label></div>
|
||||||
<div class="rcol">
|
<div class="rcol">
|
||||||
<select id="lang-select">
|
<select id="lang-select" onchange="changeLang()">
|
||||||
<option value="en">English</option>
|
<option value="en">English</option>
|
||||||
<option value="ja">日本語</option>
|
<option value="ja">日本語</option>
|
||||||
<option value="zh">中文</option>
|
<option value="zh">中文</option>
|
||||||
@@ -260,7 +260,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="lcol"> <label for="mgmtvlan" data-i18n="sys_mgmt_vlan">Management VLAN:</label></div>
|
<div class="lcol"> <label for="mgmtvlan" data-i18n="sys_mgmt_vlan">Management VLAN:</label></div>
|
||||||
<div class="rcol">
|
<div class="rcol">
|
||||||
<select id="mgmtvlan">
|
<select id="mgmtvlan" onchange="mgmtVlanChanged()">
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+12
-4
@@ -947,6 +947,10 @@ function clearSectionIntervals() {
|
|||||||
clearTimeout(l2Timer);
|
clearTimeout(l2Timer);
|
||||||
l2Timer = null;
|
l2Timer = null;
|
||||||
}
|
}
|
||||||
|
if (devTimer) {
|
||||||
|
clearTimeout(devTimer);
|
||||||
|
devTimer = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showSection(name) {
|
function showSection(name) {
|
||||||
@@ -1495,11 +1499,14 @@ function devRender(entries) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var devTimer = null;
|
||||||
function devWalk() {
|
function devWalk() {
|
||||||
walkL2(function(entries, ok) {
|
walkL2(function(entries, ok) {
|
||||||
if (ok)
|
if (ok)
|
||||||
devRender(entries);
|
devRender(entries);
|
||||||
setTimeout(devWalk, 15000);
|
var sec = document.getElementById('page-ports');
|
||||||
|
if (sec && sec.style.display === 'block')
|
||||||
|
devTimer = setTimeout(devWalk, 15000);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1717,7 +1724,7 @@ function fillStats() {
|
|||||||
td = tr.insertCell();td.appendChild(document.createTextNode(`${txB[i]}` + t('common_pkts')));
|
td = tr.insertCell();td.appendChild(document.createTextNode(`${txB[i]}` + t('common_pkts')));
|
||||||
td = tr.insertCell();td.appendChild(document.createTextNode(`${rxG[i]}` + t('common_pkts')));
|
td = tr.insertCell();td.appendChild(document.createTextNode(`${rxG[i]}` + t('common_pkts')));
|
||||||
td = tr.insertCell();td.appendChild(document.createTextNode(`${rxB[i]}` + t('common_pkts')));
|
td = tr.insertCell();td.appendChild(document.createTextNode(`${rxB[i]}` + t('common_pkts')));
|
||||||
var button = '<button type="button" style="margin: 0 0 0 24px" onclick="getCounters(' + i + ');">' + t('stat_show') + '</button>';
|
var button = '<button type="button" style="margin: 0 0 0 24px" onclick="getCounters(' + (i + 1) + ');">' + t('stat_show') + '</button>';
|
||||||
td = tr.insertCell(); td.innerHTML = button;
|
td = tr.insertCell(); td.innerHTML = button;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2496,9 +2503,10 @@ async function applyBandwidth(i) {
|
|||||||
cmd = 'bw in ' + (i-1) + ' ' + parseInt(document.getElementById("ibw_" + i).value).toString(16).padStart(4, "0");;
|
cmd = 'bw in ' + (i-1) + ' ' + parseInt(document.getElementById("ibw_" + i).value).toString(16).padStart(4, "0");;
|
||||||
doCMD(cmd);
|
doCMD(cmd);
|
||||||
if (document.getElementById("ilimit_port_" + i).checked) {
|
if (document.getElementById("ilimit_port_" + i).checked) {
|
||||||
if (!document.getElementById("fc_port_" + i).checked)
|
if (!document.getElementById("fc_port_" + i).checked) {
|
||||||
cmd = "bw in " + (i-1) + " drop";
|
cmd = "bw in " + (i-1) + " drop";
|
||||||
doCMD(cmd);
|
doCMD(cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var cmd = "bw out " + (i-1) + " off";
|
var cmd = "bw out " + (i-1) + " off";
|
||||||
if (document.getElementById("elimit_port_" + i).checked)
|
if (document.getElementById("elimit_port_" + i).checked)
|
||||||
|
|||||||
Reference in new issue
Block a user