}
var featuresstring = PVE.Parser.printPropertyString(values, undefined);
- if (featuresstring == '') {
+ if (featuresstring === '') {
return { 'delete': 'features' };
}
return { features: featuresstring };
var rowdef = rows[key];
var pending = rec.data.delete || me.hasPendingChanges(key);
- var isDisk = rowdef.tdCls == 'pve-itype-icon-storage';
+ var isDisk = rowdef.tdCls === 'pve-itype-icon-storage';
var isUnusedDisk = key.match(/^unused\d+/);
var noedit = rec.data.delete || !rowdef.editor;
var ips = [];
nics.forEach(function(nic) {
if (nic['hardware-address'] &&
- nic['hardware-address'] != '00:00:00:00:00:00' &&
- nic['hardware-address'] != '0:0:0:0:0:0') {
+ nic['hardware-address'] !== '00:00:00:00:00:00' &&
+ nic['hardware-address'] !== '0:0:0:0:0:0') {
var nic_ips = nic['ip-addresses'] || [];
nic_ips.forEach(function(ip) {
var p = ip['ip-address'];
},
isBootdev: function(dev, value) {
- return this.isDisk(dev) && !this.isCloudinit(value) ||
+ return (this.isDisk(dev) && !this.isCloudinit(value)) ||
(/^net\d+/).test(dev) ||
(/^hostpci\d+/).test(dev) ||
- (/^usb\d+/).test(dev) && !(/spice/).test(value);
+ ((/^usb\d+/).test(dev) && !(/spice/).test(value));
},
setVMConfig: function(vmconfig) {
datachanged: function(store) {
var ostype = me.lookup('ostype');
var old_val = ostype.getValue();
- if (!me.insideWizard && old_val && store.find('val', old_val) != -1) {
+ if (!me.insideWizard && old_val && store.find('val', old_val) !== -1) {
ostype.setValue(old_val);
} else {
ostype.setValue(store.getAt(0));
},
setValues: function(values) {
- if (values.max_bytes == 0) {
+ if (values.max_bytes === 0) {
values.max_bytes = null;
}
throw "no storage ID specified";
}
- if (!me.content || me.content !== 'images' && me.content !== 'rootdir') {
+ if (!me.content || (me.content !== 'images' && me.content !== 'rootdir')) {
throw "content needs to be either 'images' or 'rootdir'";
}
var storage_path = 'storage/' + nodename + '/' + storage;
// allow to delete local backed images if a VMID exists on another node.
- if (store.storageIsShared(storage_path) || guest_node == nodename) {
+ if (store.storageIsShared(storage_path) || guest_node === nodename) {
var msg = Ext.String.format(
gettext("Cannot remove image, a guest with VMID '{0}' exists!"), vmid);
msg += '<br />' + gettext("You can delete the image from the guest's hardware pane");