public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager 1/2] ui: qemu: eslint fixes
@ 2021-05-19  9:14 Dominic Jäger
  2021-05-19  9:14 ` [pve-devel] [PATCH manager 2/2] ui: storage/PBS edit: " Dominic Jäger
  2021-05-19 10:30 ` [pve-devel] applied: [PATCH manager 1/2] ui: qemu: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Dominic Jäger @ 2021-05-19  9:14 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
---
These 2 patches fix the remaining errors for manager6/qemu and manager6/storage
(manager6/lxc is already OK)

 www/manager6/qemu/CmdMenu.js | 2 +-
 www/manager6/qemu/PCIEdit.js | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/www/manager6/qemu/CmdMenu.js b/www/manager6/qemu/CmdMenu.js
index e312119d..fa75ad82 100644
--- a/www/manager6/qemu/CmdMenu.js
+++ b/www/manager6/qemu/CmdMenu.js
@@ -85,7 +85,7 @@ Ext.define('PVE.qemu.CmdMenu', {
 		text: gettext('Shutdown'),
 		iconCls: 'fa fa-fw fa-power-off',
 		disabled: stopped || suspended,
-		handler: () =>  confirmedVMCommand('shutdown'),
+		handler: () => confirmedVMCommand('shutdown'),
 	    },
 	    {
 		text: gettext('Stop'),
diff --git a/www/manager6/qemu/PCIEdit.js b/www/manager6/qemu/PCIEdit.js
index 942e8aed..a8e05f2d 100644
--- a/www/manager6/qemu/PCIEdit.js
+++ b/www/manager6/qemu/PCIEdit.js
@@ -124,11 +124,14 @@ Ext.define('PVE.qemu.PCIInputPanel', {
 			if (iommu !== -1) {
 			    var count = 0;
 			    pcisel.getStore().each(function(record) {
-				if (record.data.iommugroup === iommu &&
-				    record.data.id.substring(0, 5) !== id) {
+				if (
+				    record.data.iommugroup === iommu &&
+				    record.data.id.substring(0, 5) !== id
+				) {
 				    count++;
 				    return false;
 				}
+				return true;
 			    });
 			    var warning = me.down('#iommuwarning');
 			    if (count && !warning) {
-- 
2.20.1





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pve-devel] [PATCH manager 2/2] ui: storage/PBS edit: eslint fixes
  2021-05-19  9:14 [pve-devel] [PATCH manager 1/2] ui: qemu: eslint fixes Dominic Jäger
@ 2021-05-19  9:14 ` Dominic Jäger
  2021-05-19 10:30 ` [pve-devel] applied: [PATCH manager 1/2] ui: qemu: " Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Dominic Jäger @ 2021-05-19  9:14 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
---
 www/manager6/storage/PBSEdit.js | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/www/manager6/storage/PBSEdit.js b/www/manager6/storage/PBSEdit.js
index 2479304a..773d41e8 100644
--- a/www/manager6/storage/PBSEdit.js
+++ b/www/manager6/storage/PBSEdit.js
@@ -372,7 +372,6 @@ Ext.define('PVE.panel.PBSEncryptionKeyTab', {
 			return true;
 		    },
 		    afterRender: function() {
-			let field = this;
 			if (!window.FileReader) {
 			    // No FileReader support in this browser
 			    return;
@@ -383,15 +382,12 @@ Ext.define('PVE.panel.PBSEncryptionKeyTab', {
 				ev.preventDefault();
 			    }
 			};
-			field.inputEl.on('dragover', cancel);
-			field.inputEl.on('dragenter', cancel);
-			field.inputEl.on('drop', function(ev) {
-			    ev = ev.event;
-			    if (ev.preventDefault) {
-				ev.preventDefault();
-			    }
-			    let files = ev.dataTransfer.files;
-			    PVE.Utils.loadTextFromFile(files[0], v => field.setValue(v));
+			this.inputEl.on('dragover', cancel);
+			this.inputEl.on('dragenter', cancel);
+			this.inputEl.on('drop', ev => {
+			    cancel(ev);
+			    let files = ev.event.dataTransfer.files;
+			    PVE.Utils.loadTextFromFile(files[0], v => this.setValue(v));
 			});
 		    },
 		},
-- 
2.20.1





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pve-devel] applied:  [PATCH manager 1/2] ui: qemu: eslint fixes
  2021-05-19  9:14 [pve-devel] [PATCH manager 1/2] ui: qemu: eslint fixes Dominic Jäger
  2021-05-19  9:14 ` [pve-devel] [PATCH manager 2/2] ui: storage/PBS edit: " Dominic Jäger
@ 2021-05-19 10:30 ` Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2021-05-19 10:30 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominic Jäger

On 19.05.21 11:14, Dominic Jäger wrote:
> Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
> ---
> These 2 patches fix the remaining errors for manager6/qemu and manager6/storage
> (manager6/lxc is already OK)
> 
>  www/manager6/qemu/CmdMenu.js | 2 +-
>  www/manager6/qemu/PCIEdit.js | 7 +++++--
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
>

applied both, thanks!

FYI; Threw in some more (general) code cleanup/refactoring for the PCI edit one.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-19 10:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19  9:14 [pve-devel] [PATCH manager 1/2] ui: qemu: eslint fixes Dominic Jäger
2021-05-19  9:14 ` [pve-devel] [PATCH manager 2/2] ui: storage/PBS edit: " Dominic Jäger
2021-05-19 10:30 ` [pve-devel] applied: [PATCH manager 1/2] ui: qemu: " Thomas Lamprecht

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