public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Dominic Jäger" <d.jaeger@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 5/6] State equalities more precisely
Date: Tue, 18 May 2021 14:12:17 +0200	[thread overview]
Message-ID: <20210518121218.125661-6-d.jaeger@proxmox.com> (raw)
In-Reply-To: <20210518121218.125661-1-d.jaeger@proxmox.com>

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
---
 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 += '<br />' + gettext("You can delete the image from the guest's hardware pane");
-- 
2.20.1





  parent reply	other threads:[~2021-05-18 12:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 12:12 [pve-devel] [PATCH manager 0/6] eslint fixes Dominic Jäger
2021-05-18 12:12 ` [pve-devel] [PATCH manager 1/6] Fix usage of 'me' Dominic Jäger
2021-05-18 12:12 ` [pve-devel] [PATCH manager 2/6] No unused or duplicate variables Dominic Jäger
2021-05-18 12:12 ` [pve-devel] [PATCH manager 3/6] Functions may not be completely empty Dominic Jäger
2021-05-18 12:12 ` [pve-devel] [PATCH manager 4/6] Remove useless escapes Dominic Jäger
2021-05-18 12:12 ` Dominic Jäger [this message]
2021-05-18 12:12 ` [pve-devel] [PATCH manager 6/6] Miscellaneous eslint fixes Dominic Jäger
2021-05-18 13:23 ` [pve-devel] applied-series: [PATCH manager 0/6] " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210518121218.125661-6-d.jaeger@proxmox.com \
    --to=d.jaeger@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal