]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
Add regexp to match a bus entry in a VM config
authorEmmanuel Kasper <e.kasper@proxmox.com>
Thu, 6 Oct 2016 09:01:25 +0000 (11:01 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 7 Oct 2016 05:01:36 +0000 (07:01 +0200)
www/manager6/Utils.js
www/manager6/qemu/BootOrderEdit.js

index 3c1513599c9fae7ec850ac1a33e63e5a8993007d..060643a249865febc02cb53f4e85b242f7135823 100644 (file)
@@ -103,6 +103,8 @@ Ext.define('PVE.Utils', { statics: {
 
     toolkit: undefined, // (extjs|touch), set inside Toolkit.js
 
+    bus_match: /^(ide|sata|virtio|scsi)\d+$/,
+
     log_severity_hash: {
        0: "panic",
        1: "alert",
index e6a9b9cae4929095e8fabfca3bcb15773e049675..3dc4e75a1ce8d945a36cb5e139190afc5e31cf18 100644 (file)
@@ -9,7 +9,7 @@ Ext.define('PVE.qemu.BootOrderPanel', {
     comboboxes: [],
 
     isBootDisk: function(value) {
-       return (/^(ide|sata|scsi|virtio)\d+$/).test(value);
+       return PVE.Utils.bus_match.test(value);
     },
 
     setVMConfig: function(vmconfig) {