From 8af03a8dbd047e506d1c13138deea95d3d62798d Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 18 May 2021 15:21:58 +0200 Subject: [PATCH] ui: eslint auto-fixes Signed-off-by: Thomas Lamprecht --- www/manager6/form/SDNDnsSelector.js | 18 ++++++++---------- www/manager6/form/SDNIpamSelector.js | 18 ++++++++---------- www/manager6/form/SDNVnetSelector.js | 18 ++++++++---------- www/manager6/ha/GroupEdit.js | 2 +- www/manager6/ha/ResourceEdit.js | 4 +--- www/manager6/window/Migrate.js | 2 +- 6 files changed, 27 insertions(+), 35 deletions(-) diff --git a/www/manager6/form/SDNDnsSelector.js b/www/manager6/form/SDNDnsSelector.js index 7abb1f01b..9248b4902 100644 --- a/www/manager6/form/SDNDnsSelector.js +++ b/www/manager6/form/SDNDnsSelector.js @@ -13,7 +13,7 @@ Ext.define('PVE.form.SDNDnsSelector', { model: 'pve-sdn-dns', sorters: { property: 'dns', - order: 'DESC' + order: 'DESC', }, }); @@ -26,27 +26,25 @@ Ext.define('PVE.form.SDNDnsSelector', { header: gettext('dns'), sortable: true, dataIndex: 'dns', - flex: 1 + flex: 1, }, - ] - } + ], + }, }); me.callParent(); store.load(); - } + }, }, function() { - Ext.define('pve-sdn-dns', { extend: 'Ext.data.Model', - fields: [ 'dns' ], + fields: ['dns'], proxy: { type: 'proxmox', - url: "/api2/json/cluster/sdn/dns" + url: "/api2/json/cluster/sdn/dns", }, - idProperty: 'dns' + idProperty: 'dns', }); - }); diff --git a/www/manager6/form/SDNIpamSelector.js b/www/manager6/form/SDNIpamSelector.js index 5520d0fec..dbe23caa4 100644 --- a/www/manager6/form/SDNIpamSelector.js +++ b/www/manager6/form/SDNIpamSelector.js @@ -13,7 +13,7 @@ Ext.define('PVE.form.SDNIpamSelector', { model: 'pve-sdn-ipam', sorters: { property: 'ipam', - order: 'DESC' + order: 'DESC', }, }); @@ -26,27 +26,25 @@ Ext.define('PVE.form.SDNIpamSelector', { header: gettext('Ipam'), sortable: true, dataIndex: 'ipam', - flex: 1 + flex: 1, }, - ] - } + ], + }, }); me.callParent(); store.load(); - } + }, }, function() { - Ext.define('pve-sdn-ipam', { extend: 'Ext.data.Model', - fields: [ 'ipam' ], + fields: ['ipam'], proxy: { type: 'proxmox', - url: "/api2/json/cluster/sdn/ipams" + url: "/api2/json/cluster/sdn/ipams", }, - idProperty: 'ipam' + idProperty: 'ipam', }); - }); diff --git a/www/manager6/form/SDNVnetSelector.js b/www/manager6/form/SDNVnetSelector.js index 0f9a66131..5421a076f 100644 --- a/www/manager6/form/SDNVnetSelector.js +++ b/www/manager6/form/SDNVnetSelector.js @@ -13,7 +13,7 @@ Ext.define('PVE.form.SDNVnetSelector', { model: 'pve-sdn-vnet', sorters: { property: 'vnet', - order: 'DESC' + order: 'DESC', }, }); @@ -26,7 +26,7 @@ Ext.define('PVE.form.SDNVnetSelector', { header: gettext('Vnet'), sortable: true, dataIndex: 'vnet', - flex: 1 + flex: 1, }, { header: gettext('Alias'), @@ -37,18 +37,17 @@ Ext.define('PVE.form.SDNVnetSelector', { header: gettext('Tag'), flex: 1, dataIndex: 'tag', - } - ] - } + }, + ], + }, }); me.callParent(); store.load(); - } + }, }, function() { - Ext.define('pve-sdn-vnet', { extend: 'Ext.data.Model', fields: [ @@ -60,9 +59,8 @@ Ext.define('PVE.form.SDNVnetSelector', { ], proxy: { type: 'proxmox', - url: "/api2/json/cluster/sdn/vnets" + url: "/api2/json/cluster/sdn/vnets", }, - idProperty: 'vnet' + idProperty: 'vnet', }); - }); diff --git a/www/manager6/ha/GroupEdit.js b/www/manager6/ha/GroupEdit.js index d3b34953f..cce40383c 100644 --- a/www/manager6/ha/GroupEdit.js +++ b/www/manager6/ha/GroupEdit.js @@ -104,7 +104,7 @@ Ext.define('PVE.ha.GroupInputPanel', { }, isValid: function() { var value = nodefield.getValue(); - return value && 0 !== value.length; + return value && value.length !== 0; }, }); diff --git a/www/manager6/ha/ResourceEdit.js b/www/manager6/ha/ResourceEdit.js index c1388ce5e..f4c876ea5 100644 --- a/www/manager6/ha/ResourceEdit.js +++ b/www/manager6/ha/ResourceEdit.js @@ -126,11 +126,9 @@ Ext.define('PVE.ha.VMResourceInputPanel', { 'change': function(field, newValue) { if (newValue === 'disabled') { disabledHint.setVisible(true); - } else { - if (disabledHint.isVisible()) { + } else if (disabledHint.isVisible()) { disabledHint.setVisible(false); } - } }, }, }, diff --git a/www/manager6/window/Migrate.js b/www/manager6/window/Migrate.js index 8b30c820c..f818efd84 100644 --- a/www/manager6/window/Migrate.js +++ b/www/manager6/window/Migrate.js @@ -253,7 +253,7 @@ Ext.define('PVE.window.Migrate', { severity: 'error', }); } else { - return; + } } else { migration.possible = false;