Use xo 0.53.0 and fix errors

Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
Christian König
2022-11-20 11:29:30 +01:00
parent ad468b711b
commit 7a9cf91def
10 changed files with 303 additions and 114 deletions

View File

@@ -77,7 +77,7 @@ function showAlert(type, icon, title, message) {
var opts = {};
title = "&nbsp;<strong>" + title + "</strong><br>";
switch (type) {
case "info":
case "info": {
opts = {
type: "info",
icon: "far fa-clock",
@@ -86,7 +86,9 @@ function showAlert(type, icon, title, message) {
};
info = $.notify(opts);
break;
case "success":
}
case "success": {
opts = {
type: "success",
icon: icon,
@@ -100,7 +102,9 @@ function showAlert(type, icon, title, message) {
}
break;
case "warning":
}
case "warning": {
opts = {
type: "warning",
icon: "fas fa-exclamation-triangle",
@@ -114,7 +118,9 @@ function showAlert(type, icon, title, message) {
}
break;
case "error":
}
case "error": {
opts = {
type: "danger",
icon: "fas fa-times",
@@ -128,6 +134,8 @@ function showAlert(type, icon, title, message) {
}
break;
}
default:
}
}
@@ -200,12 +208,12 @@ function validateIPv6CIDR(ip) {
}
function validateMAC(mac) {
var macvalidator = new RegExp(/^([\da-fA-F]{2}:){5}([\da-fA-F]{2})$/);
var macvalidator = /^([\da-fA-F]{2}:){5}([\da-fA-F]{2})$/;
return macvalidator.test(mac);
}
function validateHostname(name) {
var namevalidator = new RegExp(/[^<>;"]/);
var namevalidator = /[^<>;"]/;
return namevalidator.test(name);
}