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 D24A78A8DF for ; Thu, 4 Aug 2022 16:47:37 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C94A926FF2 for ; Thu, 4 Aug 2022 16:47:07 +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 for ; Thu, 4 Aug 2022 16:47:05 +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 6AE2C42DF3 for ; Thu, 4 Aug 2022 16:47:05 +0200 (CEST) From: Stefan Hrdlicka To: pve-devel@lists.proxmox.com Date: Thu, 4 Aug 2022 16:46:17 +0200 Message-Id: <20220804144617.1133163-3-s.hrdlicka@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220804144617.1133163-1-s.hrdlicka@proxmox.com> References: <20220804144617.1133163-1-s.hrdlicka@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.062 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [me.vg] Subject: [pve-devel] [PATCH V4 manager 2/2] cleanup: "var" to "let", fix some indentation in related files 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: Thu, 04 Aug 2022 14:47:37 -0000 replace all "var" with "let" in files related to patch for ticket #2822 Signed-off-by: Stefan Hrdlicka --- www/manager6/storage/Base.js | 10 +++++----- www/manager6/storage/IScsiEdit.js | 6 +++--- www/manager6/storage/LVMEdit.js | 14 +++++++------- www/manager6/storage/LvmThinEdit.js | 18 +++++++++--------- www/manager6/storage/ZFSPoolEdit.js | 23 +++++++++++------------ 5 files changed, 35 insertions(+), 36 deletions(-) diff --git a/www/manager6/storage/Base.js b/www/manager6/storage/Base.js index d7dd13cc..ce511c40 100644 --- a/www/manager6/storage/Base.js +++ b/www/manager6/storage/Base.js @@ -5,7 +5,7 @@ Ext.define('PVE.panel.StorageBase', { type: '', onGetValues: function(values) { - var me = this; + let me = this; if (me.isCreate) { values.type = me.type; @@ -20,7 +20,7 @@ Ext.define('PVE.panel.StorageBase', { }, initComponent: function() { - var me = this; + let me = this; me.column1.unshift({ xtype: me.isCreate ? 'textfield' : 'displayfield', @@ -136,7 +136,7 @@ Ext.define('PVE.storage.BaseEdit', { }, initComponent: function() { - var me = this; + let me = this; me.isCreate = !me.storageId; @@ -196,8 +196,8 @@ Ext.define('PVE.storage.BaseEdit', { if (!me.isCreate) { me.load({ success: function(response, options) { - var values = response.result.data; - var ctypes = values.content || ''; + let values = response.result.data; + let ctypes = values.content || ''; values.content = ctypes.split(','); diff --git a/www/manager6/storage/IScsiEdit.js b/www/manager6/storage/IScsiEdit.js index e9177f9e..674761c2 100644 --- a/www/manager6/storage/IScsiEdit.js +++ b/www/manager6/storage/IScsiEdit.js @@ -64,7 +64,7 @@ Ext.define('PVE.storage.IScsiInputPanel', { onlineHelp: 'storage_open_iscsi', onGetValues: function(values) { - var me = this; + let me = this; values.content = values.luns ? 'images' : 'none'; delete values.luns; @@ -78,7 +78,7 @@ Ext.define('PVE.storage.IScsiInputPanel', { }, initComponent: function() { - var me = this; + let me = this; me.column1 = []; me.column1.push({ @@ -107,7 +107,7 @@ Ext.define('PVE.storage.IScsiInputPanel', { listeners: { change: function(f, value) { if (me.isCreate) { - var exportField = me.down('field[name=target]'); + let exportField = me.down('field[name=target]'); exportField.setPortal(value); exportField.setValue(''); } diff --git a/www/manager6/storage/LVMEdit.js b/www/manager6/storage/LVMEdit.js index e8c5c88a..f7091a42 100644 --- a/www/manager6/storage/LVMEdit.js +++ b/www/manager6/storage/LVMEdit.js @@ -16,13 +16,13 @@ Ext.define('PVE.storage.VgSelector', { }, initComponent: function() { - var me = this; + let me = this; if (!me.nodename) { me.nodename = 'localhost'; } - var store = Ext.create('Ext.data.Store', { + let store = Ext.create('Ext.data.Store', { autoLoad: {}, // true, fields: ['vg', 'size', 'free'], proxy: { @@ -55,9 +55,9 @@ Ext.define('PVE.storage.BaseStorageSelector', { valueField: 'storage', displayField: 'text', initComponent: function() { - var me = this; + let me = this; - var store = Ext.create('Ext.data.Store', { + let store = Ext.create('Ext.data.Store', { autoLoad: { addRecords: true, params: { @@ -99,11 +99,11 @@ Ext.define('PVE.storage.LVMInputPanel', { onlineHelp: 'storage_lvm', initComponent: function() { - var me = this; + let me = this; me.column1 = []; - var vgnameField = Ext.createWidget(me.isCreate ? 'textfield' : 'displayfield', { + let vgnameField = Ext.createWidget(me.isCreate ? 'textfield' : 'displayfield', { name: 'vgname', hidden: !!me.isCreate, disabled: !!me.isCreate, @@ -133,7 +133,7 @@ Ext.define('PVE.storage.LVMInputPanel', { }, }); - var baseField = Ext.createWidget('pveFileSelector', { + let baseField = Ext.createWidget('pveFileSelector', { name: 'base', hidden: true, disabled: true, diff --git a/www/manager6/storage/LvmThinEdit.js b/www/manager6/storage/LvmThinEdit.js index 7cd50746..e7c58285 100644 --- a/www/manager6/storage/LvmThinEdit.js +++ b/www/manager6/storage/LvmThinEdit.js @@ -16,7 +16,7 @@ Ext.define('PVE.storage.TPoolSelector', { }, onTriggerClick: function() { - var me = this; + let me = this; if (!me.queryCaching || me.lastQuery !== me.vg) { me.store.removeAll(); @@ -28,19 +28,19 @@ Ext.define('PVE.storage.TPoolSelector', { }, setVG: function(myvg) { - var me = this; + let me = this; me.vg = myvg; }, initComponent: function() { - var me = this; + let me = this; if (!me.nodename) { me.nodename = 'localhost'; } - var store = Ext.create('Ext.data.Store', { + let store = Ext.create('Ext.data.Store', { fields: ['lv'], proxy: { type: 'proxmox', @@ -80,13 +80,13 @@ Ext.define('PVE.storage.BaseVGSelector', { }, initComponent: function() { - var me = this; + let me = this; if (!me.nodename) { me.nodename = 'localhost'; } - var store = Ext.create('Ext.data.Store', { + let store = Ext.create('Ext.data.Store', { autoLoad: {}, fields: ['vg', 'size', 'free'], proxy: { @@ -112,11 +112,11 @@ Ext.define('PVE.storage.LvmThinInputPanel', { onlineHelp: 'storage_lvmthin', initComponent: function() { - var me = this; + let me = this; me.column1 = []; - var vgnameField = Ext.createWidget(me.isCreate ? 'textfield' : 'displayfield', { + let vgnameField = Ext.createWidget(me.isCreate ? 'textfield' : 'displayfield', { name: 'vgname', hidden: !!me.isCreate, disabled: !!me.isCreate, @@ -125,7 +125,7 @@ Ext.define('PVE.storage.LvmThinInputPanel', { allowBlank: false, }); - var thinpoolField = Ext.createWidget(me.isCreate ? 'textfield' : 'displayfield', { + let thinpoolField = Ext.createWidget(me.isCreate ? 'textfield' : 'displayfield', { name: 'thinpool', hidden: !!me.isCreate, disabled: !!me.isCreate, diff --git a/www/manager6/storage/ZFSPoolEdit.js b/www/manager6/storage/ZFSPoolEdit.js index d7319a10..aec825f4 100644 --- a/www/manager6/storage/ZFSPoolEdit.js +++ b/www/manager6/storage/ZFSPoolEdit.js @@ -19,13 +19,13 @@ Ext.define('PVE.storage.ZFSPoolSelector', { }, initComponent: function() { - var me = this; + let me = this; if (!me.nodename) { me.nodename = 'localhost'; } - var store = Ext.create('Ext.data.Store', { + let store = Ext.create('Ext.data.Store', { autoLoad: {}, // true, fields: ['pool', 'size', 'free'], proxy: { @@ -49,7 +49,7 @@ Ext.define('PVE.storage.ZFSPoolInputPanel', { onlineHelp: 'storage_zfspool', initComponent: function() { - var me = this; + let me = this; me.column1 = []; @@ -84,15 +84,14 @@ Ext.define('PVE.storage.ZFSPoolInputPanel', { // value is an array, // while before it was a string - me.column1.push( - { -xtype: 'pveContentTypeSelector', - cts: ['images', 'rootdir'], - fieldLabel: gettext('Content'), - name: 'content', - value: ['images', 'rootdir'], - multiSelect: true, - allowBlank: false, + me.column1.push({ + xtype: 'pveContentTypeSelector', + cts: ['images', 'rootdir'], + fieldLabel: gettext('Content'), + name: 'content', + value: ['images', 'rootdir'], + multiSelect: true, + allowBlank: false, }); me.column2 = [ { -- 2.30.2