From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id D71A471327 for ; Tue, 18 May 2021 14:12:44 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B6435F056 for ; Tue, 18 May 2021 14:12:44 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id ABE63F03A for ; Tue, 18 May 2021 14:12:42 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 83FB6465D2 for ; Tue, 18 May 2021 14:12:42 +0200 (CEST) From: =?UTF-8?q?Dominic=20J=C3=A4ger?= To: pve-devel@lists.proxmox.com Date: Tue, 18 May 2021 14:12:17 +0200 Message-Id: <20210518121218.125661-6-d.jaeger@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518121218.125661-1-d.jaeger@proxmox.com> References: <20210518121218.125661-1-d.jaeger@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.911 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager 5/6] State equalities more precisely X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2021 12:12:44 -0000 Signed-off-by: Dominic Jäger --- www/manager6/lxc/FeaturesEdit.js | 2 +- www/manager6/lxc/Resources.js | 2 +- www/manager6/qemu/AgentIPView.js | 4 ++-- www/manager6/qemu/BootOrderEdit.js | 4 ++-- www/manager6/qemu/OSTypeEdit.js | 2 +- www/manager6/qemu/RNGEdit.js | 2 +- www/manager6/storage/ImageView.js | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/www/manager6/lxc/FeaturesEdit.js b/www/manager6/lxc/FeaturesEdit.js index 1c2795b9..807c2623 100644 --- a/www/manager6/lxc/FeaturesEdit.js +++ b/www/manager6/lxc/FeaturesEdit.js @@ -83,7 +83,7 @@ Ext.define('PVE.lxc.FeaturesInputPanel', { } var featuresstring = PVE.Parser.printPropertyString(values, undefined); - if (featuresstring == '') { + if (featuresstring === '') { return { 'delete': 'features' }; } return { features: featuresstring }; diff --git a/www/manager6/lxc/Resources.js b/www/manager6/lxc/Resources.js index a571c19e..58344385 100644 --- a/www/manager6/lxc/Resources.js +++ b/www/manager6/lxc/Resources.js @@ -231,7 +231,7 @@ Ext.define('PVE.lxc.RessourceView', { 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; diff --git a/www/manager6/qemu/AgentIPView.js b/www/manager6/qemu/AgentIPView.js index 8a9a4bb4..1411361a 100644 --- a/www/manager6/qemu/AgentIPView.js +++ b/www/manager6/qemu/AgentIPView.js @@ -104,8 +104,8 @@ Ext.define('PVE.qemu.AgentIPView', { 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']; diff --git a/www/manager6/qemu/BootOrderEdit.js b/www/manager6/qemu/BootOrderEdit.js index 73c28946..de80c7e1 100644 --- a/www/manager6/qemu/BootOrderEdit.js +++ b/www/manager6/qemu/BootOrderEdit.js @@ -28,10 +28,10 @@ Ext.define('PVE.qemu.BootOrderPanel', { }, 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) { diff --git a/www/manager6/qemu/OSTypeEdit.js b/www/manager6/qemu/OSTypeEdit.js index ece80c39..438d7c6b 100644 --- a/www/manager6/qemu/OSTypeEdit.js +++ b/www/manager6/qemu/OSTypeEdit.js @@ -79,7 +79,7 @@ Ext.define('PVE.qemu.OSTypeInputPanel', { 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)); diff --git a/www/manager6/qemu/RNGEdit.js b/www/manager6/qemu/RNGEdit.js index c196fb0b..e34e2c08 100644 --- a/www/manager6/qemu/RNGEdit.js +++ b/www/manager6/qemu/RNGEdit.js @@ -19,7 +19,7 @@ Ext.define('PVE.qemu.RNGInputPanel', { }, setValues: function(values) { - if (values.max_bytes == 0) { + if (values.max_bytes === 0) { values.max_bytes = null; } diff --git a/www/manager6/storage/ImageView.js b/www/manager6/storage/ImageView.js index 612c419b..dda4b8e6 100644 --- a/www/manager6/storage/ImageView.js +++ b/www/manager6/storage/ImageView.js @@ -16,7 +16,7 @@ Ext.define('PVE.storage.ImageView', { 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'"; } @@ -44,7 +44,7 @@ Ext.define('PVE.storage.ImageView', { 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 += '
' + gettext("You can delete the image from the guest's hardware pane"); -- 2.20.1