From: "Dominic Jäger" <d.jaeger@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 2/6] No unused or duplicate variables
Date: Tue, 18 May 2021 14:12:14 +0200 [thread overview]
Message-ID: <20210518121218.125661-3-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/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
next prev 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 ` Dominic Jäger [this message]
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 ` [pve-devel] [PATCH manager 5/6] State equalities more precisely Dominic Jäger
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-3-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