[pve-devel] [PATCH manager 2/6] No unused or duplicate variables
Dominic Jäger
d.jaeger at proxmox.com
Tue May 18 14:12:14 CEST 2021
Signed-off-by: Dominic Jäger <d.jaeger at proxmox.com>
---
www/manager6/lxc/CreateWizard.js | 1 -
www/manager6/lxc/DNS.js | 5 ++---
www/manager6/lxc/Options.js | 5 ++---
www/manager6/lxc/Resources.js | 2 +-
www/manager6/qemu/AgentIPView.js | 1 -
www/manager6/qemu/HDEdit.js | 1 -
www/manager6/qemu/HDMove.js | 2 --
www/manager6/qemu/Options.js | 4 +---
www/manager6/qemu/Smbios1Edit.js | 1 -
www/manager6/storage/NFSEdit.js | 1 -
www/manager6/storage/TemplateView.js | 2 --
11 files changed, 6 insertions(+), 19 deletions(-)
diff --git a/www/manager6/lxc/CreateWizard.js b/www/manager6/lxc/CreateWizard.js
index 7be300ad..3ea271bf 100644
--- a/www/manager6/lxc/CreateWizard.js
+++ b/www/manager6/lxc/CreateWizard.js
@@ -269,7 +269,6 @@ Ext.define('PVE.lxc.CreateWizard', {
if (key === 'password') { // don't show pw
return;
}
- var html = Ext.htmlEncode(Ext.JSON.encode(value));
data.push({ key: key, value: value });
});
diff --git a/www/manager6/lxc/DNS.js b/www/manager6/lxc/DNS.js
index 9eb3d657..f277370c 100644
--- a/www/manager6/lxc/DNS.js
+++ b/www/manager6/lxc/DNS.js
@@ -99,7 +99,6 @@ Ext.define('PVE.lxc.DNS', {
initComponent: function() {
var me = this;
- var i;
var nodename = me.pveSelNode.data.node;
if (!nodename) {
@@ -215,8 +214,8 @@ Ext.define('PVE.lxc.DNS', {
var revert_btn = new PVE.button.PendingRevert();
var set_button_status = function() {
- var sm = me.getSelectionModel();
- var rec = sm.getSelection()[0];
+ let button_sm = me.getSelectionModel();
+ let rec = button_sm.getSelection()[0];
if (!rec) {
edit_btn.disable();
diff --git a/www/manager6/lxc/Options.js b/www/manager6/lxc/Options.js
index e1c4ce10..b64d03a9 100644
--- a/www/manager6/lxc/Options.js
+++ b/www/manager6/lxc/Options.js
@@ -6,7 +6,6 @@ Ext.define('PVE.lxc.Options', {
initComponent: function() {
var me = this;
- var i;
var nodename = me.pveSelNode.data.node;
if (!nodename) {
@@ -163,8 +162,8 @@ Ext.define('PVE.lxc.Options', {
var revert_btn = new PVE.button.PendingRevert();
var set_button_status = function() {
- var sm = me.getSelectionModel();
- var rec = sm.getSelection()[0];
+ let button_sm = me.getSelectionModel();
+ let rec = button_sm.getSelection()[0];
if (!rec) {
edit_btn.disable();
diff --git a/www/manager6/lxc/Resources.js b/www/manager6/lxc/Resources.js
index 96114460..a571c19e 100644
--- a/www/manager6/lxc/Resources.js
+++ b/www/manager6/lxc/Resources.js
@@ -17,7 +17,7 @@ Ext.define('PVE.lxc.RessourceView', {
initComponent: function() {
var me = this;
- var i, confid;
+ let confid;
var nodename = me.pveSelNode.data.node;
if (!nodename) {
diff --git a/www/manager6/qemu/AgentIPView.js b/www/manager6/qemu/AgentIPView.js
index 6518dfd6..8a9a4bb4 100644
--- a/www/manager6/qemu/AgentIPView.js
+++ b/www/manager6/qemu/AgentIPView.js
@@ -157,7 +157,6 @@ Ext.define('PVE.qemu.AgentIPView', {
text = ips.join('<br>');
}
} else if (me.nics && me.nics.error) {
- var msg = gettext('Cannot get info from Guest Agent<br>Error: {0}');
text = Ext.String.format(text, me.nics.error.desc);
}
} else if (me.agent) {
diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js
index e22111bf..95a98b0b 100644
--- a/www/manager6/qemu/HDEdit.js
+++ b/www/manager6/qemu/HDEdit.js
@@ -375,7 +375,6 @@ Ext.define('PVE.qemu.HDEdit', {
isCreate: me.isCreate,
});
- var subject;
if (unused) {
me.subject = gettext('Unused Disk');
} else if (me.isCreate) {
diff --git a/www/manager6/qemu/HDMove.js b/www/manager6/qemu/HDMove.js
index c9ef34d7..5bae5314 100644
--- a/www/manager6/qemu/HDMove.js
+++ b/www/manager6/qemu/HDMove.js
@@ -44,8 +44,6 @@ Ext.define('PVE.window.HDMove', {
initComponent: function() {
var me = this;
- var diskarray = [];
-
if (!me.nodename) {
throw "no node name specified";
}
diff --git a/www/manager6/qemu/Options.js b/www/manager6/qemu/Options.js
index a08da6e1..ef7a336f 100644
--- a/www/manager6/qemu/Options.js
+++ b/www/manager6/qemu/Options.js
@@ -6,7 +6,6 @@ Ext.define('PVE.qemu.Options', {
initComponent: function() {
var me = this;
- var i;
var nodename = me.pveSelNode.data.node;
if (!nodename) {
@@ -99,7 +98,6 @@ Ext.define('PVE.qemu.Options', {
if (boot.order) {
let list = boot.order.split(';');
let ret = '';
- let i = 1;
list.forEach(dev => {
if (ret) {
ret += ', ';
@@ -110,7 +108,7 @@ Ext.define('PVE.qemu.Options', {
}
// legacy style and fallback
- var i;
+ let i;
var text = '';
var bootdisk = me.getObjectValue('bootdisk', undefined, pending);
order = boot.legacy || 'cdn';
diff --git a/www/manager6/qemu/Smbios1Edit.js b/www/manager6/qemu/Smbios1Edit.js
index af64cc07..fc159125 100644
--- a/www/manager6/qemu/Smbios1Edit.js
+++ b/www/manager6/qemu/Smbios1Edit.js
@@ -106,7 +106,6 @@ Ext.define('PVE.qemu.Smbios1Edit', {
me.load({
success: function(response, options) {
- var i, confid;
me.vmconfig = response.result.data;
var value = me.vmconfig.smbios1;
if (value) {
diff --git a/www/manager6/storage/NFSEdit.js b/www/manager6/storage/NFSEdit.js
index 5fc8265c..a1be8e74 100644
--- a/www/manager6/storage/NFSEdit.js
+++ b/www/manager6/storage/NFSEdit.js
@@ -93,7 +93,6 @@ Ext.define('PVE.storage.NFSInputPanel', {
setValues: function(values) {
var me = this;
if (values.options) {
- var res = values.options;
me.options = values.options.split(',');
me.options.forEach(function(item) {
var match = item.match(/^vers=(.*)$/);
diff --git a/www/manager6/storage/TemplateView.js b/www/manager6/storage/TemplateView.js
index 6fcfd1d3..a2a05e00 100644
--- a/www/manager6/storage/TemplateView.js
+++ b/www/manager6/storage/TemplateView.js
@@ -183,8 +183,6 @@ Ext.define('PVE.storage.TemplateView', {
me.content = 'vztmpl';
- var sm = me.sm = Ext.create('Ext.selection.RowModel', {});
-
var reload = function() {
me.store.load();
};
--
2.20.1
More information about the pve-devel
mailing list