// to get the port no
// let port_no = window.location.port
// if(port_no === "0" || port_no === "" || port_no === "443" || port_no === "80"){
//     port_no = ""
// }

// // to change the selected device value according to port no
// if(port_no === "8001"){
//     $("#device-name option[value='8001']").attr("selected", "selected");
// } else if(port_no === "8002"){
//     $("#device-name option[value='8002']").attr("selected", "selected");
// } else if(port_no === "8003"){
//     $("#device-name option[value='8003']").attr("selected", "selected");
// } else if(port_no === "8004"){
//     $("#device-name option[value='8004']").attr("selected", "selected");
// } else if(port_no === "8005"){
//     $("#device-name option[value='8005']").attr("selected", "selected");
// } else if(port_no === "8006"){
//     $("#device-name option[value='8006']").attr("selected", "selected");
// } else if(port_no === "8007"){
//     $("#device-name option[value='8007']").attr("selected", "selected");
// } else if(port_no === "8008"){
//     $("#device-name option[value='8008']").attr("selected", "selected");
// } else if(port_no === "8009"){
//     $("#device-name option[value='8009']").attr("selected", "selected");
// } else{
//     $("#device-name option[value='0']").attr("selected", "selected");
// }

// ip_address = window.location.hostname;
// login_html_path = window.location.pathname;
// protocol = window.location.protocol;

// // to change the current url according to the selected device
// function redirectUrl(){
//     let current_port = $("#device-name").val();
//     if(current_port != port_no){
//         window.location.href = `${protocol}//${ip_address}:${current_port}${login_html_path}`;
//     }
// }
// // to call the redirectUrl() whenever the value of the selected device is changed
// $("#device-name").change(redirectUrl);