ui: eslint: Remove useless escapes

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Dominic Jäger 2021-05-18 14:12:16 +02:00 committed by Thomas Lamprecht
parent 5eb9b7b1b0
commit f1374bff13
3 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ Ext.define('PVE.lxc.DNSInputPanel', {
}
if (values.nameserver) {
var list = values.nameserver.split(/[\ \,\;]+/);
let list = values.nameserver.split(/[ ,;]+/);
values.nameserver = list.join(' ');
} else if (!me.insideWizard) {
deletes.push('nameserver');

View File

@ -86,7 +86,7 @@ Ext.define('PVE.qemu.CloudInit', {
var insert_params = {};
let disk = PVE.Parser.parseQemuDrive(view.ciDriveId, view.ciDrive);
var storage = '';
var stormatch = disk.file.match(/^([^\:]+)\:/);
var stormatch = disk.file.match(/^([^:]+):/);
if (stormatch) {
storage = stormatch[1];
}

View File

@ -149,11 +149,11 @@ Ext.define('PVE.qemu.USBEdit', {
var type = 'spice';
for (let i = 0; i < data.length; i++) {
if (/^(host=)?(0x)?[a-zA-Z0-9]{4}\:(0x)?[a-zA-Z0-9]{4}$/.test(data[i])) {
if (/^(host=)?(0x)?[a-zA-Z0-9]{4}:(0x)?[a-zA-Z0-9]{4}$/.test(data[i])) {
hostdevice = data[i];
hostdevice = hostdevice.replace('host=', '').replace('0x', '');
type = 'hostdevice';
} else if (/^(host=)?(\d+)\-(\d+(\.\d+)*)$/.test(data[i])) {
} else if (/^(host=)?(\d+)-(\d+(\.\d+)*)$/.test(data[i])) {
port = data[i];
port = port.replace('host=', '');
type = 'port';