<script>
jQuery.fn.showTextHint = function(hintStr){
this.parent().children().remove(".fields_hint");
$("<div>")
.html(hintStr)
.addClass("fields_hint")
.appendTo(this.parent());
}
var faq_href = "https://nw-dlcdnet.asus.com/support/forward.html?model=&type=Faq&lang="+ui_lang+"&kw=&num=136";
function initial_system_settings() {
popupHint.init();
if(isSupport("qca_plc2")){
var gen_option = function(_node_info){
var mac = _node_info.mac;
var model_name = _node_info.model_name;
if(_node_info.ui_model_name != undefined && _node_info.ui_model_name != "")
model_name = _node_info.ui_model_name;
var display_text = htmlEnDeCode.htmlEncode(model_name) + " (" + mac + ")";
return $("<option/>").attr({"value": mac}).text(display_text);
};
$("#sel_plc_master").append($('<option>', {value: "", text: "<#160#>"}));
var get_cfg_clientlist = httpApi.hookGet("get_cfg_clientlist");
get_cfg_clientlist.forEach(function(item, index, array){
var isReNode = (index == 0) ? false : true;
if(isReNode){
if("capability" in item){
if("21" in item.capability) {
var multiple_uplink_port = item.capability["21"];
if(multiple_uplink_port["Ports"] != undefined){
$.each(multiple_uplink_port["Ports"], function(index, value){
if(value.Type == "3"){
if($('#sel_plc_master option[value="' + item.mac + '"]').length == 0)
$("#sel_plc_master").append(gen_option(item));
}
});
}
}
}
}
else{
$("#sel_plc_master").append(gen_option(item));
}
});
var cfg_plc_master = httpApi.nvramGet(["cfg_plc_master"]).cfg_plc_master;
if($('#sel_plc_master option[value="' + cfg_plc_master + '"]').length == 0){
$("#sel_plc_master").append($("<option/>").attr({"value": cfg_plc_master}).text(htmlEnDeCode.htmlEncode(cfg_plc_master)));
}
$("#sel_plc_master option[value='" + cfg_plc_master + "']").attr("selected","selected");
$("#sel_plc_master").unbind("change").change(function(){
httpApi.nvramSet({
"action_mode" : "apply",
"cfg_plc_master" : $(this).val(),
"rc_service" : "restart_plc_master"
}, function(){
setTimeout(function(){
httpApi.nvramGet(["cfg_plc_master"], true);
},1000);
}());
});
var plc_master_faq_href = "https://nw-dlcdnet.asus.com/support/forward.html?model=&type=Faq&lang="+ui_lang+"&kw=&num=160";
$("#plc_master_hint").unbind("click").click(function(e){
e = e || event;
e.stopPropagation();
popupHint.show_hint();
var hint = "<#1208#>";
hint += "<br><br>";
hint += "<a href='" + plc_master_faq_href + "' target='_blank' style='text-decoration:underline;color:#FC0;'>How to choose the best PLC master</a>";
popupHint.set_text(hint);
popupHint.set_btn_ok();
popupHint.hide_btn("cancel");
});
}
else
$(".system_settings_bg.plc_master").hide();
if(isSupport("amas_eap")){
var amas_eap_bhmode = httpApi.nvramGet(["amas_eap_bhmode"]).amas_eap_bhmode;
if(amas_eap_bhmode == "0")
$(".system_settings_bg.eap .switch").addClass("off");
else
$(".system_settings_bg.eap .switch").addClass("on");
$(".system_settings_bg.eap .switch").unbind("click");
$(".system_settings_bg.eap .switch").click(function(e){
e = e || event;
e.stopPropagation();
var switch_status = $(".system_settings_bg.eap .switch").hasClass("on");
if(switch_status){
$(".system_settings_bg.eap .switch").toggleClass("off on").promise().done(function(){
showLoading(15);
httpApi.nvramSet({
"amas_eap_bhmode" : "0",
"action_mode" : "apply",
"rc_service" : "restart_wireless"
}, function(){
setTimeout(function(){
httpApi.nvramGet(["amas_eap_bhmode"],true);
if(typeof jstree_refresh == "function")
jstree_refresh();
},1000);
}());
$("#AiMesh_Topology #manage_block").find(".manage_conn_priority #conn_priority_select").attr("disabled", false);
});
}
else{
var wifi_backhaul_node_list = check_wifi_backhaul_node();
if(wifi_backhaul_node_list != ""){
var hint = "";
hint += "<#1133#>"
hint += "<br><br>";
var model_list_hint = "* <#1134#><br>#MODELLIST".replace("#MODELLIST", wifi_backhaul_node_list);
hint += $("<span>").css("color", "#FC0").html(model_list_hint)[0].outerHTML;
hint += "<br><br>";
var $eap_faq = $("<span>").attr("id", "eap_faq").html("* <#1030#>");
$eap_faq.find("#wpa3FaqLink").attr("target", "_blank").css({"color": "#1EA2FF", "text-decoration": "underline"});
hint += $eap_faq[0].outerHTML;
popupHint.show_hint();
popupHint.set_text(hint);
popupHint.set_btn_ok();
popupHint.hide_btn("cancel");
}
else{
var getAllWlArray = function(){
var wlArrayRet = [{"title":"2.4 GHz", "ifname":"0", "suffix": ""}];
if(isSupport("triband")){
if(isSupport('wifi6e')){
wlArrayRet.push({"title":"5 GHz", "ifname":"1", "suffix": "_5G"});
wlArrayRet.push({"title":"6 GHz", "ifname":"2", "suffix": "_6G"});
}
else{
wlArrayRet.push({"title":"5 GHz-1", "ifname":"1", "suffix": "_5G-1"});
wlArrayRet.push({"title":"5 GHz-2", "ifname":"2", "suffix": "_5G-2"});
}
}
else if(isSupport("dualband") || isSupport('5G')){
wlArrayRet.push({"title":"5 GHz", "ifname":"1", "suffix": "_5G"})
}
if(isSupport('wigig'))
wlArrayRet.push({"title":"60 GHz", "ifname":"3", "suffix": "_60G"});
return wlArrayRet;
};
var Get_Component_WirelessInput = function(wlArray){
var container = $("<div>");
wlArray.forEach(function(wl, idx){
var wirelessAP = httpApi.nvramCharToAscii(["wl" + wl.ifname + "_ssid", "wl" + wl.ifname + "_wpa_psk", "wl" + wl.ifname + "_auth_mode_x"]);
var __container = $("<div>").addClass("wirelessBand");
$("<div>")
.addClass("inputTitleContainer")
.append($("<div>").addClass("inputTitle").html(wl.title + " <#578#>"))
.appendTo(__container);
$("<div>")
.addClass("inputContainer")
.append($("<input>")
.attr({
"id": "wireless_ssid_" + wl.ifname,
"type": "text",
"maxlength": "32",
"class": "textInput wlInput ssid",
"autocomplete": "off",
"autocorrect": "off",
"autocapitalize": "off",
"spellcheck": "false",
"data-role": "none",
"data-clear-btn": "true"
})
.keyup(function(e){
if(e.keyCode == 13)
$(".wlInput")[idx*2+1].focus();
})
.val(decodeURIComponent(wirelessAP["wl" + wl.ifname + "_ssid"]))
)
.appendTo(__container);
$("<div>")
.addClass("inputTitleContainer")
.append($("<div>").addClass("inputTitle").html(wl.title + " <#579#>"))
.append(
$("<div>").addClass("secureInput icon_eye close").attr({"for":"wireless_key_" + wl.ifname}).unbind("click").click(function(){
var targetObj = $(this);
targetObj.toggleClass("close").toggleClass("open");
$.each(targetObj.attr("for").split(" "), function(i, val){
$("#"+val).prop("type", (function(){return targetObj.hasClass("icon_eye close") ? "password" : "text";}()));
});
})
)
.appendTo(__container);
$("<div>")
.addClass("inputContainer")
.append($("<input>")
.attr({
"id": "wireless_key_" + wl.ifname,
"type": "password",
"maxlength": "64",
"class": "textInput wlInput psk",
"autocomplete": "new-password",
"autocorrect": "off",
"autocapitalize": "off",
"spellcheck": "false",
"data-role": "none",
"data-clear-btn": "true"
})
.keyup(function(e){
if(e.keyCode == 13){
try{
$(".wlInput")[idx*2+2].focus();
}
catch(e){
apply.wireless();
}
}
})
.val(decodeURIComponent(wirelessAP["wl" + wl.ifname + "_wpa_psk"]))
)
.appendTo(__container);
container.append(__container);
})
container.find(".wlInput").keyup(function(e){
var nvramName = this.id.split("_")[1];
var referenceVal = this.value;
if(this.id.indexOf("_0") !== -1){
var wlArray = getAllWlArray();
for(var idx=1; idx<wlArray.length; idx++){
container.find("#wireless_" + nvramName + "_" + wlArray[idx].ifname).val(referenceVal + ((nvramName == "ssid" && referenceVal.length < 27) ? wlArray[idx].suffix : ""));
}
}
});
return container;
};
popupHint.show_hint(10);
var $hint_bg = $("<div>");
$hint_bg.append($("<div>").addClass("yellow_text").html("<#1129#>"));
$hint_bg.append($("<div>").html("<#1130#>"));
$hint_bg.append("<br>");
$hint_bg.append($("<div>").html("* <#1131#>"));
$hint_bg.append("<br>");
var not_support_list = check_not_support_nodes("ethernet_backhaul_mode");
if(not_support_list != "") {
var model_list_hint = "* <#1141#><br>#MODELLIST<br><#1146#> <#1147#> ".replace("#MODELLIST", not_support_list);
$hint_bg.append($("<div>").addClass("yellow_text").html(model_list_hint));
$hint_bg.append("<br>");
}
var $eap_faq = $("<span>").attr("id", "eap_faq").html("* <#1030#>");
$eap_faq.find("#wpa3FaqLink").attr("target", "_blank").css({"color": "#1EA2FF", "text-decoration": "underline"});
$hint_bg.append($eap_faq);
$hint_bg.append($("<div>").addClass("divide_line"));
$hint_bg.append($("<div>").html("<#1132#>"));
$hint_bg.append($("<div>").addClass("height_space"));
var sc_status = "0";
if(isSupport("smart_connect")){
var $sc_switch_bg = $("<div>").addClass("switch_ctl_bg");
$sc_switch_bg.appendTo($hint_bg);
$sc_switch_bg.append($("<div>").addClass("title_text").html("<#3238#>"));
var $sc_switch = $("<div>").addClass("switch");
sc_status = httpApi.nvramGet(["smart_connect_x"]).smart_connect_x;
$sc_switch.addClass(((sc_status == "0") ? "off" : "on"));
$sc_switch.appendTo($sc_switch_bg);
$sc_switch.unbind("click");
$sc_switch.click(function(e){
e = e || event;
e.stopPropagation();
$(this).toggleClass("off on").promise().done(function(){
if($(this).hasClass("on")){
var wlArray = [{"title":"", "ifname":"0"}];
$(".popup_hint_component #wlInputField").html(Get_Component_WirelessInput(wlArray));
$(".popup_hint_component .sc_item_list_bg").show();
$(".popup_hint_component .sc_item_list_bg .custom_radio_label").removeClass("checked").eq(0).addClass("checked");
}
else{
var wlArray = getAllWlArray();
$(".popup_hint_component #wlInputField").html(Get_Component_WirelessInput(wlArray));
$(".popup_hint_component .sc_item_list_bg").hide();
}
});
});
var sc_array = [];
if(wl_info.band2g_support && wl_info.band5g_support && (wl_info.band5g_2_support || wl_info.band6g_support)){
if(isSupport("wifi6e")){
sc_array.push({"text":"<#3236#> (2.4 GHz, 5 GHz and 6 GHz)", "value":"1"});
}
else{
sc_array.push({"text":"<#3236#> (2.4 GHz, 5 GHz-1 and 5 GHz-2)", "value":"1"});
sc_array.push({"text":"5 GHz Smart Connect (5 GHz-1 and 5 GHz-2)", "value":"2"});
}
}
else if(wl_info.band2g_support && wl_info.band5g_support)
sc_array.push({"text":"<#3235#> (2.4 GHz and 5 GHz)", "value":"1"});
var $sc_item_list_bg = $("<div>").addClass("sc_item_list_bg");
$sc_item_list_bg.appendTo($hint_bg);
sc_array.forEach(function(item, index, array){
var $sc_item_bg = $("<div>").addClass("custom_radio_text_bg");
$sc_item_bg.appendTo($sc_item_list_bg);
var $sc_item_check = $("<div>").addClass("custom_radio_bg").append($("<span>").addClass("custom_radio_label"));
if(index == "0")
$sc_item_check.find(".custom_radio_label").addClass("checked");
$sc_item_check.find(".custom_radio_label").attr({"sc_mode":item.value});
$sc_item_check.appendTo($sc_item_bg);
var $sc_item_text = $("<div>").addClass("custom_text").html(item.text);
$sc_item_text.appendTo($sc_item_bg);
$sc_item_bg.unbind("click");
$sc_item_bg.click(function(e){
e = e || event;
e.stopPropagation();
$(this).parent(".sc_item_list_bg").find(".custom_radio_label").removeClass("checked");
$(this).find(".custom_radio_label").addClass("checked");
var sc_mode = $(this).find(".custom_radio_label").attr("sc_mode");
var wlArray = getAllWlArray();
if(sc_mode == "1")
wlArray = [{"title":"", "ifname":"0"}];
else if(sc_mode == "2"){
if(isSupport("wifi6e"))
wlArray = [{"title":"2.4 GHz", "ifname":"0"}, {"title":"5 GHz and 6 GHz", "ifname":"1"}];
else
wlArray = [{"title":"2.4 GHz", "ifname":"0"}, {"title":"5 GHz-1 and 5 GHz-2", "ifname":"1"}];
}
$(this).closest(".hint_text").find("#wlInputField").html(Get_Component_WirelessInput(wlArray));
});
});
if(sc_status == "0")
$sc_item_list_bg.hide();
else
$sc_item_list_bg.show();
$hint_bg.append($("<div>").addClass("divide_line"));
}
var $wlInputField = $("<div>").attr({"id":"wlInputField"});
var wlArray = ((sc_status == "0") ? getAllWlArray() : [{"title":"", "ifname":"0"}]);
$wlInputField.html(Get_Component_WirelessInput(wlArray));
$wlInputField.appendTo($hint_bg);
popupHint.append_text_component($hint_bg);
popupHint.set_btn_ok(function(){
var wirelessValidator = function(band, type, $obj){
var hasBlank = function(objArray){
$wlInputField.find(".fields_hint").remove();
$.each(objArray, function(idx, $obj){
if($obj.val() == "")
$obj.showTextHint("<#332#>");
})
if($wlInputField.find(".fields_hint").length > 0) return true;
};
var isWeakString = function(pwd, flag){
String.prototype.repeat = function(times){return (new Array(times + 1)).join(this);};
String.prototype.strReverse = function() {
var newstring = "";
for (var s=0; s<this.length; s++)
newstring = this.charAt(s) + newstring;
return newstring;
};
var termAlphas = "abcdefghijklmnopqrstuvwxyz";
var termNumerics = "01234567890";
var termSymbols = "~!@#$%^&*()_+";
var termKeyboards1 = "qwertyuiop";
var termKeyboards2 = "asdfghjkl";
var termCommon8 = ["adminpassword","loginpassword","passw0rd","password","useradmin","userpassword"];
var nSeqString = 0;
if(termAlphas.toLowerCase().indexOf(pwd) != -1 || termAlphas.strReverse().toLowerCase().indexOf(pwd) != -1) { nSeqString++; }
if(termNumerics.toLowerCase().indexOf(pwd) != -1 || termNumerics.strReverse().toLowerCase().indexOf(pwd) != -1) { nSeqString++; }
if(termSymbols.toLowerCase().indexOf(pwd) != -1 || termSymbols.strReverse().toLowerCase().indexOf(pwd) != -1) { nSeqString++; }
if(termKeyboards1.toLowerCase().indexOf(pwd) != -1 || termKeyboards1.strReverse().toLowerCase().indexOf(pwd) != -1) { nSeqString++; }
if(termKeyboards2.toLowerCase().indexOf(pwd) != -1 || termKeyboards2.strReverse().toLowerCase().indexOf(pwd) != -1) { nSeqString++; }
for(var s=0;s<termCommon8.length;s++)
if(pwd == termCommon8[s]){ nSeqString++; }
if(pwd == pwd.charAt(0).repeat(pwd.length)) { nSeqString++; }
if(nSeqString > 0)
return true;
else
return false;
};
if(hasBlank([$obj])) return false;
if(type == "ssid")
if(!validator.stringSSID($obj[0])) return false;
if(type == "key")
if(!validator.psk($obj[0])) return false;
if(type == "key" && is_KR_sku){
if(!validator.psk_KR($obj[0])) return false;
}
if(type == "key" && isWeakString($obj.val())){
if(!confirm("<#328#>")){
$obj.showTextHint("<#1279#>");
return false;
}
}
return true;
};
var valid_pass = true;
var wl_post_data = {};
$wlInputField.find(".wlInput").each(function(index){
var wl_obj_id = $(this).attr("id");
var type = wl_obj_id.split("_")[1];
var band = wl_obj_id.split("_")[2];
var handle_post_type = function(){
var str = "";
str += "wl";
str += band;
if(type == "ssid")
str += "_ssid";
else if(type == "key")
str += "_wpa_psk";
return str;
};
if(band != undefined){
if(!wirelessValidator(band, type, $(this))){
valid_pass = false;
return false;
}
var post_type = handle_post_type();
if(post_type != "")
wl_post_data[post_type] = $(this).val();
}
});
if(!valid_pass)
return false;
$(".system_settings_bg.eap .switch").toggleClass("off on").promise().done(function(){
showLoading(15);
var nvramSet_obj = {"amas_eap_bhmode": "3100", "action_mode" : "apply", "rc_service" : "restart_wireless"};
$.extend(true, nvramSet_obj, wl_post_data);
if(isSupport("smart_connect")){
var sc_enable = $sc_switch.hasClass("on");
var sc_mode = "0";
if(sc_enable)
sc_mode = $sc_item_list_bg.find(".custom_radio_label.checked").attr("sc_mode");
nvramSet_obj.smart_connect_x = sc_mode;
}
httpApi.nvramSet(nvramSet_obj, function(){
setTimeout(function(){
httpApi.nvramGet(["amas_eap_bhmode"],true);
if(typeof jstree_refresh == "function")
jstree_refresh();
},1000);
}());
$("#AiMesh_Topology #manage_block").find(".manage_conn_priority #conn_priority_select").attr("disabled", true);
$(".popup_hint_component").fadeOut();
});
}, false);
popupHint.set_btn_cancel();
}
$(".popup_hint_component #eap_faq").find("#wpa3FaqLink").attr("href", faq_href);
}
});
}
else
$(".system_settings_bg.eap").hide();
$(".system_settings_bg.led").hide();
$(".system_settings_bg.roaming_block").unbind("click");
$(".system_settings_bg.roaming_block").click(function(e){
e = e || event;
e.stopPropagation();
location.href = "/Advanced_Roaming_Block_Content.asp";
});
$(".system_settings_bg.reset").unbind("click");
$(".system_settings_bg.reset").click(function(e){
e = e || event;
e.stopPropagation();
recovery_eap_status();
popupHint.show_hint();
var reboot_time = eval("<% get_default_reboot_time(); %>");
var reboot_minutes = Math.ceil(reboot_time / 60);
var hint = "";
var not_support_list = check_not_support_nodes("manual_reset_default");
if(not_support_list == "") {
hint += "<#1139#><#1151#>";
hint += "<br>";
hint += "<#3178#>";
}
else {
hint += "<#1140#>".replace("#MINUTES", reboot_minutes);
hint += "<br>";
hint += "<#3178#>";
hint += "<br><br>";
var model_list_hint = "* <#1141#> <#1142#> #MODELLIST".replace("#MODELLIST", not_support_list);
hint += $("<span>").css("color", "#FC0").html(model_list_hint)[0].outerHTML;
}
var lan_ipaddr = httpApi.nvramGet(["lan_ipaddr"]).lan_ipaddr;
var lan_ipaddr_ori = '<% nvram_default_get("lan_ipaddr"); %>';
if(lan_ipaddr != lan_ipaddr_ori){
hint += "<br><br>";
hint += $("<span>").css("color", "#FC0").html("* <#3179#>".replace("192.168.1.1", lan_ipaddr_ori).replace("\n", '<br>'))[0].outerHTML;
}
popupHint.set_text(hint);
popupHint.set_btn_ok(function(){
showLoading(reboot_time);
httpApi.nvramSet({"action_mode": "reset_default"});
setTimeout(function(){
var interval_isAlive = setInterval(function(){
httpApi.isAlive("", lan_ipaddr_ori, function(){ clearInterval(interval_isAlive); location.href = "/";});
}, 2000);
}, 5000);
});
popupHint.set_btn_cancel();
});
$(".system_settings_bg.reboot").unbind("click");
$(".system_settings_bg.reboot").click(function(e){
e = e || event;
e.stopPropagation();
recovery_eap_status();
popupHint.show_hint();
var reboot_time = eval("<% get_default_reboot_time(); %>");
var reboot_minutes = Math.ceil(reboot_time / 60);
var hint = "";
var not_support_list = check_not_support_nodes("manual_reboot");
if(not_support_list == "")
hint = "<#1137#><#1151#><br><#3178#>";
else {
hint += "Rebooting the router will cause all connected devices to lose the Internet connectivity and it takes around #MINUTES minutes. All devices will be reconnected again while the reboot completed.".replace("#MINUTES", reboot_minutes);
hint += "<br>";
hint += "<#3178#>";
hint += "<br><br>";
var model_list_hint = "* <#1141#> <#1143#> #MODELLIST".replace("#MODELLIST", not_support_list);
hint += $("<span>").css("color", "#FC0").html(model_list_hint)[0].outerHTML;
}
popupHint.set_text(hint);
popupHint.set_btn_ok(function(){
showLoading(reboot_time);
httpApi.nvramSet({"action_mode": "device_reboot"});
var lan_ipaddr = httpApi.nvramGet(["lan_ipaddr"]).lan_ipaddr;
setTimeout(function(){
var interval_isAlive = setInterval(function(){
httpApi.isAlive("", lan_ipaddr, function(){ clearInterval(interval_isAlive); location.href = "/";});
}, 2000);
}, 5000);
});
popupHint.set_btn_cancel();
});
}
var popupHint = {
"init" : function(){
var $popupHint = $("<div>");
$popupHint.appendTo($(".popup_hint_component"));
$("#popup_hint_component").after($popupHint);
$popupHint.addClass("popup_hint_component popup_hint_bg");
$popupHint.attr({"id":"popup_hint_bg", "onselectstart":"false"});
$("<div>").addClass("hint_text").appendTo($popupHint);
var $action_bg = $("<div>").addClass("action_bg").appendTo($popupHint);
var $action_cancel = $("<input/>").attr({"id":"action_cancel", "type":"button", "value":"<#206#>"}).addClass("button_gen");
var $action_ok = $("<input/>").attr({"id":"action_ok", "type":"button", "value":"<#1687#>"}).addClass("button_gen");
$action_bg.append($action_cancel).append($action_ok);
},
"show_hint" : function(_top){
$(".popup_hint_component").fadeIn();
var top = 100;
if(_top != undefined && _top != "")
top = _top;
adjust_panel_block_top("popup_hint_bg", top);
},
"set_text" : function(_text){
$(".popup_hint_component .hint_text").html(_text);
},
"append_text_component" : function(_component){
$(".popup_hint_component .hint_text").empty();
$(".popup_hint_component .hint_text").append(_component);
},
set_btn_ok : function(_fun, _hide){
$(".popup_hint_component .action_bg #action_ok").show();
$(".popup_hint_component .action_bg #action_ok").unbind("click");
$(".popup_hint_component .action_bg #action_ok").click(function(e){
e = e || event;
e.stopPropagation();
if(_fun)
_fun();
if(_hide == undefined || _hide == true)
$(".popup_hint_component").fadeOut();
});
},
set_btn_cancel : function(_fun){
$(".popup_hint_component .action_bg #action_cancel").show();
$(".popup_hint_component .action_bg #action_cancel").unbind("click");
$(".popup_hint_component .action_bg #action_cancel").click(function(e){
e = e || event;
e.stopPropagation();
if(_fun)
_fun();
$(".popup_hint_component").fadeOut();
});
},
"hide_btn" : function(_type){
$(".popup_hint_component .action_bg #action_" + _type + "").hide();
}
};
function check_not_support_nodes(_feature) {
var not_support_list = "";
var get_cfg_clientlist = httpApi.hookGet("get_cfg_clientlist");
get_cfg_clientlist.forEach(function(item, index, array){
var isReNode = (index == 0) ? false : true;
var node_capability = httpApi.aimesh_get_node_capability(item);
if(item.online == "0" || (!node_capability[_feature] && _feature != "manual_reset_default")) {
if(not_support_list != "")
not_support_list += ", ";
if(item.ui_model_name == undefined || item.ui_model_name == "")
not_support_list += item.model_name;
else
not_support_list += item.ui_model_name;
not_support_list += " (" + node_location_translate(item, isReNode) + ")";
}
});
return not_support_list;
};
function check_wifi_backhaul_node() {
var wifi_backhaul_list = "";
var get_cfg_clientlist = httpApi.hookGet("get_cfg_clientlist");
get_cfg_clientlist.forEach(function(item, index, array){
var isReNode = (index == 0) ? false : true;
if(isReNode && item.online == "1" && (item.re_path != "1" && item.re_path != "16" && item.re_path != "32" && item.re_path != "64") && handle_re_path(item.re_path) > 0){
if(wifi_backhaul_list != "")
wifi_backhaul_list += ", ";
if(item.ui_model_name == undefined || item.ui_model_name == "")
wifi_backhaul_list += item.model_name;
else
wifi_backhaul_list += item.ui_model_name;
wifi_backhaul_list += " (" + node_location_translate(item, isReNode) + ")";
}
});
return wifi_backhaul_list;
}
function recovery_eap_status() {
if(isSupport("amas_eap")){
var amas_eap_bhmode = httpApi.nvramGet(["amas_eap_bhmode"]).amas_eap_bhmode;
var switch_status = $(".system_settings_bg.eap .switch").hasClass("on");
if(amas_eap_bhmode == "0" && switch_status)
$(".system_settings_bg.eap .switch").toggleClass("off on");
}
}
function node_location_translate(_node_info, _isReNode){
var result = "<#1092#>";
var node_location_text = "Home";
if(_isReNode){
if("config" in _node_info) {
if("misc" in _node_info.config) {
if("cfg_alias" in _node_info.config.misc) {
if(_node_info.config.misc.cfg_alias != "")
node_location_text = _node_info.config.misc.cfg_alias;
}
}
}
}
else{
var alias = _node_info.alias;
if(alias != _node_info.mac)
node_location_text = alias;
}
var specific_location = aimesh_location_arr.filter(function(item, index, _array){
return (item.value == node_location_text);
})[0];
if(specific_location != undefined){
result = specific_location.text;
}
else{
result = node_location_text;
}
return htmlEnDeCode.htmlEncode(result);
}
function handle_re_path(_re_path){
var result = parseInt(_re_path);
return ((isNaN(result)) ? 0 : result);
}
$(document).ready(initial_system_settings);
</script>
<div class="system_settings_bg plc_master">
<div class="system_icon"></div>
<div class="system_text">
<span><#1207#></span>
<div id="plc_master_hint" class="bubble_icon info plc_master"></div>
</div>
<div class="select_option_bg"><select id="sel_plc_master"></select></select></div>
</div>
<div class="system_settings_bg eap">
<div class="system_icon"></div>
<div class="system_text">
<span><#1128#></span>
<div id="system_settings_eap_hint" class="bubble_icon info eap hover_pop_hint"></div>
<div class="hover_pop_hint_bg eap">
<#1135#>
<br>
<span style="color:#FC0"><#1129#></span>
<#1130#>
</div>
</div>
<div class="switch"></div>
</div>
<div class="system_settings_bg led">
<div class="system_icon"></div>
<div class="system_text"><span><#1144#></span></div>
<div class="switch"></div>
</div>
<div class="system_settings_bg roaming_block">
<div class="system_icon"></div>
<div class="system_text"><span><#3855#></span></div>
</div>
<div class="system_settings_bg reset">
<div class="system_icon"></div>
<div class="system_text"><span><#1138#></span></div>
</div>
<div class="system_settings_bg reboot">
<div class="system_icon"></div>
<div class="system_text"><span><#1136#></span></div>
</div>
<div class="popup_hint_component"></div>