mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Adding UI options to enable/disable LLDP
This commit is contained in:
1 parent
ccf541a06b
commit
cedc795b82
2 files changed
+11
-2
No files matched your search
+9
-2
@@ -77,7 +77,7 @@ sc_title:"Storm control",sc_h:"per port and traffic type, empty = off",sc_bcast:
|
||||
sc_ucast:"Unknown unicast",sc_umcast:"Unknown multicast",sc_err:"Storm limit must be 1-1048575 pps or 1-10000000 kbit/s",
|
||||
sc_note:"Frames of a type above its limit are dropped where they enter the switch.",
|
||||
sy_network:"Network",sy_dhcp:"Use DHCP",sy_dhcp_t:"Request address via DHCP",sy_services:"Services",
|
||||
sy_igmp:"IGMP snooping",sy_sysip:"server IP",sy_server:"Server",sy_port:"Port",
|
||||
sy_igmp:"IGMP snooping",sy_sysip:"server IP",sy_server:"Server",sy_port:"Port",sy_lldp:"LLDP",
|
||||
sy_sesstmo:"Session timeout (s)",sy_sesstmo_err:"Session timeout must be 1-65535 s",
|
||||
sy_services_note:"Service state reflects the startup config; runtime state is not readable.",
|
||||
sy_password:"Admin password",sy_newpw:"New password",sy_repeat:"Repeat",sy_pwapply:"Change password",
|
||||
@@ -1995,15 +1995,18 @@ function sysLoad(){
|
||||
cfgReload();
|
||||
}
|
||||
function cfgParseKnown(txt){
|
||||
var igmp=false,syslog=false;
|
||||
var igmp=false,lldp=false,syslog=false;
|
||||
txt.split(/\r?\n/).forEach(function(l){
|
||||
l=l.trim();
|
||||
if(/^igmp on$/.test(l))igmp=true;
|
||||
if(/^igmp off$/.test(l))igmp=false;
|
||||
if(/^lldp on$/.test(l))lldp=true;
|
||||
if(/^lldp off$/.test(l))lldp=false;
|
||||
if(/^syslog on$/.test(l))syslog=true;
|
||||
if(/^syslog off$/.test(l))syslog=false;
|
||||
});
|
||||
$("sy-igmp").checked=igmp;
|
||||
$("sy-lldp").checked=lldp;
|
||||
$("sy-syslog").checked=syslog;
|
||||
}
|
||||
$("sy-apply").addEventListener("click",function(){
|
||||
@@ -2031,6 +2034,10 @@ $("sy-igmp").addEventListener("change",function(){
|
||||
var el=this;
|
||||
postCmd("igmp "+(el.checked?"on":"off")).catch(function(){el.checked=!el.checked});
|
||||
});
|
||||
$("sy-lldp").addEventListener("change",function(){
|
||||
var el=this;
|
||||
postCmd("lldp "+(el.checked?"on":"off")).catch(function(){el.checked=!el.checked});
|
||||
});
|
||||
$("sy-syslog").addEventListener("change",function(){
|
||||
var cmds=[],el=this;
|
||||
if(el.checked){
|
||||
|
||||
@@ -386,6 +386,8 @@ button.danger{background:var(--bad);color:#fff;border-color:transparent}
|
||||
<div class="card"><h2 data-i18n="sy_services">Services</h2>
|
||||
<label class="row" style="justify-content:space-between"><span data-i18n="sy_igmp">IGMP snooping</span>
|
||||
<span class="switch"><input type="checkbox" id="sy-igmp"><i></i></span></label>
|
||||
<label class="row" style="justify-content:space-between"><span data-i18n="sy_lldp">LLDP</span>
|
||||
<span class="switch"><input type="checkbox" id="sy-lldp"><i></i></span></label>
|
||||
<label class="row" style="justify-content:space-between"><span data-i18n="i_syslog">Syslog</span>
|
||||
<span class="switch"><input type="checkbox" id="sy-syslog"><i></i></span></label>
|
||||
<div class="row" style="display:flex;gap:8px;align-items:center;margin:-2px 0 10px">
|
||||
|
||||
Reference in new issue
Block a user