* [pve-devel] [PATCH V2 manager 3/3] cleanup: "var" to "let" in all javascript files
2022-06-22 14:39 [pve-devel] [PATCH V2 manager 0/3] add iscsi, lvm, lvmthin & zfs storage on all cluster nodes Stefan Hrdlicka
2022-06-22 14:39 ` [pve-devel] [PATCH V2 manager 1/3] fix #2822: add iscsi, lvm, lvmthin & zfs storage for " Stefan Hrdlicka
2022-06-22 14:39 ` [pve-devel] [PATCH V2 manager 2/3] cleanup: "var" to "let", fix some indentation in related files Stefan Hrdlicka
@ 2022-06-22 14:39 ` Stefan Hrdlicka
2 siblings, 0 replies; 8+ messages in thread
From: Stefan Hrdlicka @ 2022-06-22 14:39 UTC (permalink / raw)
To: pve-devel
this adds curly braces around "case:" statements so variable scope is limited
Signed-off-by: Stefan Hrdlicka <s.hrdlicka@proxmox.com>
---
www/manager6/Parser.js | 8 +-
www/manager6/StateProvider.js | 2 +-
www/manager6/Utils.js | 139 +++++++++---------
www/manager6/VNCConsole.js | 10 +-
www/manager6/Workspace.js | 12 +-
www/manager6/button/ConsoleButton.js | 4 +-
www/manager6/button/Split.js | 10 +-
www/manager6/ceph/CephInstallWizard.js | 36 ++---
www/manager6/ceph/Config.js | 16 +-
www/manager6/ceph/Crush.js | 6 +-
www/manager6/ceph/FS.js | 6 +-
www/manager6/ceph/Log.js | 6 +-
www/manager6/ceph/Pool.js | 10 +-
www/manager6/ceph/Services.js | 12 +-
www/manager6/ceph/Status.js | 16 +-
www/manager6/ceph/StatusDetail.js | 4 +-
www/manager6/controller/StorageEdit.js | 4 +-
www/manager6/data/PermPathStore.js | 2 +-
www/manager6/data/ResourceStore.js | 4 +-
www/manager6/dc/ACLView.js | 6 +-
www/manager6/dc/ACMEPluginEdit.js | 2 +-
www/manager6/dc/AuthEditBase.js | 4 +-
www/manager6/dc/AuthView.js | 2 +-
www/manager6/dc/Backup.js | 14 +-
www/manager6/dc/BackupJobDetail.js | 10 +-
www/manager6/dc/ClusterEdit.js | 6 +-
www/manager6/dc/Config.js | 4 +-
www/manager6/dc/GroupEdit.js | 6 +-
www/manager6/dc/GroupView.js | 22 +--
www/manager6/dc/MetricServerView.js | 2 +-
www/manager6/dc/NodeView.js | 2 +-
www/manager6/dc/OptionView.js | 10 +-
www/manager6/dc/PoolView.js | 22 +--
www/manager6/dc/RoleEdit.js | 10 +-
www/manager6/dc/SecurityGroups.js | 10 +-
www/manager6/dc/Summary.js | 20 +--
www/manager6/dc/Support.js | 16 +-
www/manager6/dc/Tasks.js | 6 +-
www/manager6/dc/UserEdit.js | 4 +-
www/manager6/dc/UserView.js | 10 +-
www/manager6/form/AgentFeatureSelector.js | 2 +-
www/manager6/form/BridgeSelector.js | 6 +-
www/manager6/form/BusTypeSelector.js | 2 +-
www/manager6/form/CephFSSelector.js | 4 +-
www/manager6/form/CephPoolSelector.js | 4 +-
www/manager6/form/ContentTypeSelector.js | 2 +-
www/manager6/form/ControllerSelector.js | 2 +-
www/manager6/form/DayOfWeekSelector.js | 2 +-
www/manager6/form/DiskStorageSelector.js | 24 +--
www/manager6/form/FileSelector.js | 8 +-
www/manager6/form/GlobalSearchField.js | 14 +-
www/manager6/form/GroupSelector.js | 4 +-
www/manager6/form/GuestIDSelector.js | 12 +-
www/manager6/form/HotplugFeatureSelector.js | 6 +-
www/manager6/form/IPRefSelector.js | 10 +-
www/manager6/form/MDevSelector.js | 8 +-
www/manager6/form/MemoryField.js | 32 ++--
www/manager6/form/NodeSelector.js | 2 +-
www/manager6/form/PCISelector.js | 6 +-
www/manager6/form/PoolSelector.js | 4 +-
www/manager6/form/QemuBiosSelector.js | 2 +-
www/manager6/form/SDNControllerSelector.js | 4 +-
www/manager6/form/SDNDnsSelector.js | 4 +-
www/manager6/form/SDNIpamSelector.js | 4 +-
www/manager6/form/SDNVnetSelector.js | 4 +-
www/manager6/form/SDNZoneSelector.js | 4 +-
www/manager6/form/SecurityGroupSelector.js | 4 +-
www/manager6/form/SnapshotSelector.js | 6 +-
www/manager6/form/SpiceEnhancementSelector.js | 8 +-
www/manager6/form/StorageSelector.js | 8 +-
www/manager6/form/USBSelector.js | 6 +-
www/manager6/form/VLanField.js | 4 +-
www/manager6/form/VMCPUFlagSelector.js | 30 ++--
www/manager6/form/VMSelector.js | 12 +-
www/manager6/grid/BackupView.js | 36 ++---
www/manager6/grid/FirewallAliases.js | 4 +-
www/manager6/grid/FirewallOptions.js | 18 +--
www/manager6/grid/FirewallRules.js | 64 ++++----
www/manager6/grid/PoolMembers.js | 32 ++--
www/manager6/grid/Replication.js | 20 +--
www/manager6/grid/ResourceGrid.js | 4 +-
www/manager6/ha/Fencing.js | 4 +-
www/manager6/ha/GroupEdit.js | 12 +-
www/manager6/ha/GroupSelector.js | 2 +-
www/manager6/ha/Groups.js | 10 +-
www/manager6/ha/ResourceEdit.js | 28 ++--
www/manager6/ha/Status.js | 2 +-
www/manager6/ha/StatusView.js | 8 +-
www/manager6/lxc/Config.js | 42 +++---
www/manager6/lxc/CreateWizard.js | 2 +-
www/manager6/lxc/DNS.js | 50 +++----
www/manager6/lxc/FeaturesEdit.js | 10 +-
www/manager6/lxc/MPEdit.js | 8 +-
www/manager6/lxc/MPResize.js | 18 +--
www/manager6/lxc/Options.js | 28 ++--
www/manager6/lxc/ResourceEdit.js | 14 +-
www/manager6/lxc/Resources.js | 42 +++---
www/manager6/node/ACME.js | 16 +-
www/manager6/node/Certificates.js | 4 +-
www/manager6/node/Config.js | 20 +--
www/manager6/node/Directory.js | 2 +-
www/manager6/node/LVMThin.js | 2 +-
www/manager6/node/StatusView.js | 4 +-
www/manager6/node/Subscription.js | 34 ++---
www/manager6/node/Summary.js | 18 +--
www/manager6/node/ZFS.js | 4 +-
www/manager6/panel/ConfigPanel.js | 58 ++++----
www/manager6/panel/GuestStatusView.js | 16 +-
www/manager6/panel/GuestSummary.js | 16 +-
www/manager6/panel/HealthWidget.js | 4 +-
www/manager6/panel/IPSet.js | 62 ++++----
www/manager6/panel/RunningChart.js | 4 +-
www/manager6/panel/StatusPanel.js | 14 +-
www/manager6/panel/TemplateStatusView.js | 4 +-
www/manager6/pool/Config.js | 4 +-
www/manager6/pool/StatusView.js | 6 +-
www/manager6/pool/Summary.js | 8 +-
www/manager6/qemu/AgentIPView.js | 40 ++---
www/manager6/qemu/AudioEdit.js | 6 +-
www/manager6/qemu/CDEdit.js | 32 ++--
www/manager6/qemu/CIDriveEdit.js | 16 +-
www/manager6/qemu/CloudInit.js | 68 ++++-----
www/manager6/qemu/Config.js | 52 +++----
www/manager6/qemu/CreateWizard.js | 14 +-
www/manager6/qemu/HDEdit.js | 38 ++---
www/manager6/qemu/HDEfi.js | 12 +-
www/manager6/qemu/HDResize.js | 14 +-
www/manager6/qemu/HDTPM.js | 14 +-
www/manager6/qemu/HardwareView.js | 58 ++++----
www/manager6/qemu/IPConfigEdit.js | 24 +--
www/manager6/qemu/KeyboardEdit.js | 2 +-
www/manager6/qemu/MemoryEdit.js | 32 ++--
www/manager6/qemu/Monitor.js | 39 ++---
www/manager6/qemu/NetworkEdit.js | 24 +--
www/manager6/qemu/OSDefaults.js | 2 +-
www/manager6/qemu/OSTypeEdit.js | 20 +--
www/manager6/qemu/Options.js | 36 ++---
www/manager6/qemu/PCIEdit.js | 8 +-
www/manager6/qemu/ProcessorEdit.js | 18 +--
www/manager6/qemu/RNGEdit.js | 6 +-
www/manager6/qemu/SSHKey.js | 12 +-
www/manager6/qemu/ScsiHwEdit.js | 2 +-
www/manager6/qemu/SerialEdit.js | 12 +-
www/manager6/qemu/Smbios1Edit.js | 14 +-
www/manager6/qemu/SystemEdit.js | 4 +-
www/manager6/qemu/USBEdit.js | 20 +--
www/manager6/sdn/Browser.js | 8 +-
www/manager6/sdn/ControllerView.js | 6 +-
www/manager6/sdn/Status.js | 2 +-
www/manager6/sdn/StatusView.js | 8 +-
www/manager6/sdn/SubnetEdit.js | 2 +-
www/manager6/sdn/SubnetView.js | 2 +-
www/manager6/sdn/VnetEdit.js | 2 +-
www/manager6/sdn/VnetPanel.js | 6 +-
www/manager6/sdn/VnetView.js | 2 +-
www/manager6/sdn/ZoneContentView.js | 14 +-
www/manager6/sdn/ZoneView.js | 2 +-
www/manager6/sdn/controllers/Base.js | 10 +-
www/manager6/sdn/controllers/BgpEdit.js | 4 +-
www/manager6/sdn/controllers/EvpnEdit.js | 2 +-
www/manager6/sdn/dns/Base.js | 12 +-
www/manager6/sdn/dns/PowerdnsEdit.js | 4 +-
www/manager6/sdn/ipams/Base.js | 12 +-
www/manager6/sdn/ipams/NetboxEdit.js | 4 +-
www/manager6/sdn/ipams/PVEIpamEdit.js | 4 +-
www/manager6/sdn/ipams/PhpIpamEdit.js | 4 +-
www/manager6/sdn/zones/Base.js | 12 +-
www/manager6/sdn/zones/EvpnEdit.js | 4 +-
www/manager6/sdn/zones/SimpleEdit.js | 4 +-
www/manager6/sdn/zones/VlanEdit.js | 4 +-
www/manager6/sdn/zones/VxlanEdit.js | 4 +-
www/manager6/storage/BackupView.js | 16 +-
www/manager6/storage/Browser.js | 8 +-
www/manager6/storage/CIFSEdit.js | 12 +-
www/manager6/storage/CephFSEdit.js | 2 +-
www/manager6/storage/ContentView.js | 4 +-
www/manager6/storage/DirEdit.js | 2 +-
www/manager6/storage/GlusterFsEdit.js | 12 +-
www/manager6/storage/ImageView.js | 22 +--
www/manager6/storage/NFSEdit.js | 24 +--
www/manager6/storage/PBSEdit.js | 2 +-
www/manager6/storage/RBDEdit.js | 12 +-
www/manager6/storage/Summary.js | 10 +-
www/manager6/storage/TemplateView.js | 36 ++---
www/manager6/storage/ZFSEdit.js | 6 +-
www/manager6/tree/SnapshotTree.js | 12 +-
www/manager6/window/Backup.js | 18 +--
www/manager6/window/BackupConfig.js | 4 +-
www/manager6/window/BulkAction.js | 16 +-
www/manager6/window/Clone.js | 38 ++---
www/manager6/window/DownloadUrlToStorage.js | 4 +-
www/manager6/window/FirewallEnableEdit.js | 2 +-
www/manager6/window/FirewallLograteEdit.js | 2 +-
www/manager6/window/LoginWindow.js | 62 ++++----
www/manager6/window/Migrate.js | 16 +-
www/manager6/window/Prune.js | 6 +-
www/manager6/window/Settings.js | 26 ++--
www/manager6/window/Snapshot.js | 4 +-
www/manager6/window/StartupEdit.js | 10 +-
www/manager6/window/Wizard.js | 4 +-
200 files changed, 1339 insertions(+), 1337 deletions(-)
diff --git a/www/manager6/Parser.js b/www/manager6/Parser.js
index 9f7b2c84..044e4be7 100644
--- a/www/manager6/Parser.js
+++ b/www/manager6/Parser.js
@@ -79,7 +79,7 @@ Ext.define('PVE.Parser', {
},
printPropertyString: function(data, defaultKey) {
- var stringparts = [],
+ let stringparts = [],
gotDefaultKeyVal = false,
defaultKeyVal;
@@ -150,7 +150,7 @@ Ext.define('PVE.Parser', {
},
printQemuNetwork: function(net) {
- var netstr = net.model;
+ let netstr = net.model;
if (net.macaddr) {
netstr += "=" + net.macaddr;
}
@@ -195,7 +195,7 @@ Ext.define('PVE.Parser', {
index,
};
- var errors = false;
+ let errors = false;
Ext.Array.each(value.split(','), function(p) {
if (!p || p.match(/^\s*$/)) {
return undefined; // continue
@@ -236,7 +236,7 @@ Ext.define('PVE.Parser', {
},
printQemuDrive: function(drive) {
- var drivestr = drive.file;
+ let drivestr = drive.file;
Ext.Object.each(drive, function(key, value) {
if (!Ext.isDefined(value) || key === 'file' ||
diff --git a/www/manager6/StateProvider.js b/www/manager6/StateProvider.js
index fafbb112..bd4c1160 100644
--- a/www/manager6/StateProvider.js
+++ b/www/manager6/StateProvider.js
@@ -228,7 +228,7 @@ Ext.define('PVE.StateProvider', {
let me = this;
if (typeof me.UIState[name] !== "undefined") {
- var newvalue = value ? value.value : null;
+ let newvalue = value ? value.value : null;
if (me.setHV(name, newvalue, fireevent)) {
let htext = me.encodeHToken(me.UIState);
Ext.History.add(htext);
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 7ca6a271..bc43ac43 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -77,7 +77,7 @@ Ext.define('PVE.Utils', {
state = 'uknown';
}
- var icon = 'faded fa-question';
+ let icon = 'faded fa-question';
switch (state) {
case 'good':
icon = 'good fa-check';
@@ -110,7 +110,7 @@ Ext.define('PVE.Utils', {
}
if (service.ceph_version) {
- var match = service.ceph_version.match(/version (\d+(\.\d+)*)/);
+ let match = service.ceph_version.match(/version (\d+(\.\d+)*)/);
if (match) {
return match[1];
}
@@ -158,8 +158,8 @@ Ext.define('PVE.Utils', {
},
get_ceph_icon_html: function(health, fw) {
- var state = PVE.Utils.map_ceph_health[health];
- var cls = PVE.Utils.get_health_icon(state);
+ let state = PVE.Utils.map_ceph_health[health];
+ let cls = PVE.Utils.get_health_icon(state);
if (fw) {
cls += ' fa-fw';
}
@@ -219,7 +219,7 @@ Ext.define('PVE.Utils', {
},
render_ceph_health: function(healthObj) {
- var state = {
+ let state = {
iconCls: PVE.Utils.get_health_icon(),
text: '',
};
@@ -228,7 +228,7 @@ Ext.define('PVE.Utils', {
return state;
}
- var health = PVE.Utils.map_ceph_health[healthObj.status];
+ let health = PVE.Utils.map_ceph_health[healthObj.status];
state.iconCls = PVE.Utils.get_health_icon(health, true);
state.text = healthObj.status;
@@ -240,7 +240,7 @@ Ext.define('PVE.Utils', {
if (typeof value === 'undefined') {
return "";
}
- var iconCls = 'question-circle';
+ let iconCls = 'question-circle';
switch (value) {
case 'AVAIL':
case 'ONLINE':
@@ -325,12 +325,12 @@ Ext.define('PVE.Utils', {
},
render_backup_days_of_week: function(val) {
- var dows = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
- var selected = [];
- var cur = -1;
+ let dows = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
+ let selected = [];
+ let cur = -1;
val.split(',').forEach(function(day) {
cur++;
- var dow = (dows.indexOf(day)+6)%7;
+ let dow = (dows.indexOf(day)+6)%7;
if (cur === dow) {
if (selected.length === 0 || selected[selected.length-1] === 0) {
selected.push(1);
@@ -347,7 +347,7 @@ Ext.define('PVE.Utils', {
});
cur = -1;
- var days = [];
+ let days = [];
selected.forEach(function(item) {
cur++;
if (item > 2) {
@@ -394,7 +394,7 @@ Ext.define('PVE.Utils', {
},
get_kvm_osinfo: function(value) {
- var info = { base: 'Other' }; // default
+ let info = { base: 'Other' }; // default
if (value) {
Ext.each(Object.keys(PVE.Utils.kvm_ostypes), function(k) {
Ext.each(PVE.Utils.kvm_ostypes[k], function(e) {
@@ -408,7 +408,7 @@ Ext.define('PVE.Utils', {
},
render_kvm_ostype: function(value) {
- var osinfo = PVE.Utils.get_kvm_osinfo(value);
+ let osinfo = PVE.Utils.get_kvm_osinfo(value);
if (osinfo.desc && osinfo.desc !== '-') {
return osinfo.base + ' ' + osinfo.desc;
} else {
@@ -417,7 +417,7 @@ Ext.define('PVE.Utils', {
},
render_hotplug_features: function(value) {
- var fa = [];
+ let fa = [];
if (!value || value === '0') {
return gettext('Disabled');
@@ -632,9 +632,9 @@ Ext.define('PVE.Utils', {
},
render_kvm_startup: function(value) {
- var startup = PVE.Parser.parseStartup(value);
+ let startup = PVE.Parser.parseStartup(value);
- var res = 'order=';
+ let res = 'order=';
if (startup.order === undefined) {
res += 'any';
} else {
@@ -651,18 +651,19 @@ Ext.define('PVE.Utils', {
},
extractFormActionError: function(action) {
- var msg;
+ let msg;
switch (action.failureType) {
case Ext.form.action.Action.CLIENT_INVALID:
msg = gettext('Form fields may not be submitted with invalid values');
break;
- case Ext.form.action.Action.CONNECT_FAILURE:
+ case Ext.form.action.Action.CONNECT_FAILURE: {
msg = gettext('Connection error');
- var resp = action.response;
+ let resp = action.response;
if (resp.status && resp.statusText) {
msg += " " + resp.status + ": " + resp.statusText;
}
break;
+ }
case Ext.form.action.Action.LOAD_FAILURE:
case Ext.form.action.Action.SERVER_INVALID:
msg = Proxmox.Utils.extractRequestError(action.result, true);
@@ -921,7 +922,7 @@ Ext.define('PVE.Utils', {
},
format_sdnvnet_type: function(value, md, record) {
- var schema = PVE.Utils.sdnvnetSchema[value];
+ let schema = PVE.Utils.sdnvnetSchema[value];
if (schema) {
return schema.name;
}
@@ -929,7 +930,7 @@ Ext.define('PVE.Utils', {
},
format_sdnzone_type: function(value, md, record) {
- var schema = PVE.Utils.sdnzoneSchema[value];
+ let schema = PVE.Utils.sdnzoneSchema[value];
if (schema) {
return schema.name;
}
@@ -937,7 +938,7 @@ Ext.define('PVE.Utils', {
},
format_sdncontroller_type: function(value, md, record) {
- var schema = PVE.Utils.sdncontrollerSchema[value];
+ let schema = PVE.Utils.sdncontrollerSchema[value];
if (schema) {
return schema.name;
}
@@ -945,7 +946,7 @@ Ext.define('PVE.Utils', {
},
format_sdnipam_type: function(value, md, record) {
- var schema = PVE.Utils.sdnipamSchema[value];
+ let schema = PVE.Utils.sdnipamSchema[value];
if (schema) {
return schema.name;
}
@@ -953,7 +954,7 @@ Ext.define('PVE.Utils', {
},
format_sdndns_type: function(value, md, record) {
- var schema = PVE.Utils.sdndnsSchema[value];
+ let schema = PVE.Utils.sdndnsSchema[value];
if (schema) {
return schema.name;
}
@@ -972,7 +973,7 @@ Ext.define('PVE.Utils', {
},
format_ha: function(value) {
- var text = Proxmox.Utils.noneText;
+ let text = Proxmox.Utils.noneText;
if (value.managed) {
text = value.state || Proxmox.Utils.noneText;
@@ -991,7 +992,7 @@ Ext.define('PVE.Utils', {
},
render_storage_content: function(value, metaData, record) {
- var data = record.data;
+ let data = record.data;
if (Ext.isNumber(data.channel) &&
Ext.isNumber(data.id) &&
Ext.isNumber(data.lun)) {
@@ -1015,12 +1016,12 @@ Ext.define('PVE.Utils', {
return -1;
}
- var index = PVE.data.ResourceStore.findExact('id', 'node/' + data.node);
- var node = PVE.data.ResourceStore.getAt(index);
+ let index = PVE.data.ResourceStore.findExact('id', 'node/' + data.node);
+ let node = PVE.data.ResourceStore.getAt(index);
if (!Ext.isDefined(node) || node === null) {
return -1;
}
- var maxcpu = node.data.maxcpu || 1;
+ let maxcpu = node.data.maxcpu || 1;
if (!Ext.isNumeric(maxcpu) && (maxcpu >= 1)) {
return -1;
@@ -1038,18 +1039,18 @@ Ext.define('PVE.Utils', {
return '';
}
- var index = PVE.data.ResourceStore.findExact('id', 'node/' + record.data.node);
- var node = PVE.data.ResourceStore.getAt(index);
+ let index = PVE.data.ResourceStore.findExact('id', 'node/' + record.data.node);
+ let node = PVE.data.ResourceStore.getAt(index);
if (!Ext.isDefined(node) || node === null) {
return '';
}
- var maxcpu = node.data.maxcpu || 1;
+ let maxcpu = node.data.maxcpu || 1;
if (!Ext.isNumeric(maxcpu) && (maxcpu >= 1)) {
return '';
}
- var per = (record.data.cpu/maxcpu) * record.data.maxcpu * 100;
+ let per = (record.data.cpu/maxcpu) * record.data.maxcpu * 100;
return per.toFixed(1) + '% of ' + maxcpu.toString() + (maxcpu > 1 ? 'CPUs' : 'CPU');
},
@@ -1093,13 +1094,13 @@ Ext.define('PVE.Utils', {
return -1;
}
- var index = PVE.data.ResourceStore.findExact('id', 'node/' + data.node);
- var node = PVE.data.ResourceStore.getAt(index);
+ let index = PVE.data.ResourceStore.findExact('id', 'node/' + data.node);
+ let node = PVE.data.ResourceStore.getAt(index);
if (!Ext.isDefined(node) || node === null) {
return -1;
}
- var maxmem = node.data.maxmem || 0;
+ let maxmem = node.data.maxmem || 0;
if (!Ext.isNumeric(data.mem) ||
maxmem === 0 ||
@@ -1116,8 +1117,8 @@ Ext.define('PVE.Utils', {
}
if (value > 1) {
// we got no percentage but bytes
- var mem = value;
- var maxmem = record.data.maxmem;
+ let mem = value;
+ let maxmem = record.data.maxmem;
if (!record.data.uptime ||
maxmem === 0 ||
!Ext.isNumeric(mem)) {
@@ -1138,13 +1139,13 @@ Ext.define('PVE.Utils', {
return '';
}
- var index = PVE.data.ResourceStore.findExact('id', 'node/' + record.data.node);
- var node = PVE.data.ResourceStore.getAt(index);
- var maxmem = node.data.maxmem || 0;
+ let index = PVE.data.ResourceStore.findExact('id', 'node/' + record.data.node);
+ let node = PVE.data.ResourceStore.getAt(index);
+ let maxmem = node.data.maxmem || 0;
if (record.data.mem > 1) {
// we got no percentage but bytes
- var mem = record.data.mem;
+ let mem = record.data.mem;
if (!record.data.uptime ||
maxmem === 0 ||
!Ext.isNumeric(mem)) {
@@ -1157,8 +1158,8 @@ Ext.define('PVE.Utils', {
},
render_mem_usage: function(value, metaData, record, rowIndex, colIndex, store) {
- var mem = value;
- var maxmem = record.data.maxmem;
+ let mem = value;
+ let maxmem = record.data.maxmem;
if (!record.data.uptime) {
return '';
@@ -1191,9 +1192,9 @@ Ext.define('PVE.Utils', {
},
render_disk_usage: function(value, metaData, record, rowIndex, colIndex, store) {
- var disk = value;
- var maxdisk = record.data.maxdisk;
- var type = record.data.type;
+ let disk = value;
+ let maxdisk = record.data.maxdisk;
+ let type = record.data.type;
if (!Ext.isNumeric(disk) ||
maxdisk === 0 ||
@@ -1206,8 +1207,8 @@ Ext.define('PVE.Utils', {
},
get_object_icon_class: function(type, record) {
- var status = '';
- var objType = type;
+ let status = '';
+ let objType = type;
if (type === 'type') {
// for folder view
@@ -1225,9 +1226,9 @@ Ext.define('PVE.Utils', {
status += ' locked lock-' + record.lock;
}
- var defaults = PVE.tree.ResourceTree.typeDefaults[objType];
+ let defaults = PVE.tree.ResourceTree.typeDefaults[objType];
if (defaults && defaults.iconCls) {
- var retVal = defaults.iconCls + ' ' + status;
+ let retVal = defaults.iconCls + ' ' + status;
return retVal;
}
@@ -1235,9 +1236,9 @@ Ext.define('PVE.Utils', {
},
render_resource_type: function(value, metaData, record, rowIndex, colIndex, store) {
- var cls = PVE.Utils.get_object_icon_class(value, record.data);
+ let cls = PVE.Utils.get_object_icon_class(value, record.data);
- var fa = '<i class="fa-fw x-grid-icon-custom ' + cls + '"></i> ';
+ let fa = '<i class="fa-fw x-grid-icon-custom ' + cls + '"></i> ';
return fa + value;
},
@@ -1246,8 +1247,8 @@ Ext.define('PVE.Utils', {
},
render_upid: function(value, metaData, record) {
- var type = record.data.type;
- var id = record.data.id;
+ let type = record.data.type;
+ let id = record.data.id;
return Proxmox.Utils.format_task_description(type, id);
},
@@ -1260,7 +1261,7 @@ Ext.define('PVE.Utils', {
},
render_san: function(value) {
- var names = [];
+ let names = [];
if (Ext.isArray(value)) {
value.forEach(function(val) {
if (!Ext.isNumber(val)) {
@@ -1273,8 +1274,8 @@ Ext.define('PVE.Utils', {
},
render_full_name: function(firstname, metaData, record) {
- var first = firstname || '';
- var last = record.data.lastname || '';
+ let first = firstname || '';
+ let last = record.data.lastname || '';
return Ext.htmlEncode(first + " " + last);
},
@@ -1284,7 +1285,7 @@ Ext.define('PVE.Utils', {
},
openDefaultConsoleWindow: function(consoles, consoleType, vmid, nodename, vmname, cmd) {
- var dv = PVE.Utils.defaultViewer(consoles, consoleType);
+ let dv = PVE.Utils.defaultViewer(consoles, consoleType);
PVE.Utils.openConsoleWindow(dv, consoleType, vmid, nodename, vmname, cmd);
},
@@ -1323,7 +1324,7 @@ Ext.define('PVE.Utils', {
},
defaultViewer: function(consoles, type) {
- var allowSpice, allowXtermjs;
+ let allowSpice, allowXtermjs;
if (consoles === true) {
allowSpice = true;
@@ -1345,10 +1346,10 @@ Ext.define('PVE.Utils', {
openVNCViewer: function(vmtype, vmid, nodename, vmname, cmd) {
let scaling = 'off';
if (Proxmox.Utils.toolkit !== 'touch') {
- var sp = Ext.state.Manager.getProvider();
+ let sp = Ext.state.Manager.getProvider();
scaling = sp.get('novnc-scaling', 'off');
}
- var url = Ext.Object.toQueryString({
+ let url = Ext.Object.toQueryString({
console: vmtype, // kvm, lxc, upgrade or shell
novnc: 1,
vmid: vmid,
@@ -1357,15 +1358,15 @@ Ext.define('PVE.Utils', {
resize: scaling,
cmd: cmd,
});
- var nw = window.open("?" + url, '_blank', "innerWidth=745,innerheight=427");
+ let nw = window.open("?" + url, '_blank', "innerWidth=745,innerheight=427");
if (nw) {
nw.focus();
}
},
openSpiceViewer: function(url, params) {
- var downloadWithName = function(uri, name) {
- var link = Ext.DomHelper.append(document.body, {
+ let downloadWithName = function(uri, name) {
+ let link = Ext.DomHelper.append(document.body, {
tag: 'a',
href: uri,
css: 'display:none;visibility:hidden;height:0px;',
@@ -1626,8 +1627,8 @@ Ext.define('PVE.Utils', {
if (Proxmox.UserName === 'root@pam') {
container.el.mask();
if (!container.down('pveCephInstallWindow')) {
- var isInstalled = !!msg.match(/not initialized/i);
- var win = Ext.create('PVE.ceph.Install', {
+ let isInstalled = !!msg.match(/not initialized/i);
+ let win = Ext.create('PVE.ceph.Install', {
nodename: nodename,
});
win.getViewModel().set('isInstalled', isInstalled);
@@ -1807,7 +1808,7 @@ Ext.define('PVE.Utils', {
singleton: true,
constructor: function() {
- var me = this;
+ let me = this;
Ext.apply(me, me.utilities);
Proxmox.Utils.override_task_descriptions({
diff --git a/www/manager6/VNCConsole.js b/www/manager6/VNCConsole.js
index 9057e447..1f4c0e96 100644
--- a/www/manager6/VNCConsole.js
+++ b/www/manager6/VNCConsole.js
@@ -13,7 +13,7 @@ Ext.define('PVE.noVncConsole', {
border: false,
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no node name specified";
@@ -29,9 +29,9 @@ Ext.define('PVE.noVncConsole', {
// always use same iframe, to avoid running several noVnc clients
// at same time (to avoid performance problems)
- var box = Ext.create('Ext.ux.IFrame', { itemid: "vncconsole" });
+ let box = Ext.create('Ext.ux.IFrame', { itemid: "vncconsole" });
- var type = me.xtermjs ? 'xtermjs' : 'novnc';
+ let type = me.xtermjs ? 'xtermjs' : 'novnc';
Ext.apply(me, {
items: box,
listeners: {
@@ -50,7 +50,7 @@ Ext.define('PVE.noVncConsole', {
};
queryDict[type] = 1;
PVE.Utils.cleanEmptyObjectKeys(queryDict);
- var url = '/?' + Ext.Object.toQueryString(queryDict);
+ let url = '/?' + Ext.Object.toQueryString(queryDict);
box.load(url);
},
},
@@ -65,7 +65,7 @@ Ext.define('PVE.noVncConsole', {
reload: function() {
// reload IFrame content to forcibly reconnect VNC/xterm.js to VM
- var box = this.down('[itemid=vncconsole]');
+ let box = this.down('[itemid=vncconsole]');
box.getWin().location.reload();
},
});
diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js
index 37d772b8..9831571a 100644
--- a/www/manager6/Workspace.js
+++ b/www/manager6/Workspace.js
@@ -366,7 +366,7 @@ Ext.define('PVE.StdWorkspace', {
iconCls: 'fa fa-gear',
text: gettext('My Settings'),
handler: function() {
- var win = Ext.create('PVE.window.Settings');
+ let win = Ext.create('PVE.window.Settings');
win.show();
},
},
@@ -375,7 +375,7 @@ Ext.define('PVE.StdWorkspace', {
itemId: 'passworditem',
iconCls: 'fa fa-fw fa-key',
handler: function() {
- var win = Ext.create('Proxmox.window.PasswordEdit', {
+ let win = Ext.create('Proxmox.window.PasswordEdit', {
userid: Proxmox.UserName,
});
win.show();
@@ -406,12 +406,12 @@ Ext.define('PVE.StdWorkspace', {
PVE.data.ResourceStore.loadData([], false);
me.showLogin();
me.setContent(null);
- var rt = me.down('pveResourceTree');
+ let rt = me.down('pveResourceTree');
rt.setDatacenterText(undefined);
rt.clearTree();
// empty the stores of the StatusPanel child items
- var statusPanels = Ext.ComponentQuery.query('pveStatusPanel grid');
+ let statusPanels = Ext.ComponentQuery.query('pveStatusPanel grid');
Ext.Array.forEach(statusPanels, function(comp) {
if (comp.getStore()) {
comp.getStore().loadData([], false);
@@ -450,7 +450,7 @@ Ext.define('PVE.StdWorkspace', {
items: [selview, rtree],
listeners: {
resize: function(panel, width, height) {
- var viewWidth = me.getSize().width;
+ let viewWidth = me.getSize().width;
if (width > viewWidth - 100) {
panel.setWidth(viewWidth - 100);
}
@@ -471,7 +471,7 @@ Ext.define('PVE.StdWorkspace', {
split: true,
listeners: {
resize: function(panel, width, height) {
- var viewHeight = me.getSize().height;
+ let viewHeight = me.getSize().height;
if (height > viewHeight - 150) {
panel.setHeight(viewHeight - 150);
}
diff --git a/www/manager6/button/ConsoleButton.js b/www/manager6/button/ConsoleButton.js
index 62928e47..edae7425 100644
--- a/www/manager6/button/ConsoleButton.js
+++ b/www/manager6/button/ConsoleButton.js
@@ -20,14 +20,14 @@ Ext.define('PVE.button.ConsoleButton', {
text: gettext('Console'),
setEnableSpice: function(enable) {
- var me = this;
+ let me = this;
me.enableSpice = enable;
me.down('#spicemenu').setDisabled(!enable);
},
setEnableXtermJS: function(enable) {
- var me = this;
+ let me = this;
me.enableXtermjs = enable;
me.down('#xtermjs').setDisabled(!enable);
diff --git a/www/manager6/button/Split.js b/www/manager6/button/Split.js
index 090571de..c558ba21 100644
--- a/www/manager6/button/Split.js
+++ b/www/manager6/button/Split.js
@@ -23,8 +23,8 @@ Ext.define('PVE.button.Split', {
dangerous: false,
handlerWrapper: function(button, event) {
- var me = this;
- var rec, msg;
+ let me = this;
+ let rec, msg;
if (me.selModel) {
rec = me.selModel.getSelection()[0];
if (!rec || me.enableFn(rec) === false) {
@@ -57,7 +57,7 @@ Ext.define('PVE.button.Split', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (me.handler) {
me.realHandler = me.handler;
@@ -73,7 +73,7 @@ Ext.define('PVE.button.Split', {
if (item.selModel) {
me.mon(item.selModel, "selectionchange", function() {
- var rec = item.selModel.getSelection()[0];
+ let rec = item.selModel.getSelection()[0];
if (!rec || item.enableFn(rec) === false) {
item.setDisabled(true);
} else {
@@ -88,7 +88,7 @@ Ext.define('PVE.button.Split', {
if (me.selModel) {
me.mon(me.selModel, "selectionchange", function() {
- var rec = me.selModel.getSelection()[0];
+ let rec = me.selModel.getSelection()[0];
if (!rec || me.enableFn(rec) === false) {
me.setDisabled(true);
} else {
diff --git a/www/manager6/ceph/CephInstallWizard.js b/www/manager6/ceph/CephInstallWizard.js
index 79b0f4e4..145b6537 100644
--- a/www/manager6/ceph/CephInstallWizard.js
+++ b/www/manager6/ceph/CephInstallWizard.js
@@ -154,25 +154,25 @@ Ext.define('PVE.ceph.CephInstallWizard', {
title: gettext('Setup'),
navigateNext: function() {
- var tp = this.down('#wizcontent');
- var atab = tp.getActiveTab();
+ let tp = this.down('#wizcontent');
+ let atab = tp.getActiveTab();
- var next = tp.items.indexOf(atab) + 1;
- var ntab = tp.items.getAt(next);
+ let next = tp.items.indexOf(atab) + 1;
+ let ntab = tp.items.getAt(next);
if (ntab) {
ntab.enable();
tp.setActiveTab(ntab);
}
},
setInitialTab: function(index) {
- var tp = this.down('#wizcontent');
- var initialTab = tp.items.getAt(index);
+ let tp = this.down('#wizcontent');
+ let initialTab = tp.items.getAt(index);
initialTab.enable();
tp.setActiveTab(initialTab);
},
onShow: function() {
this.callParent(arguments);
- var isInstalled = this.getViewModel().get('isInstalled');
+ let isInstalled = this.getViewModel().get('isInstalled');
if (isInstalled) {
this.getViewModel().set('configuration', false);
this.setInitialTab(2);
@@ -263,7 +263,7 @@ Ext.define('PVE.ceph.CephInstallWizard', {
viewModel: {}, // needed to inherit parent viewModel data
listeners: {
afterrender: function() {
- var me = this;
+ let me = this;
if (this.getViewModel().get('isInstalled')) {
this.mask("Ceph is already installed, click next to create your configuration.", ['pve-static-mask']);
} else {
@@ -302,7 +302,7 @@ Ext.define('PVE.ceph.CephInstallWizard', {
me.updateStore.startUpdate();
},
destroy: function() {
- var me = this;
+ let me = this;
if (me.updateStore) {
me.updateStore.stopUpdate();
}
@@ -456,14 +456,14 @@ Ext.define('PVE.ceph.CephInstallWizard', {
return values;
},
onSubmit: function() {
- var me = this;
+ let me = this;
if (!this.up('pveCephInstallWizard').getViewModel().get('configuration')) {
- var wizard = me.up('window');
- var kv = wizard.getValues();
+ let wizard = me.up('window');
+ let kv = wizard.getValues();
delete kv.delete;
- var monNode = kv['mon-node'];
+ let monNode = kv['mon-node'];
delete kv['mon-node'];
- var nodename = me.nodename;
+ let nodename = me.nodename;
delete kv.nodename;
Proxmox.Utils.API2Request({
url: `/nodes/${nodename}/ceph/init`,
@@ -512,10 +512,10 @@ Ext.define('PVE.ceph.CephInstallWizard', {
Ext.GlobalEvents.fireEvent('proxmoxShowHelp', this.onlineHelp);
}
- var tp = this.up('#wizcontent');
- var idx = tp.items.indexOf(this)-1;
+ let tp = this.up('#wizcontent');
+ let idx = tp.items.indexOf(this)-1;
for (;idx >= 0; idx--) {
- var nc = tp.items.getAt(idx);
+ let nc = tp.items.getAt(idx);
if (nc) {
nc.disable();
}
@@ -528,7 +528,7 @@ Ext.define('PVE.ceph.CephInstallWizard', {
},
},
onSubmit: function() {
- var wizard = this.up('pveCephInstallWizard');
+ let wizard = this.up('pveCephInstallWizard');
wizard.close();
},
},
diff --git a/www/manager6/ceph/Config.js b/www/manager6/ceph/Config.js
index 7f07f15f..ec22f99b 100644
--- a/www/manager6/ceph/Config.js
+++ b/www/manager6/ceph/Config.js
@@ -46,9 +46,9 @@ Ext.define('PVE.node.CephConfigDb', {
],
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
@@ -70,14 +70,14 @@ Ext.define('PVE.node.CephConfig', {
border: false,
scrollable: true,
load: function() {
- var me = this;
+ let me = this;
Proxmox.Utils.API2Request({
url: me.url,
waitMsgTarget: me,
failure: function(response, opts) {
me.update(gettext('Error') + " " + response.htmlStatus);
- var msg = response.htmlStatus;
+ let msg = response.htmlStatus;
PVE.Utils.showCephInstallOrMask(me.ownerCt, msg, me.pveSelNode.data.node,
function(win) {
me.mon(win, 'cephInstallWindowClosed', function() {
@@ -87,16 +87,16 @@ Ext.define('PVE.node.CephConfig', {
);
},
success: function(response, opts) {
- var data = response.result.data;
+ let data = response.result.data;
me.update(Ext.htmlEncode(data));
},
});
},
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
@@ -145,7 +145,7 @@ Ext.define('PVE.node.CephConfigCrush', {
}],
initComponent: function() {
- var me = this;
+ let me = this;
me.defaults = {
pveSelNode: me.pveSelNode,
};
diff --git a/www/manager6/ceph/Crush.js b/www/manager6/ceph/Crush.js
index c0bdfa27..8269d148 100644
--- a/www/manager6/ceph/Crush.js
+++ b/www/manager6/ceph/Crush.js
@@ -8,14 +8,14 @@ Ext.define('PVE.node.CephCrushMap', {
stateId: 'layout-ceph-crush',
scrollable: true,
load: function() {
- var me = this;
+ let me = this;
Proxmox.Utils.API2Request({
url: me.url,
waitMsgTarget: me,
failure: function(response, opts) {
me.update(gettext('Error') + " " + response.htmlStatus);
- var msg = response.htmlStatus;
+ let msg = response.htmlStatus;
PVE.Utils.showCephInstallOrMask(
me.ownerCt,
msg,
@@ -24,7 +24,7 @@ Ext.define('PVE.node.CephCrushMap', {
);
},
success: function(response, opts) {
- var data = response.result.data;
+ let data = response.result.data;
me.update(Ext.htmlEncode(data));
},
});
diff --git a/www/manager6/ceph/FS.js b/www/manager6/ceph/FS.js
index e9815355..0c79899e 100644
--- a/www/manager6/ceph/FS.js
+++ b/www/manager6/ceph/FS.js
@@ -10,7 +10,7 @@ Ext.define('PVE.CephCreateFS', {
method: 'POST',
setFSName: function(fsName) {
- var me = this;
+ let me = this;
if (fsName === '' || fsName === undefined) {
fsName = 'cephfs';
@@ -56,7 +56,7 @@ Ext.define('PVE.CephCreateFS', {
],
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no node name specified";
@@ -176,7 +176,7 @@ Ext.define('PVE.NodeCephFSPanel', {
stateId: 'grid-ceph-mds',
type: 'mds',
storeLoadCallback: function(store, records, success) {
- var vm = this.getViewModel();
+ let vm = this.getViewModel();
if (!success || !records) {
vm.set('mdsCount', 0);
return;
diff --git a/www/manager6/ceph/Log.js b/www/manager6/ceph/Log.js
index 4fda3209..6b9c1c93 100644
--- a/www/manager6/ceph/Log.js
+++ b/www/manager6/ceph/Log.js
@@ -5,9 +5,9 @@ Ext.define('PVE.ceph.Log', {
nodename: undefined,
failCallback: function(response) {
- var me = this;
- var msg = response.htmlStatus;
- var windowShow = PVE.Utils.showCephInstallOrMask(me, msg, me.nodename,
+ let me = this;
+ let msg = response.htmlStatus;
+ let windowShow = PVE.Utils.showCephInstallOrMask(me, msg, me.nodename,
function(win) {
me.mon(win, 'cephInstallWindowClosed', function() {
me.loadTask.delay(200);
diff --git a/www/manager6/ceph/Pool.js b/www/manager6/ceph/Pool.js
index a1f008d1..feeddf55 100644
--- a/www/manager6/ceph/Pool.js
+++ b/www/manager6/ceph/Pool.js
@@ -341,16 +341,16 @@ Ext.define('PVE.node.Ceph.PoolList', {
},
],
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var sm = Ext.create('Ext.selection.RowModel', {});
+ let sm = Ext.create('Ext.selection.RowModel', {});
- var rstore = Ext.create('Proxmox.data.UpdateStore', {
+ let rstore = Ext.create('Proxmox.data.UpdateStore', {
interval: 3000,
storeid: 'ceph-pool-list' + nodename,
model: 'ceph-pool-list',
@@ -364,7 +364,7 @@ Ext.define('PVE.node.Ceph.PoolList', {
// manages the "install ceph?" overlay
PVE.Utils.monitor_ceph_installed(me, rstore, nodename);
- var run_editor = function() {
+ let run_editor = function() {
let rec = sm.getSelection()[0];
if (!rec || !rec.data.pool_name) {
return;
diff --git a/www/manager6/ceph/Services.js b/www/manager6/ceph/Services.js
index b9fc52c8..e6a1d793 100644
--- a/www/manager6/ceph/Services.js
+++ b/www/manager6/ceph/Services.js
@@ -37,7 +37,7 @@ Ext.define('PVE.ceph.Services', {
],
updateAll: function(metadata, status) {
- var me = this;
+ let me = this;
const healthstates = {
'HEALTH_UNKNOWN': 0,
@@ -55,7 +55,7 @@ Ext.define('PVE.ceph.Services', {
maxversion = node?.version?.parts;
}
});
- var quorummap = status && status.quorum_names ? status.quorum_names : [];
+ let quorummap = status && status.quorum_names ? status.quorum_names : [];
let monmessages = {}, mgrmessages = {}, mdsmessages = {};
if (status) {
if (status.health) {
@@ -141,7 +141,7 @@ Ext.define('PVE.ceph.Services', {
};
for (let type of ['mon', 'mgr', 'mds']) {
- var ids = Object.keys(metadata[type] || {});
+ let ids = Object.keys(metadata[type] || {});
me[type] = {};
for (let id of ids) {
@@ -245,7 +245,7 @@ Ext.define('PVE.ceph.ServiceList', {
],
updateAll: function(list) {
- var me = this;
+ let me = this;
me.suspendLayout = true;
list.sort((a, b) => a.id > b.id ? 1 : a.id < b.id ? -1 : 0);
@@ -276,7 +276,7 @@ Ext.define('PVE.ceph.ServiceList', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.callParent();
me.getComponent('title').update({
title: me.title,
@@ -302,7 +302,7 @@ Ext.define('PVE.ceph.ServiceWidget', {
],
updateService: function(title, text, health) {
- var me = this;
+ let me = this;
me.update(Ext.apply(me.data, {
health: health,
diff --git a/www/manager6/ceph/Status.js b/www/manager6/ceph/Status.js
index bdcf3f1b..2691e8a0 100644
--- a/www/manager6/ceph/Status.js
+++ b/www/manager6/ceph/Status.js
@@ -109,7 +109,7 @@ Ext.define('PVE.node.CephStatus', {
{
iconCls: 'x-fa fa-info-circle',
handler: function(grid, rowindex, colindex, item, e, record) {
- var win = Ext.create('Ext.window.Window', {
+ let win = Ext.create('Ext.window.Window', {
title: gettext('Detail'),
resizable: true,
modal: true,
@@ -256,7 +256,7 @@ Ext.define('PVE.node.CephStatus', {
],
generateCheckData: function(health) {
- var result = [];
+ let result = [];
let checks = health.checks || {};
Object.keys(checks).sort().forEach(key => {
@@ -276,8 +276,8 @@ Ext.define('PVE.node.CephStatus', {
return;
}
- var me = this;
- var rec = records[0];
+ let me = this;
+ let rec = records[0];
me.status = rec.data;
// add health panel
@@ -296,7 +296,7 @@ Ext.define('PVE.node.CephStatus', {
let used = pgmap.bytes_used;
let total = pgmap.bytes_total;
- var text = Ext.String.format(gettext('{0} of {1}'),
+ let text = Ext.String.format(gettext('{0} of {1}'),
Proxmox.Utils.render_size(used),
Proxmox.Utils.render_size(total),
);
@@ -348,12 +348,12 @@ Ext.define('PVE.node.CephStatus', {
},
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
me.callParent();
- var baseurl = '/api2/json' + (nodename ? '/nodes/' + nodename : '/cluster') + '/ceph';
+ let baseurl = '/api2/json' + (nodename ? '/nodes/' + nodename : '/cluster') + '/ceph';
me.store = Ext.create('Proxmox.data.UpdateStore', {
storeid: 'ceph-status-' + (nodename || 'cluster'),
interval: 5000,
diff --git a/www/manager6/ceph/StatusDetail.js b/www/manager6/ceph/StatusDetail.js
index 88b1775c..f4db8829 100644
--- a/www/manager6/ceph/StatusDetail.js
+++ b/www/manager6/ceph/StatusDetail.js
@@ -106,7 +106,7 @@ Ext.define('PVE.ceph.StatusDetail', {
tooltip: {
trackMouse: true,
renderer: function(tooltip, record, ctx) {
- var html = record.get('text');
+ let html = record.get('text');
html += '<br>';
record.get('states').forEach(function(state) {
html += '<br>' +
@@ -265,7 +265,7 @@ Ext.define('PVE.ceph.StatusDetail', {
const downinregex = /(\d+) osds down/;
let downin_osds = 0;
Ext.Object.each(health.checks, function(key, value, obj) {
- var found = null;
+ let found = null;
if (key === 'OSD_DOWN') {
found = value.summary.message.match(downinregex);
if (found !== null) {
diff --git a/www/manager6/controller/StorageEdit.js b/www/manager6/controller/StorageEdit.js
index cb73b776..ea4a8ff1 100644
--- a/www/manager6/controller/StorageEdit.js
+++ b/www/manager6/controller/StorageEdit.js
@@ -10,8 +10,8 @@ Ext.define('PVE.controller.StorageEdit', {
prealloc.setDisabled(!hasImages);
}
- var hasBackups = Ext.Array.contains(value, 'backup');
- var maxfiles = this.lookupReference('maxfiles');
+ let hasBackups = Ext.Array.contains(value, 'backup');
+ let maxfiles = this.lookupReference('maxfiles');
if (!maxfiles) {
return;
}
diff --git a/www/manager6/data/PermPathStore.js b/www/manager6/data/PermPathStore.js
index cf702c03..3668a2a0 100644
--- a/www/manager6/data/PermPathStore.js
+++ b/www/manager6/data/PermPathStore.js
@@ -16,7 +16,7 @@ Ext.define('PVE.data.PermPathStore', {
],
constructor: function(config) {
- var me = this;
+ let me = this;
config = config || {};
diff --git a/www/manager6/data/ResourceStore.js b/www/manager6/data/ResourceStore.js
index c7b72306..ed601f48 100644
--- a/www/manager6/data/ResourceStore.js
+++ b/www/manager6/data/ResourceStore.js
@@ -80,7 +80,7 @@ Ext.define('PVE.data.ResourceStore', {
renderer: Proxmox.Utils.format_boolean,
hidden: true,
convert: function(value, record) {
- var info = record.data;
+ let info = record.data;
return Ext.isNumeric(info.uptime) && info.uptime > 0;
},
},
@@ -298,7 +298,7 @@ Ext.define('PVE.data.ResourceStore', {
let fields = [];
let fieldNames = [];
Ext.Object.each(field_defaults, function(key, value) {
- var field = { name: key, type: value.type };
+ let field = { name: key, type: value.type };
if (Ext.isDefined(value.convert)) {
field.convert = value.convert;
}
diff --git a/www/manager6/dc/ACLView.js b/www/manager6/dc/ACLView.js
index 79f900cd..522f5082 100644
--- a/www/manager6/dc/ACLView.js
+++ b/www/manager6/dc/ACLView.js
@@ -158,7 +158,7 @@ Ext.define('PVE.dc.ACLView', {
selModel: sm,
confirmMsg: gettext('Are you sure you want to remove this entry'),
handler: function(btn, event, rec) {
- var params = {
+ let params = {
'delete': 1,
path: rec.data.path,
roles: rec.data.roleid,
@@ -199,7 +199,7 @@ Ext.define('PVE.dc.ACLView', {
text: gettext('Group Permission'),
iconCls: 'fa fa-fw fa-group',
handler: function() {
- var win = Ext.create('PVE.dc.ACLAdd', {
+ let win = Ext.create('PVE.dc.ACLAdd', {
aclType: 'group',
path: me.path,
});
@@ -211,7 +211,7 @@ Ext.define('PVE.dc.ACLView', {
text: gettext('User Permission'),
iconCls: 'fa fa-fw fa-user',
handler: function() {
- var win = Ext.create('PVE.dc.ACLAdd', {
+ let win = Ext.create('PVE.dc.ACLAdd', {
aclType: 'user',
path: me.path,
});
diff --git a/www/manager6/dc/ACMEPluginEdit.js b/www/manager6/dc/ACMEPluginEdit.js
index 570b4dd2..f81ced55 100644
--- a/www/manager6/dc/ACMEPluginEdit.js
+++ b/www/manager6/dc/ACMEPluginEdit.js
@@ -206,7 +206,7 @@ Ext.define('PVE.dc.ACMEPluginEditor', {
],
initComponent: function() {
- var me = this;
+ let me = this;
me.callParent();
diff --git a/www/manager6/dc/AuthEditBase.js b/www/manager6/dc/AuthEditBase.js
index e18fbc3b..f41d5a75 100644
--- a/www/manager6/dc/AuthEditBase.js
+++ b/www/manager6/dc/AuthEditBase.js
@@ -77,7 +77,7 @@ Ext.define('PVE.dc.AuthEditBase', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.isCreate = !me.realm;
@@ -143,7 +143,7 @@ Ext.define('PVE.dc.AuthEditBase', {
if (!me.isCreate) {
me.load({
success: function(response, options) {
- var data = response.result.data || {};
+ let data = response.result.data || {};
// just to be sure (should not happen)
if (data.type !== me.authType) {
me.close();
diff --git a/www/manager6/dc/AuthView.js b/www/manager6/dc/AuthView.js
index 60332c3f..f355cd9e 100644
--- a/www/manager6/dc/AuthView.js
+++ b/www/manager6/dc/AuthView.js
@@ -88,7 +88,7 @@ Ext.define('PVE.dc.AuthView', {
},
initComponent: function() {
- var me = this;
+ let me = this;
let items = [];
for (const [authType, config] of Object.entries(PVE.Utils.authSchema)) {
diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js
index e9d74fb6..70157baa 100644
--- a/www/manager6/dc/Backup.js
+++ b/www/manager6/dc/Backup.js
@@ -287,7 +287,7 @@ Ext.define('PVE.dc.BackupEdit', {
sm.deselectAll(true);
if (list) {
Ext.Array.each(list.split(','), function(vmid) {
- var rec = store.findRecord('vmid', vmid, 0, false, true, true);
+ let rec = store.findRecord('vmid', vmid, 0, false, true, true);
if (rec) {
sm.select(rec, true);
}
@@ -674,19 +674,19 @@ Ext.define('PVE.dc.BackupView', {
}).show();
};
- var edit_btn = new Proxmox.button.Button({
+ let edit_btn = new Proxmox.button.Button({
text: gettext('Edit'),
disabled: true,
selModel: sm,
handler: run_editor,
});
- var run_btn = new Proxmox.button.Button({
+ let run_btn = new Proxmox.button.Button({
text: gettext('Run now'),
disabled: true,
selModel: sm,
handler: function() {
- var rec = sm.getSelection()[0];
+ let rec = sm.getSelection()[0];
if (!rec) {
return;
}
@@ -706,7 +706,7 @@ Ext.define('PVE.dc.BackupView', {
},
});
- var remove_btn = Ext.create('Proxmox.button.StdRemoveButton', {
+ let remove_btn = Ext.create('Proxmox.button.StdRemoveButton', {
selModel: sm,
baseurl: '/cluster/backup',
callback: function() {
@@ -714,7 +714,7 @@ Ext.define('PVE.dc.BackupView', {
},
});
- var detail_btn = new Proxmox.button.Button({
+ let detail_btn = new Proxmox.button.Button({
text: gettext('Job Detail'),
disabled: true,
tooltip: gettext('Show job details and which guests and volumes are affected by the backup job'),
@@ -747,7 +747,7 @@ Ext.define('PVE.dc.BackupView', {
{
text: gettext('Add'),
handler: function() {
- var win = Ext.create('PVE.dc.BackupEdit', {});
+ let win = Ext.create('PVE.dc.BackupEdit', {});
win.on('destroy', reload);
win.show();
},
diff --git a/www/manager6/dc/BackupJobDetail.js b/www/manager6/dc/BackupJobDetail.js
index f1b7a089..658a8789 100644
--- a/www/manager6/dc/BackupJobDetail.js
+++ b/www/manager6/dc/BackupJobDetail.js
@@ -76,13 +76,13 @@ Ext.define('PVE.dc.BackupDiskTree', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.jobid) {
throw "no job id specified";
}
- var sm = Ext.create('Ext.selection.TreeModel', {});
+ let sm = Ext.create('Ext.selection.TreeModel', {});
Ext.apply(me, {
selModel: sm,
@@ -91,7 +91,7 @@ Ext.define('PVE.dc.BackupDiskTree', {
type: 'string',
name: 'iconCls',
calculate: function(data) {
- var txt = 'fa x-fa-tree fa-';
+ let txt = 'fa x-fa-tree fa-';
if (data.leaf && !data.type) {
return txt + 'hdd-o';
} else if (data.type === 'qemu') {
@@ -346,7 +346,7 @@ Ext.define('PVE.dc.BackupInfo', {
],
setValues: function(values) {
- var me = this;
+ let me = this;
let vm = me.getViewModel();
Ext.iterate(values, function(fieldId, val) {
@@ -401,7 +401,7 @@ Ext.define('PVE.dc.BackupInfo', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.record) {
throw "no data provided";
diff --git a/www/manager6/dc/ClusterEdit.js b/www/manager6/dc/ClusterEdit.js
index 32964fbf..a16707f9 100644
--- a/www/manager6/dc/ClusterEdit.js
+++ b/www/manager6/dc/ClusterEdit.js
@@ -96,8 +96,8 @@ Ext.define('PVE.ClusterInfoWindow', {
if (!field.joinInfo) {
return;
}
- var jsons = Ext.JSON.encode(field.joinInfo);
- var base64s = Ext.util.Base64.encode(jsons);
+ let jsons = Ext.JSON.encode(field.joinInfo);
+ let base64s = Ext.util.Base64.encode(jsons);
field.setValue(base64s);
},
},
@@ -111,7 +111,7 @@ Ext.define('PVE.ClusterInfoWindow', {
items: [{
xtype: 'button',
handler: function(b) {
- var el = document.getElementById('pveSerializedClusterInfo');
+ let el = document.getElementById('pveSerializedClusterInfo');
el.select();
document.execCommand("copy");
},
diff --git a/www/manager6/dc/Config.js b/www/manager6/dc/Config.js
index 13ded12e..26e0440f 100644
--- a/www/manager6/dc/Config.js
+++ b/www/manager6/dc/Config.js
@@ -9,9 +9,9 @@ Ext.define('PVE.dc.Config', {
onlineHelp: 'pve_admin_guide',
initComponent: function() {
- var me = this;
+ let me = this;
- var caps = Ext.state.Manager.get('GuiCap');
+ let caps = Ext.state.Manager.get('GuiCap');
me.items = [];
diff --git a/www/manager6/dc/GroupEdit.js b/www/manager6/dc/GroupEdit.js
index d01f7b01..690eab57 100644
--- a/www/manager6/dc/GroupEdit.js
+++ b/www/manager6/dc/GroupEdit.js
@@ -3,12 +3,12 @@ Ext.define('PVE.dc.GroupEdit', {
alias: ['widget.pveDcGroupEdit'],
initComponent: function() {
- var me = this;
+ let me = this;
me.isCreate = !me.groupid;
- var url;
- var method;
+ let url;
+ let method;
if (me.isCreate) {
url = '/api2/extjs/access/groups';
diff --git a/www/manager6/dc/GroupView.js b/www/manager6/dc/GroupView.js
index 388edbe3..155b44e7 100644
--- a/www/manager6/dc/GroupView.js
+++ b/www/manager6/dc/GroupView.js
@@ -9,9 +9,9 @@ Ext.define('PVE.dc.GroupView', {
stateId: 'grid-groups',
initComponent: function() {
- var me = this;
+ let me = this;
- var store = new Ext.data.Store({
+ let store = new Ext.data.Store({
model: 'pve-groups',
sorters: {
property: 'groupid',
@@ -19,13 +19,13 @@ Ext.define('PVE.dc.GroupView', {
},
});
- var reload = function() {
+ let reload = function() {
store.load();
};
- var sm = Ext.create('Ext.selection.RowModel', {});
+ let sm = Ext.create('Ext.selection.RowModel', {});
- var remove_btn = Ext.create('Proxmox.button.StdRemoveButton', {
+ let remove_btn = Ext.create('Proxmox.button.StdRemoveButton', {
selModel: sm,
callback: function() {
reload();
@@ -33,31 +33,31 @@ Ext.define('PVE.dc.GroupView', {
baseurl: '/access/groups/',
});
- var run_editor = function() {
- var rec = sm.getSelection()[0];
+ let run_editor = function() {
+ let rec = sm.getSelection()[0];
if (!rec) {
return;
}
- var win = Ext.create('PVE.dc.GroupEdit', {
+ let win = Ext.create('PVE.dc.GroupEdit', {
groupid: rec.data.groupid,
});
win.on('destroy', reload);
win.show();
};
- var edit_btn = new Proxmox.button.Button({
+ let edit_btn = new Proxmox.button.Button({
text: gettext('Edit'),
disabled: true,
selModel: sm,
handler: run_editor,
});
- var tbar = [
+ let tbar = [
{
text: gettext('Create'),
handler: function() {
- var win = Ext.create('PVE.dc.GroupEdit', {});
+ let win = Ext.create('PVE.dc.GroupEdit', {});
win.on('destroy', reload);
win.show();
},
diff --git a/www/manager6/dc/MetricServerView.js b/www/manager6/dc/MetricServerView.js
index c599886f..59113a25 100644
--- a/www/manager6/dc/MetricServerView.js
+++ b/www/manager6/dc/MetricServerView.js
@@ -123,7 +123,7 @@ Ext.define('PVE.dc.MetricServerView', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.callParent();
diff --git a/www/manager6/dc/NodeView.js b/www/manager6/dc/NodeView.js
index ff674233..ed8cc9cb 100644
--- a/www/manager6/dc/NodeView.js
+++ b/www/manager6/dc/NodeView.js
@@ -25,7 +25,7 @@ Ext.define('PVE.dc.NodeView', {
sortable: true,
dataIndex: 'online',
renderer: function(value) {
- var cls = value?'good':'critical';
+ let cls = value?'good':'critical';
return '<i class="fa ' + PVE.Utils.get_health_icon(cls) + '"><i/>';
},
},
diff --git a/www/manager6/dc/OptionView.js b/www/manager6/dc/OptionView.js
index 51696982..74cdf2e4 100644
--- a/www/manager6/dc/OptionView.js
+++ b/www/manager6/dc/OptionView.js
@@ -7,7 +7,7 @@ Ext.define('PVE.dc.OptionView', {
monStoreErrors: true,
add_inputpanel_row: function(name, text, opts) {
- var me = this;
+ let me = this;
opts = opts || {};
me.rows = me.rows || {};
@@ -27,7 +27,7 @@ Ext.define('PVE.dc.OptionView', {
labelWidth: opts.labelWidth || 100,
},
setValues: function(values) {
- var edit_value = values[name];
+ let edit_value = values[name];
if (opts.parseBeforeSet) {
edit_value = PVE.Parser.parsePropertyString(edit_value);
@@ -44,7 +44,7 @@ Ext.define('PVE.dc.OptionView', {
if (values === undefined || Object.keys(values).length === 0) {
return { 'delete': name };
}
- var ret_val = {};
+ let ret_val = {};
ret_val[name] = PVE.Parser.printPropertyString(values);
return ret_val;
},
@@ -66,7 +66,7 @@ Ext.define('PVE.dc.OptionView', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.add_combobox_row('keyboard', gettext('Keyboard Layout'), {
renderer: PVE.Utils.render_kvm_language,
@@ -335,7 +335,7 @@ Ext.define('PVE.dc.OptionView', {
return;
}
- var rec = store.getById('console');
+ let rec = store.getById('console');
PVE.VersionInfo.console = rec.data.value;
if (rec.data.value === '__default__') {
delete PVE.VersionInfo.console;
diff --git a/www/manager6/dc/PoolView.js b/www/manager6/dc/PoolView.js
index db97cbe7..677636d6 100644
--- a/www/manager6/dc/PoolView.js
+++ b/www/manager6/dc/PoolView.js
@@ -9,9 +9,9 @@ Ext.define('PVE.dc.PoolView', {
stateId: 'grid-pools',
initComponent: function() {
- var me = this;
+ let me = this;
- var store = new Ext.data.Store({
+ let store = new Ext.data.Store({
model: 'pve-pools',
sorters: {
property: 'poolid',
@@ -19,13 +19,13 @@ Ext.define('PVE.dc.PoolView', {
},
});
- var reload = function() {
+ let reload = function() {
store.load();
};
- var sm = Ext.create('Ext.selection.RowModel', {});
+ let sm = Ext.create('Ext.selection.RowModel', {});
- var remove_btn = Ext.create('Proxmox.button.StdRemoveButton', {
+ let remove_btn = Ext.create('Proxmox.button.StdRemoveButton', {
selModel: sm,
baseurl: '/pools/',
callback: function() {
@@ -33,31 +33,31 @@ Ext.define('PVE.dc.PoolView', {
},
});
- var run_editor = function() {
- var rec = sm.getSelection()[0];
+ let run_editor = function() {
+ let rec = sm.getSelection()[0];
if (!rec) {
return;
}
- var win = Ext.create('PVE.dc.PoolEdit', {
+ let win = Ext.create('PVE.dc.PoolEdit', {
poolid: rec.data.poolid,
});
win.on('destroy', reload);
win.show();
};
- var edit_btn = new Proxmox.button.Button({
+ let edit_btn = new Proxmox.button.Button({
text: gettext('Edit'),
disabled: true,
selModel: sm,
handler: run_editor,
});
- var tbar = [
+ let tbar = [
{
text: gettext('Create'),
handler: function() {
- var win = Ext.create('PVE.dc.PoolEdit', {});
+ let win = Ext.create('PVE.dc.PoolEdit', {});
win.on('destroy', reload);
win.show();
},
diff --git a/www/manager6/dc/RoleEdit.js b/www/manager6/dc/RoleEdit.js
index c8658647..560b95a7 100644
--- a/www/manager6/dc/RoleEdit.js
+++ b/www/manager6/dc/RoleEdit.js
@@ -5,12 +5,12 @@ Ext.define('PVE.dc.RoleEdit', {
width: 400,
initComponent: function() {
- var me = this;
+ let me = this;
me.isCreate = !me.roleid;
- var url;
- var method;
+ let url;
+ let method;
if (me.isCreate) {
url = '/api2/extjs/access/roles';
@@ -47,8 +47,8 @@ Ext.define('PVE.dc.RoleEdit', {
if (!me.isCreate) {
me.load({
success: function(response) {
- var data = response.result.data;
- var keys = Ext.Object.getKeys(data);
+ let data = response.result.data;
+ let keys = Ext.Object.getKeys(data);
me.setValues({
privs: keys,
diff --git a/www/manager6/dc/SecurityGroups.js b/www/manager6/dc/SecurityGroups.js
index 5fb6860d..22b98c5f 100644
--- a/www/manager6/dc/SecurityGroups.js
+++ b/www/manager6/dc/SecurityGroups.js
@@ -13,16 +13,16 @@ Ext.define('PVE.SecurityGroupEdit', {
allow_iface: false,
initComponent: function() {
- var me = this;
+ let me = this;
me.isCreate = me.group_name === undefined;
- var subject;
+ let subject;
me.url = '/api2/extjs' + me.base_url;
me.method = 'POST';
- var items = [
+ let items = [
{
xtype: 'textfield',
name: 'group',
@@ -49,7 +49,7 @@ Ext.define('PVE.SecurityGroupEdit', {
});
}
- var ipanel = Ext.create('Proxmox.panel.InputPanel', {
+ let ipanel = Ext.create('Proxmox.panel.InputPanel', {
// InputPanel does not have a 'create' property, does it need a 'isCreate'
isCreate: me.isCreate,
items: items,
@@ -138,7 +138,7 @@ Ext.define('PVE.SecurityGroupList', {
text: gettext('Create'),
handler: function() {
sm.deselectAll();
- var win = Ext.create('PVE.SecurityGroupEdit', {});
+ let win = Ext.create('PVE.SecurityGroupEdit', {});
win.show();
win.on('destroy', reload);
},
diff --git a/www/manager6/dc/Summary.js b/www/manager6/dc/Summary.js
index 8ea60267..65f69d70 100644
--- a/www/manager6/dc/Summary.js
+++ b/www/manager6/dc/Summary.js
@@ -80,9 +80,9 @@ Ext.define('PVE.dc.Summary', {
},
initComponent: function() {
- var me = this;
+ let me = this;
- var rstore = Ext.create('Proxmox.data.UpdateStore', {
+ let rstore = Ext.create('Proxmox.data.UpdateStore', {
interval: 3000,
storeid: 'pve-cluster-status',
model: 'pve-dc-nodes',
@@ -92,7 +92,7 @@ Ext.define('PVE.dc.Summary', {
},
});
- var gridstore = Ext.create('Proxmox.data.DiffStore', {
+ let gridstore = Ext.create('Proxmox.data.DiffStore', {
rstore: rstore,
filters: {
property: 'type',
@@ -108,12 +108,12 @@ Ext.define('PVE.dc.Summary', {
me.getComponent('nodeview').setStore(gridstore);
- var gueststatus = me.getComponent('dcGuests');
+ let gueststatus = me.getComponent('dcGuests');
- var cpustat = me.down('#cpu');
- var memorystat = me.down('#memory');
- var storagestat = me.down('#storage');
- var sp = Ext.state.Manager.getProvider();
+ let cpustat = me.down('#cpu');
+ let memorystat = me.down('#memory');
+ let storagestat = me.down('#storage');
+ let sp = Ext.state.Manager.getProvider();
me.mon(PVE.data.ResourceStore, 'load', function(curstore, results) {
me.suspendLayout = true;
@@ -211,8 +211,8 @@ Ext.define('PVE.dc.Summary', {
let subs = me.down('#subscriptions');
me.mon(rstore, 'load', function(store, records, success) {
- var level;
- var mixed = false;
+ let level;
+ let mixed = false;
for (let i = 0; i < records.length; i++) {
let node = records[i];
if (node.get('type') !== 'node' || node.get('status') === 'offline') {
diff --git a/www/manager6/dc/Support.js b/www/manager6/dc/Support.js
index 1b51e5ba..c371b823 100644
--- a/www/manager6/dc/Support.js
+++ b/www/manager6/dc/Support.js
@@ -13,9 +13,9 @@ Ext.define('PVE.dc.Support', {
bugzillaHtml: '<h1>Bug Tracking</h1>Our bug tracking system is available <a target="_blank" href="https://bugzilla.proxmox.com">here</a>.',
docuHtml: function() {
- var me = this;
- var guideUrl = window.location.origin + me.pveGuidePath;
- var text = Ext.String.format('<h1>Documentation</h1>'
+ let me = this;
+ let guideUrl = window.location.origin + me.pveGuidePath;
+ let text = Ext.String.format('<h1>Documentation</h1>'
+ 'The official Proxmox VE Administration Guide'
+ ' is included with this installation and can be browsed at '
+ '<a target="_blank" href="{0}">{0}</a>', guideUrl);
@@ -23,9 +23,9 @@ Ext.define('PVE.dc.Support', {
},
updateActive: function(data) {
- var me = this;
+ let me = this;
- var html = '<h1>' + data.productname + '</h1>' + me.activeHtml;
+ let html = '<h1>' + data.productname + '</h1>' + me.activeHtml;
html += '<br><br>' + me.docuHtml();
html += '<br><br>' + me.bugzillaHtml;
@@ -33,9 +33,9 @@ Ext.define('PVE.dc.Support', {
},
updateCommunity: function(data) {
- var me = this;
+ let me = this;
- var html = '<h1>' + data.productname + '</h1>' + me.communityHtml;
+ let html = '<h1>' + data.productname + '</h1>' + me.communityHtml;
html += '<br><br>' + me.docuHtml();
html += '<br><br>' + me.bugzillaHtml;
@@ -43,7 +43,7 @@ Ext.define('PVE.dc.Support', {
},
updateInactive: function(data) {
- var me = this;
+ let me = this;
me.update(me.invalidHtml);
},
diff --git a/www/manager6/dc/Tasks.js b/www/manager6/dc/Tasks.js
index 5344ede4..258b690d 100644
--- a/www/manager6/dc/Tasks.js
+++ b/www/manager6/dc/Tasks.js
@@ -36,13 +36,13 @@ Ext.define('PVE.dc.Tasks', {
});
let run_task_viewer = function() {
- var sm = me.getSelectionModel();
- var rec = sm.getSelection()[0];
+ let sm = me.getSelectionModel();
+ let rec = sm.getSelection()[0];
if (!rec) {
return;
}
- var win = Ext.create('Proxmox.window.TaskViewer', {
+ let win = Ext.create('Proxmox.window.TaskViewer', {
upid: rec.data.upid,
endtime: rec.data.endtime,
});
diff --git a/www/manager6/dc/UserEdit.js b/www/manager6/dc/UserEdit.js
index b637cd53..4f04d028 100644
--- a/www/manager6/dc/UserEdit.js
+++ b/www/manager6/dc/UserEdit.js
@@ -116,7 +116,7 @@ Ext.define('PVE.dc.UserEdit', {
});
}
- var ipanel = Ext.create('Proxmox.panel.InputPanel', {
+ let ipanel = Ext.create('Proxmox.panel.InputPanel', {
column1: column1,
column2: column2,
columnB: [
@@ -159,7 +159,7 @@ Ext.define('PVE.dc.UserEdit', {
if (!me.isCreate) {
me.load({
success: function(response, options) {
- var data = response.result.data;
+ let data = response.result.data;
me.setValues(data);
if (data.keys) {
if (data.keys === 'x!oath' || data.keys === 'x!u2f') {
diff --git a/www/manager6/dc/UserView.js b/www/manager6/dc/UserView.js
index bbfc4f7c..e7920bac 100644
--- a/www/manager6/dc/UserView.js
+++ b/www/manager6/dc/UserView.js
@@ -9,11 +9,11 @@ Ext.define('PVE.dc.UserView', {
stateId: 'grid-users',
initComponent: function() {
- var me = this;
+ let me = this;
- var caps = Ext.state.Manager.get('GuiCap');
+ let caps = Ext.state.Manager.get('GuiCap');
- var store = new Ext.data.Store({
+ let store = new Ext.data.Store({
id: "users",
model: 'pmx-users',
sorters: {
@@ -33,7 +33,7 @@ Ext.define('PVE.dc.UserView', {
callback: () => reload(),
});
let run_editor = function() {
- var rec = sm.getSelection()[0];
+ let rec = sm.getSelection()[0];
if (!rec || !caps.access['User.Modify']) {
return;
}
@@ -78,7 +78,7 @@ Ext.define('PVE.dc.UserView', {
},
});
- var perm_btn = new Proxmox.button.Button({
+ let perm_btn = new Proxmox.button.Button({
text: gettext('Permissions'),
disabled: true,
selModel: sm,
diff --git a/www/manager6/form/AgentFeatureSelector.js b/www/manager6/form/AgentFeatureSelector.js
index 0dcc6ecb..f91497a3 100644
--- a/www/manager6/form/AgentFeatureSelector.js
+++ b/www/manager6/form/AgentFeatureSelector.js
@@ -47,7 +47,7 @@ Ext.define('PVE.form.AgentFeatureSelector', {
],
onGetValues: function(values) {
- var agentstr = PVE.Parser.printPropertyString(values, 'enabled');
+ let agentstr = PVE.Parser.printPropertyString(values, 'enabled');
return { agent: agentstr };
},
diff --git a/www/manager6/form/BridgeSelector.js b/www/manager6/form/BridgeSelector.js
index 350588cd..e7dd3d7e 100644
--- a/www/manager6/form/BridgeSelector.js
+++ b/www/manager6/form/BridgeSelector.js
@@ -40,7 +40,7 @@ Ext.define('PVE.form.BridgeSelector', {
},
setNodename: function(nodename) {
- var me = this;
+ let me = this;
if (!nodename || me.nodename === nodename) {
return;
@@ -58,9 +58,9 @@ Ext.define('PVE.form.BridgeSelector', {
},
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.nodename;
+ let nodename = me.nodename;
me.nodename = undefined;
me.callParent();
diff --git a/www/manager6/form/BusTypeSelector.js b/www/manager6/form/BusTypeSelector.js
index 0f040229..c585b121 100644
--- a/www/manager6/form/BusTypeSelector.js
+++ b/www/manager6/form/BusTypeSelector.js
@@ -6,7 +6,7 @@ Ext.define('PVE.form.BusTypeSelector', {
withUnused: false,
initComponent: function() {
- var me = this;
+ let me = this;
me.comboItems = [['ide', 'IDE'], ['sata', 'SATA']];
diff --git a/www/manager6/form/CephFSSelector.js b/www/manager6/form/CephFSSelector.js
index 3c86e3cf..46798edb 100644
--- a/www/manager6/form/CephFSSelector.js
+++ b/www/manager6/form/CephFSSelector.js
@@ -9,13 +9,13 @@ Ext.define('PVE.form.CephFSSelector', {
queryMode: 'local',
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no nodename given";
}
- var store = Ext.create('Ext.data.Store', {
+ let store = Ext.create('Ext.data.Store', {
fields: ['name'],
sorters: 'name',
proxy: {
diff --git a/www/manager6/form/CephPoolSelector.js b/www/manager6/form/CephPoolSelector.js
index 5b96398d..6e7460cf 100644
--- a/www/manager6/form/CephPoolSelector.js
+++ b/www/manager6/form/CephPoolSelector.js
@@ -9,13 +9,13 @@ Ext.define('PVE.form.CephPoolSelector', {
queryMode: 'local',
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no nodename given";
}
- var store = Ext.create('Ext.data.Store', {
+ let store = Ext.create('Ext.data.Store', {
fields: ['name'],
sorters: 'name',
proxy: {
diff --git a/www/manager6/form/ContentTypeSelector.js b/www/manager6/form/ContentTypeSelector.js
index d0fa0b08..b8984314 100644
--- a/www/manager6/form/ContentTypeSelector.js
+++ b/www/manager6/form/ContentTypeSelector.js
@@ -5,7 +5,7 @@ Ext.define('PVE.form.ContentTypeSelector', {
cts: undefined,
initComponent: function() {
- var me = this;
+ let me = this;
me.comboItems = [];
diff --git a/www/manager6/form/ControllerSelector.js b/www/manager6/form/ControllerSelector.js
index d84c49d6..64d80e18 100644
--- a/www/manager6/form/ControllerSelector.js
+++ b/www/manager6/form/ControllerSelector.js
@@ -59,7 +59,7 @@ Ext.define('PVE.form.ControllerSelector', {
},
initComponent: function() {
- var me = this;
+ let me = this;
Ext.apply(me, {
fieldLabel: gettext('Bus/Device'),
diff --git a/www/manager6/form/DayOfWeekSelector.js b/www/manager6/form/DayOfWeekSelector.js
index a8d46246..80369935 100644
--- a/www/manager6/form/DayOfWeekSelector.js
+++ b/www/manager6/form/DayOfWeekSelector.js
@@ -3,7 +3,7 @@ Ext.define('PVE.form.DayOfWeekSelector', {
alias: ['widget.pveDayOfWeekSelector'],
comboItems: [],
initComponent: function() {
- var me = this;
+ let me = this;
me.comboItems = [
['mon', Ext.util.Format.htmlDecode(Ext.Date.dayNames[1])],
['tue', Ext.util.Format.htmlDecode(Ext.Date.dayNames[2])],
diff --git a/www/manager6/form/DiskStorageSelector.js b/www/manager6/form/DiskStorageSelector.js
index abd46deb..cb05c328 100644
--- a/www/manager6/form/DiskStorageSelector.js
+++ b/www/manager6/form/DiskStorageSelector.js
@@ -36,10 +36,10 @@ Ext.define('PVE.form.DiskStorageSelector', {
defaultSize: '32',
changeStorage: function(f, value) {
- var me = this;
- var formatsel = me.getComponent('diskformat');
- var hdfilesel = me.getComponent('hdimage');
- var hdsizesel = me.getComponent('disksize');
+ let me = this;
+ let formatsel = me.getComponent('diskformat');
+ let hdfilesel = me.getComponent('hdimage');
+ let hdsizesel = me.getComponent('disksize');
// initial store load, and reset/deletion of the storage
if (!value) {
@@ -50,7 +50,7 @@ Ext.define('PVE.form.DiskStorageSelector', {
return;
}
- var rec = f.store.getById(value);
+ let rec = f.store.getById(value);
// if the storage is not defined, or valid,
// we cannot know what to enable/disable
if (!rec) {
@@ -71,7 +71,7 @@ Ext.define('PVE.form.DiskStorageSelector', {
}
}
- var select = !!rec.data.select_existing && !me.hideSelection;
+ let select = !!rec.data.select_existing && !me.hideSelection;
formatsel.setDisabled(me.hideFormat || Ext.Object.getSize(validFormats) <= 1);
formatsel.setValue(selectFormat);
@@ -87,17 +87,17 @@ Ext.define('PVE.form.DiskStorageSelector', {
},
setNodename: function(nodename) {
- var me = this;
- var hdstorage = me.getComponent('hdstorage');
- var hdfilesel = me.getComponent('hdimage');
+ let me = this;
+ let hdstorage = me.getComponent('hdstorage');
+ let hdfilesel = me.getComponent('hdimage');
hdstorage.setNodename(nodename);
hdfilesel.setNodename(nodename);
},
setDisabled: function(value) {
- var me = this;
- var hdstorage = me.getComponent('hdstorage');
+ let me = this;
+ let hdstorage = me.getComponent('hdstorage');
// reset on disable
if (value) {
@@ -111,7 +111,7 @@ Ext.define('PVE.form.DiskStorageSelector', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.items = [
{
diff --git a/www/manager6/form/FileSelector.js b/www/manager6/form/FileSelector.js
index ef2bedf9..35173978 100644
--- a/www/manager6/form/FileSelector.js
+++ b/www/manager6/form/FileSelector.js
@@ -8,7 +8,7 @@ Ext.define('PVE.form.FileSelector', {
listeners: {
afterrender: function() {
- var me = this;
+ let me = this;
if (!me.disabled) {
me.setStorage(me.storage, me.nodename);
}
@@ -16,9 +16,9 @@ Ext.define('PVE.form.FileSelector', {
},
setStorage: function(storage, nodename) {
- var me = this;
+ let me = this;
- var change = false;
+ let change = false;
if (storage && me.storage !== storage) {
me.storage = storage;
change = true;
@@ -33,7 +33,7 @@ Ext.define('PVE.form.FileSelector', {
return;
}
- var url = '/api2/json/nodes/' + me.nodename + '/storage/' + me.storage + '/content';
+ let url = '/api2/json/nodes/' + me.nodename + '/storage/' + me.storage + '/content';
if (me.storageContent) {
url += '?content=' + me.storageContent;
}
diff --git a/www/manager6/form/GlobalSearchField.js b/www/manager6/form/GlobalSearchField.js
index 267a480d..abd4a8a3 100644
--- a/www/manager6/form/GlobalSearchField.js
+++ b/www/manager6/form/GlobalSearchField.js
@@ -39,7 +39,7 @@ Ext.define('PVE.form.GlobalSearchField', {
},
hideMe: function() {
- var me = this;
+ let me = this;
if (typeof me.ctxMenu !== 'undefined' && me.ctxMenu.isVisible()) {
return;
}
@@ -50,17 +50,17 @@ Ext.define('PVE.form.GlobalSearchField', {
},
setFocus: function() {
- var me = this;
+ let me = this;
me.hasFocus = true;
},
listeners: {
rowclick: function(grid, record) {
- var me = this;
+ let me = this;
me.textfield.selectAndHide(record.id);
},
itemcontextmenu: function(v, record, item, index, event) {
- var me = this;
+ let me = this;
me.ctxMenu = PVE.Utils.createCmdMenu(v, record, item, index, event);
},
focusleave: 'hideMe',
@@ -139,7 +139,7 @@ Ext.define('PVE.form.GlobalSearchField', {
},
selectAndHide: function(id) {
- var me = this;
+ let me = this;
me.tree.selectById(id);
me.grid.hide();
me.setValue('');
@@ -147,8 +147,8 @@ Ext.define('PVE.form.GlobalSearchField', {
},
onKey: function(field, e) {
- var me = this;
- var key = e.getKey();
+ let me = this;
+ let key = e.getKey();
switch (key) {
case Ext.event.Event.ENTER:
diff --git a/www/manager6/form/GroupSelector.js b/www/manager6/form/GroupSelector.js
index 90fa1827..ac5c34d8 100644
--- a/www/manager6/form/GroupSelector.js
+++ b/www/manager6/form/GroupSelector.js
@@ -42,9 +42,9 @@ Ext.define('PVE.form.GroupSelector', {
},
initComponent: function() {
- var me = this;
+ let me = this;
- var store = new Ext.data.Store({
+ let store = new Ext.data.Store({
model: 'pve-groups',
sorters: [{
property: 'groupid',
diff --git a/www/manager6/form/GuestIDSelector.js b/www/manager6/form/GuestIDSelector.js
index e24c01c9..13d9ac55 100644
--- a/www/manager6/form/GuestIDSelector.js
+++ b/www/manager6/form/GuestIDSelector.js
@@ -15,7 +15,7 @@ Ext.define('PVE.form.GuestIDSelector', {
guestType: undefined,
validator: function(value) {
- var me = this;
+ let me = this;
if (!Ext.isNumeric(value) ||
value < me.minValue ||
@@ -36,11 +36,11 @@ Ext.define('PVE.form.GuestIDSelector', {
},
initComponent: function() {
- var me = this;
- var label = '{0} ID';
- var unknownID = gettext('This {0} ID does not exist');
- var inUseID = gettext('This {0} ID is already in use');
- var type = 'CT/VM';
+ let me = this;
+ let label = '{0} ID';
+ let unknownID = gettext('This {0} ID does not exist');
+ let inUseID = gettext('This {0} ID is already in use');
+ let type = 'CT/VM';
if (me.guestType === 'lxc') {
type = 'CT';
diff --git a/www/manager6/form/HotplugFeatureSelector.js b/www/manager6/form/HotplugFeatureSelector.js
index cb9fc552..9736faa9 100644
--- a/www/manager6/form/HotplugFeatureSelector.js
+++ b/www/manager6/form/HotplugFeatureSelector.js
@@ -36,8 +36,8 @@ Ext.define('PVE.form.HotplugFeatureSelector', {
],
setValue: function(value) {
- var me = this;
- var newVal = [];
+ let me = this;
+ let newVal = [];
if (value === '1') {
newVal = ['disk', 'network', 'usb'];
} else if (value !== '0') {
@@ -49,7 +49,7 @@ Ext.define('PVE.form.HotplugFeatureSelector', {
// override framework function to
// assemble the hotplug value
getSubmitData: function() {
- var me = this,
+ let me = this,
boxes = me.getBoxes(),
data = [];
Ext.Array.forEach(boxes, function(box) {
diff --git a/www/manager6/form/IPRefSelector.js b/www/manager6/form/IPRefSelector.js
index 9ccc2fe1..b4788900 100644
--- a/www/manager6/form/IPRefSelector.js
+++ b/www/manager6/form/IPRefSelector.js
@@ -13,18 +13,18 @@ Ext.define('PVE.form.IPRefSelector', {
notFoundIsValid: true,
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.base_url) {
throw "no base_url specified";
}
- var url = "/api2/json" + me.base_url;
+ let url = "/api2/json" + me.base_url;
if (me.ref_type) {
url += "?type=" + me.ref_type;
}
- var store = Ext.create('Ext.data.Store', {
+ let store = Ext.create('Ext.data.Store', {
autoLoad: true,
fields: ['type', 'name', 'ref', 'comment'],
idProperty: 'ref',
@@ -38,7 +38,7 @@ Ext.define('PVE.form.IPRefSelector', {
},
});
- var disable_query_for_ips = function(f, value) {
+ let disable_query_for_ips = function(f, value) {
if (value === null ||
value.match(/^\d/)) { // IP address starts with \d
f.queryDelay = 9999999999; // hack: disable with long delay
@@ -47,7 +47,7 @@ Ext.define('PVE.form.IPRefSelector', {
}
};
- var columns = [];
+ let columns = [];
if (!me.ref_type) {
columns.push({
diff --git a/www/manager6/form/MDevSelector.js b/www/manager6/form/MDevSelector.js
index 8ee73c0c..b25c2b12 100644
--- a/www/manager6/form/MDevSelector.js
+++ b/www/manager6/form/MDevSelector.js
@@ -43,7 +43,7 @@ Ext.define('PVE.form.MDevSelector', {
},
setPciID: function(pciid, force) {
- var me = this;
+ let me = this;
if (!force && (!pciid || me.pciid === pciid)) {
return;
@@ -55,7 +55,7 @@ Ext.define('PVE.form.MDevSelector', {
setNodename: function(nodename) {
- var me = this;
+ let me = this;
if (!nodename || me.nodename === nodename) {
return;
@@ -66,7 +66,7 @@ Ext.define('PVE.form.MDevSelector', {
},
updateProxy: function() {
- var me = this;
+ let me = this;
me.store.setProxy({
type: 'proxmox',
url: '/api2/json/nodes/' + me.nodename + '/hardware/pci/' + me.pciid + '/mdev',
@@ -75,7 +75,7 @@ Ext.define('PVE.form.MDevSelector', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw 'no node name specified';
diff --git a/www/manager6/form/MemoryField.js b/www/manager6/form/MemoryField.js
index 10b7ff36..203c92b5 100644
--- a/www/manager6/form/MemoryField.js
+++ b/www/manager6/form/MemoryField.js
@@ -19,21 +19,21 @@ Ext.define('PVE.form.MemoryField', {
allowExponential: false,
computeUpDown: function(value) {
- var me = this;
+ let me = this;
if (!me.hotplug) {
return { up: value + me.step, down: value - me.step };
}
- var dimm_size = 512;
- var prev_dimm_size = 0;
- var min_size = 1024;
- var current_size = min_size;
- var value_up = min_size;
- var value_down = min_size;
- var value_start = min_size;
+ let dimm_size = 512;
+ let prev_dimm_size = 0;
+ let min_size = 1024;
+ let current_size = min_size;
+ let value_up = min_size;
+ let value_down = min_size;
+ let value_start = min_size;
- var i, j;
+ let i, j;
for (j = 0; j < 9; j++) {
for (i = 0; i < 32; i++) {
if (value >= current_size && value < current_size + dimm_size) {
@@ -51,30 +51,30 @@ Ext.define('PVE.form.MemoryField', {
},
onSpinUp: function() {
- var me = this;
+ let me = this;
if (!me.readOnly) {
- var res = me.computeUpDown(me.getValue());
+ let res = me.computeUpDown(me.getValue());
me.setValue(Ext.Number.constrain(res.up, me.minValue, me.maxValue));
}
},
onSpinDown: function() {
- var me = this;
+ let me = this;
if (!me.readOnly) {
- var res = me.computeUpDown(me.getValue());
+ let res = me.computeUpDown(me.getValue());
me.setValue(Ext.Number.constrain(res.down, me.minValue, me.maxValue));
}
},
initComponent: function() {
- var me = this;
+ let me = this;
if (me.hotplug) {
me.minValue = 1024;
me.on('blur', function(field) {
- var value = me.getValue();
- var res = me.computeUpDown(value);
+ let value = me.getValue();
+ let res = me.computeUpDown(value);
if (value === res.start || value === res.up || value === res.down) {
return;
}
diff --git a/www/manager6/form/NodeSelector.js b/www/manager6/form/NodeSelector.js
index c3e3da31..7897576c 100644
--- a/www/manager6/form/NodeSelector.js
+++ b/www/manager6/form/NodeSelector.js
@@ -88,7 +88,7 @@ Ext.define('PVE.form.NodeSelector', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (me.selectCurNode && PVE.curSelectedNode && PVE.curSelectedNode.data.node) {
me.preferredValue = PVE.curSelectedNode.data.node;
diff --git a/www/manager6/form/PCISelector.js b/www/manager6/form/PCISelector.js
index 4e0a778f..a30049fb 100644
--- a/www/manager6/form/PCISelector.js
+++ b/www/manager6/form/PCISelector.js
@@ -57,7 +57,7 @@ Ext.define('PVE.form.PCISelector', {
},
setNodename: function(nodename) {
- var me = this;
+ let me = this;
if (!nodename || me.nodename === nodename) {
return;
@@ -74,9 +74,9 @@ Ext.define('PVE.form.PCISelector', {
},
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.nodename;
+ let nodename = me.nodename;
me.nodename = undefined;
me.callParent();
diff --git a/www/manager6/form/PoolSelector.js b/www/manager6/form/PoolSelector.js
index 3c464891..554cbe67 100644
--- a/www/manager6/form/PoolSelector.js
+++ b/www/manager6/form/PoolSelector.js
@@ -7,9 +7,9 @@ Ext.define('PVE.form.PoolSelector', {
displayField: 'poolid',
initComponent: function() {
- var me = this;
+ let me = this;
- var store = new Ext.data.Store({
+ let store = new Ext.data.Store({
model: 'pve-pools',
sorters: 'poolid',
});
diff --git a/www/manager6/form/QemuBiosSelector.js b/www/manager6/form/QemuBiosSelector.js
index f9d047c0..afb0bbff 100644
--- a/www/manager6/form/QemuBiosSelector.js
+++ b/www/manager6/form/QemuBiosSelector.js
@@ -3,7 +3,7 @@ Ext.define('PVE.form.QemuBiosSelector', {
alias: ['widget.pveQemuBiosSelector'],
initComponent: function() {
- var me = this;
+ let me = this;
me.comboItems = [
['__default__', PVE.Utils.render_qemu_bios('')],
diff --git a/www/manager6/form/SDNControllerSelector.js b/www/manager6/form/SDNControllerSelector.js
index 639d7b50..a89d1c30 100644
--- a/www/manager6/form/SDNControllerSelector.js
+++ b/www/manager6/form/SDNControllerSelector.js
@@ -7,9 +7,9 @@ Ext.define('PVE.form.SDNControllerSelector', {
displayField: 'controller',
initComponent: function() {
- var me = this;
+ let me = this;
- var store = new Ext.data.Store({
+ let store = new Ext.data.Store({
model: 'pve-sdn-controller',
sorters: {
property: 'controller',
diff --git a/www/manager6/form/SDNDnsSelector.js b/www/manager6/form/SDNDnsSelector.js
index c97a342f..4cf26aac 100644
--- a/www/manager6/form/SDNDnsSelector.js
+++ b/www/manager6/form/SDNDnsSelector.js
@@ -7,9 +7,9 @@ Ext.define('PVE.form.SDNDnsSelector', {
displayField: 'dns',
initComponent: function() {
- var me = this;
+ let me = this;
- var store = new Ext.data.Store({
+ let store = new Ext.data.Store({
model: 'pve-sdn-dns',
sorters: {
property: 'dns',
diff --git a/www/manager6/form/SDNIpamSelector.js b/www/manager6/form/SDNIpamSelector.js
index b60e75d6..1726512d 100644
--- a/www/manager6/form/SDNIpamSelector.js
+++ b/www/manager6/form/SDNIpamSelector.js
@@ -7,9 +7,9 @@ Ext.define('PVE.form.SDNIpamSelector', {
displayField: 'ipam',
initComponent: function() {
- var me = this;
+ let me = this;
- var store = new Ext.data.Store({
+ let store = new Ext.data.Store({
model: 'pve-sdn-ipam',
sorters: {
property: 'ipam',
diff --git a/www/manager6/form/SDNVnetSelector.js b/www/manager6/form/SDNVnetSelector.js
index b6da85be..248be3f7 100644
--- a/www/manager6/form/SDNVnetSelector.js
+++ b/www/manager6/form/SDNVnetSelector.js
@@ -7,9 +7,9 @@ Ext.define('PVE.form.SDNVnetSelector', {
displayField: 'vnet',
initComponent: function() {
- var me = this;
+ let me = this;
- var store = new Ext.data.Store({
+ let store = new Ext.data.Store({
model: 'pve-sdn-vnet',
sorters: {
property: 'vnet',
diff --git a/www/manager6/form/SDNZoneSelector.js b/www/manager6/form/SDNZoneSelector.js
index 28c3457d..95e3faef 100644
--- a/www/manager6/form/SDNZoneSelector.js
+++ b/www/manager6/form/SDNZoneSelector.js
@@ -7,9 +7,9 @@ Ext.define('PVE.form.SDNZoneSelector', {
displayField: 'zone',
initComponent: function() {
- var me = this;
+ let me = this;
- var store = new Ext.data.Store({
+ let store = new Ext.data.Store({
model: 'pve-sdn-zone',
sorters: {
property: 'zone',
diff --git a/www/manager6/form/SecurityGroupSelector.js b/www/manager6/form/SecurityGroupSelector.js
index 64db7542..2519bcba 100644
--- a/www/manager6/form/SecurityGroupSelector.js
+++ b/www/manager6/form/SecurityGroupSelector.js
@@ -5,9 +5,9 @@ Ext.define('PVE.form.SecurityGroupsSelector', {
valueField: 'group',
displayField: 'group',
initComponent: function() {
- var me = this;
+ let me = this;
- var store = Ext.create('Ext.data.Store', {
+ let store = Ext.create('Ext.data.Store', {
autoLoad: true,
fields: ['group', 'comment'],
idProperty: 'group',
diff --git a/www/manager6/form/SnapshotSelector.js b/www/manager6/form/SnapshotSelector.js
index 4155269b..c4378ea4 100644
--- a/www/manager6/form/SnapshotSelector.js
+++ b/www/manager6/form/SnapshotSelector.js
@@ -6,7 +6,7 @@ Ext.define('PVE.form.SnapshotSelector', {
displayField: 'name',
loadStore: function(nodename, vmid) {
- var me = this;
+ let me = this;
if (!nodename) {
return;
@@ -29,7 +29,7 @@ Ext.define('PVE.form.SnapshotSelector', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no node name specified";
@@ -43,7 +43,7 @@ Ext.define('PVE.form.SnapshotSelector', {
throw "no guest type specified";
}
- var store = Ext.create('Ext.data.Store', {
+ let store = Ext.create('Ext.data.Store', {
fields: ['name'],
filterOnLoad: true,
});
diff --git a/www/manager6/form/SpiceEnhancementSelector.js b/www/manager6/form/SpiceEnhancementSelector.js
index 525479e2..5c39d8c6 100644
--- a/www/manager6/form/SpiceEnhancementSelector.js
+++ b/www/manager6/form/SpiceEnhancementSelector.js
@@ -44,7 +44,7 @@ Ext.define('PVE.form.SpiceEnhancementSelector', {
],
onGetValues: function(values) {
- var ret = {};
+ let ret = {};
if (values.videostreaming !== "off") {
ret.videostreaming = values.videostreaming;
@@ -55,17 +55,17 @@ Ext.define('PVE.form.SpiceEnhancementSelector', {
if (Ext.Object.isEmpty(ret)) {
return { 'delete': 'spice_enhancements' };
}
- var enhancements = PVE.Parser.printPropertyString(ret);
+ let enhancements = PVE.Parser.printPropertyString(ret);
return { spice_enhancements: enhancements };
},
setValues: function(values) {
- var vga = PVE.Parser.parsePropertyString(values.vga, 'type');
+ let vga = PVE.Parser.parsePropertyString(values.vga, 'type');
if (!/^qxl\d?$/.test(vga.type)) {
this.down('#spicehint').setVisible(true);
}
if (values.spice_enhancements) {
- var enhancements = PVE.Parser.parsePropertyString(values.spice_enhancements);
+ let enhancements = PVE.Parser.parsePropertyString(values.spice_enhancements);
enhancements.foldersharing = PVE.Parser.parseBoolean(enhancements.foldersharing, 0);
this.callParent([enhancements]);
}
diff --git a/www/manager6/form/StorageSelector.js b/www/manager6/form/StorageSelector.js
index 872bc1ab..981d5182 100644
--- a/www/manager6/form/StorageSelector.js
+++ b/www/manager6/form/StorageSelector.js
@@ -118,7 +118,7 @@ Ext.define('PVE.form.StorageSelector', {
},
setTargetNode: function(targetNode) {
- var me = this;
+ let me = this;
if (!targetNode || me.targetNode === targetNode) {
return;
@@ -134,7 +134,7 @@ Ext.define('PVE.form.StorageSelector', {
},
setNodename: function(nodename) {
- var me = this;
+ let me = this;
nodename = nodename || '';
@@ -148,12 +148,12 @@ Ext.define('PVE.form.StorageSelector', {
},
initComponent: function() {
- var me = this;
+ let me = this;
let nodename = me.nodename;
me.nodename = undefined;
- var store = Ext.create('Ext.data.Store', {
+ let store = Ext.create('Ext.data.Store', {
model: 'pve-storage-status',
sorters: {
property: 'storage',
diff --git a/www/manager6/form/USBSelector.js b/www/manager6/form/USBSelector.js
index 0d511699..c3fe3802 100644
--- a/www/manager6/form/USBSelector.js
+++ b/www/manager6/form/USBSelector.js
@@ -10,7 +10,7 @@ Ext.define('PVE.form.USBSelector', {
editable: true,
validator: function(value) {
- var me = this;
+ let me = this;
if (!value) {
return true; // handled later by allowEmpty in the getErrors call chain
}
@@ -24,9 +24,9 @@ Ext.define('PVE.form.USBSelector', {
},
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no nodename specified";
diff --git a/www/manager6/form/VLanField.js b/www/manager6/form/VLanField.js
index 7379789a..b38196e4 100644
--- a/www/manager6/form/VLanField.js
+++ b/www/manager6/form/VLanField.js
@@ -11,7 +11,7 @@ Ext.define('PVE.form.VlanField', {
allowBlank: true,
getSubmitData: function() {
- var me = this,
+ let me = this,
data = null,
val;
if (!me.disabled && me.submitValue) {
@@ -28,7 +28,7 @@ Ext.define('PVE.form.VlanField', {
},
initComponent: function() {
- var me = this;
+ let me = this;
Ext.apply(me, {
minValue: 1,
diff --git a/www/manager6/form/VMCPUFlagSelector.js b/www/manager6/form/VMCPUFlagSelector.js
index ace3c531..7901732f 100644
--- a/www/manager6/form/VMCPUFlagSelector.js
+++ b/www/manager6/form/VMCPUFlagSelector.js
@@ -42,15 +42,15 @@ Ext.define('PVE.form.VMCPUFlagSelector', {
},
getValue: function() {
- var me = this;
- var store = me.getStore();
- var flags = '';
+ let me = this;
+ let store = me.getStore();
+ let flags = '';
// ExtJS does not has a nice getAllRecords interface for stores :/
store.queryBy(Ext.returnTrue).each(function(rec) {
- var s = rec.get('state');
+ let s = rec.get('state');
if (s && s !== '=') {
- var f = rec.get('flag');
+ let f = rec.get('flag');
if (flags === '') {
flags = s + f;
} else {
@@ -65,8 +65,8 @@ Ext.define('PVE.form.VMCPUFlagSelector', {
},
setValue: function(value) {
- var me = this;
- var store = me.getStore();
+ let me = this;
+ let store = me.getStore();
me.value = value || '';
@@ -76,12 +76,12 @@ Ext.define('PVE.form.VMCPUFlagSelector', {
rec.set('state', '=');
});
- var flags = value ? value.split(';') : [];
+ let flags = value ? value.split(';') : [];
flags.forEach(function(flag) {
- var sign = flag.substr(0, 1);
+ let sign = flag.substr(0, 1);
flag = flag.substr(1);
- var rec = store.findRecord('flag', flag, 0, false, true, true);
+ let rec = store.findRecord('flag', flag, 0, false, true, true);
if (rec !== null) {
rec.set('state', sign);
} else {
@@ -90,7 +90,7 @@ Ext.define('PVE.form.VMCPUFlagSelector', {
});
store.reload();
- var res = me.mixins.field.setValue.call(me, value);
+ let res = me.mixins.field.setValue.call(me, value);
return res;
},
@@ -112,7 +112,7 @@ Ext.define('PVE.form.VMCPUFlagSelector', {
dataIndex: 'state',
width: 95,
onWidgetAttach: function(column, widget, record) {
- var val = record.get('state') || '=';
+ let val = record.get('state') || '=';
widget.down('[inputValue=' + val + ']').setValue(true);
// TODO: disable if selected CPU model and flag are incompatible
},
@@ -124,10 +124,10 @@ Ext.define('PVE.form.VMCPUFlagSelector', {
value: '=',
listeners: {
change: function(f, value) {
- var v = Object.values(value)[0];
+ let v = Object.values(value)[0];
f.getWidgetRecord().set('state', v);
- var view = this.up('grid');
+ let view = this.up('grid');
view.dirty = view.getValue() !== view.originalValue;
view.checkDirty();
//view.checkChange();
@@ -165,7 +165,7 @@ Ext.define('PVE.form.VMCPUFlagSelector', {
],
initComponent: function() {
- var me = this;
+ let me = this;
// static class store, thus gets not recreated, so ensure defaults are set!
me.getStore().data.forEach(function(v) {
diff --git a/www/manager6/form/VMSelector.js b/www/manager6/form/VMSelector.js
index 78cd9013..e003f94e 100644
--- a/www/manager6/form/VMSelector.js
+++ b/www/manager6/form/VMSelector.js
@@ -112,11 +112,11 @@ Ext.define('PVE.form.VMSelector', {
},
getValue: function() {
- var me = this;
- var sm = me.getSelectionModel();
- var selection = sm.getSelection();
- var values = [];
- var store = me.getStore();
+ let me = this;
+ let sm = me.getSelectionModel();
+ let selection = sm.getSelection();
+ let values = [];
+ let store = me.getStore();
selection.forEach(function(item) {
// only add if not filtered
if (store.findExact('vmid', item.data.vmid) !== -1) {
@@ -167,7 +167,7 @@ Ext.define('PVE.form.VMSelector', {
// only show the relevant guests by default
if (me.action) {
- var statusfilter = '';
+ let statusfilter = '';
switch (me.action) {
case 'startall':
statusfilter = 'stopped';
diff --git a/www/manager6/grid/BackupView.js b/www/manager6/grid/BackupView.js
index 7f7e1b62..801727bb 100644
--- a/www/manager6/grid/BackupView.js
+++ b/www/manager6/grid/BackupView.js
@@ -9,24 +9,24 @@ Ext.define('PVE.grid.BackupView', {
stateId: 'grid-guest-backup',
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var vmid = me.pveSelNode.data.vmid;
+ let vmid = me.pveSelNode.data.vmid;
if (!vmid) {
throw "no VM ID specified";
}
- var vmtype = me.pveSelNode.data.type;
+ let vmtype = me.pveSelNode.data.type;
if (!vmtype) {
throw "no VM type specified";
}
- var vmtypeFilter;
+ let vmtypeFilter;
if (vmtype === 'lxc' || vmtype === 'openvz') {
vmtypeFilter = function(item) {
return PVE.Utils.volume_is_lxc_backup(item.data.volid, item.data.format);
@@ -39,14 +39,14 @@ Ext.define('PVE.grid.BackupView', {
throw "unsupported VM type '" + vmtype + "'";
}
- var searchFilter = {
+ let searchFilter = {
property: 'volid',
value: '',
anyMatch: true,
caseSensitive: false,
};
- var vmidFilter = {
+ let vmidFilter = {
property: 'vmid',
value: vmid,
exactMatch: true,
@@ -79,15 +79,15 @@ Ext.define('PVE.grid.BackupView', {
]);
};
- var reload = Ext.Function.createBuffered(function() {
+ let reload = Ext.Function.createBuffered(function() {
if (me.store) {
me.store.load();
}
}, 100);
let isPBS = false;
- var setStorage = function(storage) {
- var url = '/api2/json/nodes/' + nodename + '/storage/' + storage + '/content';
+ let setStorage = function(storage) {
+ let url = '/api2/json/nodes/' + nodename + '/storage/' + storage + '/content';
url += '?content=backup';
me.store.setProxy({
@@ -102,7 +102,7 @@ Ext.define('PVE.grid.BackupView', {
let file_restore_btn;
- var storagesel = Ext.create('PVE.form.StorageSelector', {
+ let storagesel = Ext.create('PVE.form.StorageSelector', {
nodename: nodename,
fieldLabel: gettext('Storage'),
labelAlign: 'right',
@@ -130,7 +130,7 @@ Ext.define('PVE.grid.BackupView', {
},
});
- var storagefilter = Ext.create('Ext.form.field.Text', {
+ let storagefilter = Ext.create('Ext.form.field.Text', {
fieldLabel: gettext('Search'),
labelWidth: 50,
labelAlign: 'right',
@@ -146,7 +146,7 @@ Ext.define('PVE.grid.BackupView', {
},
});
- var vmidfilterCB = Ext.create('Ext.form.field.Checkbox', {
+ let vmidfilterCB = Ext.create('Ext.form.field.Checkbox', {
boxLabel: gettext('Filter VMID'),
value: '1',
listeners: {
@@ -158,12 +158,12 @@ Ext.define('PVE.grid.BackupView', {
},
});
- var sm = Ext.create('Ext.selection.RowModel', {});
+ let sm = Ext.create('Ext.selection.RowModel', {});
- var backup_btn = Ext.create('Ext.button.Button', {
+ let backup_btn = Ext.create('Ext.button.Button', {
text: gettext('Backup now'),
handler: function() {
- var win = Ext.create('PVE.window.Backup', {
+ let win = Ext.create('PVE.window.Backup', {
nodename: nodename,
vmid: vmid,
vmtype: vmtype,
@@ -178,7 +178,7 @@ Ext.define('PVE.grid.BackupView', {
},
});
- var restore_btn = Ext.create('Proxmox.button.Button', {
+ let restore_btn = Ext.create('Proxmox.button.Button', {
text: gettext('Restore'),
disabled: true,
selModel: sm,
@@ -270,7 +270,7 @@ Ext.define('PVE.grid.BackupView', {
disabled: true,
handler: function() {
let volid = sm.getSelection()[0].data.volid;
- var storage = storagesel.getValue();
+ let storage = storagesel.getValue();
Ext.create('Proxmox.window.Edit', {
autoLoad: true,
width: 600,
diff --git a/www/manager6/grid/FirewallAliases.js b/www/manager6/grid/FirewallAliases.js
index 00d0d74b..055f9431 100644
--- a/www/manager6/grid/FirewallAliases.js
+++ b/www/manager6/grid/FirewallAliases.js
@@ -108,7 +108,7 @@ Ext.define('PVE.FirewallAliases', {
let oldrec = sm.getSelection()[0];
store.load(function(records, operation, success) {
if (oldrec) {
- var rec = store.findRecord('name', oldrec.data.name, 0, false, true, true);
+ let rec = store.findRecord('name', oldrec.data.name, 0, false, true, true);
if (rec) {
sm.select(rec);
}
@@ -139,7 +139,7 @@ Ext.define('PVE.FirewallAliases', {
me.addBtn = Ext.create('Ext.Button', {
text: gettext('Add'),
handler: function() {
- var win = Ext.create('PVE.FirewallAliasEdit', {
+ let win = Ext.create('PVE.FirewallAliasEdit', {
base_url: me.base_url,
});
win.on('destroy', reload);
diff --git a/www/manager6/grid/FirewallOptions.js b/www/manager6/grid/FirewallOptions.js
index 4123bd9f..e0c4a499 100644
--- a/www/manager6/grid/FirewallOptions.js
+++ b/www/manager6/grid/FirewallOptions.js
@@ -7,7 +7,7 @@ Ext.define('PVE.FirewallOptions', {
base_url: undefined,
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.base_url) {
throw "missing base_url configuration";
@@ -23,10 +23,10 @@ Ext.define('PVE.FirewallOptions', {
me.rows = {};
- var add_boolean_row = function(name, text, defaultValue) {
+ let add_boolean_row = function(name, text, defaultValue) {
me.add_boolean_row(name, text, { defaultValue: defaultValue });
};
- var add_integer_row = function(name, text, minValue, labelWidth) {
+ let add_integer_row = function(name, text, minValue, labelWidth) {
me.add_integer_row(name, text, {
minValue: minValue,
deleteEmpty: true,
@@ -41,7 +41,7 @@ Ext.define('PVE.FirewallOptions', {
});
};
- var add_log_row = function(name, labelWidth) {
+ let add_log_row = function(name, labelWidth) {
me.rows[name] = {
header: name,
required: true,
@@ -146,21 +146,21 @@ Ext.define('PVE.FirewallOptions', {
};
}
- var edit_btn = new Ext.Button({
+ let edit_btn = new Ext.Button({
text: gettext('Edit'),
disabled: true,
handler: function() { me.run_editor(); },
});
- var set_button_status = function() {
- var sm = me.getSelectionModel();
- var rec = sm.getSelection()[0];
+ let set_button_status = function() {
+ let sm = me.getSelectionModel();
+ let rec = sm.getSelection()[0];
if (!rec) {
edit_btn.disable();
return;
}
- var rowdef = me.rows[rec.data.key];
+ let rowdef = me.rows[rec.data.key];
edit_btn.setDisabled(!rowdef.editor);
};
diff --git a/www/manager6/grid/FirewallRules.js b/www/manager6/grid/FirewallRules.js
index 5777c7f4..9f828cf4 100644
--- a/www/manager6/grid/FirewallRules.js
+++ b/www/manager6/grid/FirewallRules.js
@@ -22,9 +22,9 @@ Ext.define('PVE.form.FWMacroSelector', {
],
},
initComponent: function() {
- var me = this;
+ let me = this;
- var store = Ext.create('Ext.data.Store', {
+ let store = Ext.create('Ext.data.Store', {
autoLoad: true,
fields: ['macro', 'descr'],
idProperty: 'macro',
@@ -155,7 +155,7 @@ Ext.define('PVE.FirewallRulePanel', {
list_refs_url: undefined,
onGetValues: function(values) {
- var me = this;
+ let me = this;
// hack: editable ComboGrid returns nothing when empty, so we need to set ''
// Also, disabled text fields return nothing, so we need to set ''
@@ -172,7 +172,7 @@ Ext.define('PVE.FirewallRulePanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.list_refs_url) {
throw "no list_refs_url specified";
@@ -390,7 +390,7 @@ Ext.define('PVE.FirewallRuleEdit', {
allow_iface: false,
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.base_url) {
throw "no base_url specified";
@@ -409,7 +409,7 @@ Ext.define('PVE.FirewallRuleEdit', {
me.method = 'PUT';
}
- var ipanel = Ext.create('PVE.FirewallRulePanel', {
+ let ipanel = Ext.create('PVE.FirewallRulePanel', {
isCreate: me.isCreate,
list_refs_url: me.list_refs_url,
allow_iface: me.allow_iface,
@@ -427,17 +427,17 @@ Ext.define('PVE.FirewallRuleEdit', {
if (!me.isCreate) {
me.load({
success: function(response, options) {
- var values = response.result.data;
+ let values = response.result.data;
ipanel.setValues(values);
// set icmp-type again after protocol has been set
if (values["icmp-type"] !== undefined) {
ipanel.setValues({ "icmp-type": values["icmp-type"] });
}
if (values.errors) {
- var field = me.query('[isFormField][name=modified_marker]')[0];
+ let field = me.query('[isFormField][name=modified_marker]')[0];
field.setValue(1);
Ext.Function.defer(function() {
- var form = ipanel.up('form').getForm();
+ let form = ipanel.up('form').getForm();
form.markInvalid(values.errors);
}, 100);
}
@@ -457,7 +457,7 @@ Ext.define('PVE.FirewallGroupRuleEdit', {
allow_iface: false,
initComponent: function() {
- var me = this;
+ let me = this;
me.isCreate = me.rule_pos === undefined;
@@ -469,7 +469,7 @@ Ext.define('PVE.FirewallGroupRuleEdit', {
me.method = 'PUT';
}
- var column1 = [
+ let column1 = [
{
xtype: 'hiddenfield',
name: 'type',
@@ -494,7 +494,7 @@ Ext.define('PVE.FirewallGroupRuleEdit', {
});
}
- var ipanel = Ext.create('Proxmox.panel.InputPanel', {
+ let ipanel = Ext.create('Proxmox.panel.InputPanel', {
isCreate: me.isCreate,
column1: column1,
column2: [
@@ -527,7 +527,7 @@ Ext.define('PVE.FirewallGroupRuleEdit', {
if (!me.isCreate) {
me.load({
success: function(response, options) {
- var values = response.result.data;
+ let values = response.result.data;
ipanel.setValues(values);
},
});
@@ -558,7 +558,7 @@ Ext.define('PVE.FirewallRules', {
allow_iface: false,
setBaseUrl: function(url) {
- var me = this;
+ let me = this;
me.base_url = url;
@@ -584,7 +584,7 @@ Ext.define('PVE.FirewallRules', {
},
moveRule: function(from, to) {
- var me = this;
+ let me = this;
if (!me.base_url) {
return;
@@ -605,7 +605,7 @@ Ext.define('PVE.FirewallRules', {
},
updateRule: function(rule) {
- var me = this;
+ let me = this;
if (!me.base_url) {
return;
@@ -613,7 +613,7 @@ Ext.define('PVE.FirewallRules', {
rule.enable = rule.enable ? 1 : 0;
- var pos = rule.pos;
+ let pos = rule.pos;
delete rule.pos;
delete rule.errors;
@@ -633,30 +633,30 @@ Ext.define('PVE.FirewallRules', {
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.list_refs_url) {
throw "no list_refs_url specified";
}
- var store = Ext.create('Ext.data.Store', {
+ let store = Ext.create('Ext.data.Store', {
model: 'pve-fw-rule',
});
- var reload = function() {
+ let reload = function() {
store.load();
};
- var sm = Ext.create('Ext.selection.RowModel', {});
+ let sm = Ext.create('Ext.selection.RowModel', {});
- var run_editor = function() {
- var rec = sm.getSelection()[0];
+ let run_editor = function() {
+ let rec = sm.getSelection()[0];
if (!rec) {
return;
}
- var type = rec.data.type;
+ let type = rec.data.type;
- var editor;
+ let editor;
if (type === 'in' || type === 'out') {
editor = 'PVE.FirewallRuleEdit';
} else if (type === 'group') {
@@ -665,7 +665,7 @@ Ext.define('PVE.FirewallRules', {
return;
}
- var win = Ext.create(editor, {
+ let win = Ext.create(editor, {
digest: rec.data.digest,
allow_iface: me.allow_iface,
base_url: me.base_url,
@@ -688,7 +688,7 @@ Ext.define('PVE.FirewallRules', {
text: gettext('Add'),
disabled: true,
handler: function() {
- var win = Ext.create('PVE.FirewallRuleEdit', {
+ let win = Ext.create('PVE.FirewallRuleEdit', {
allow_iface: me.allow_iface,
base_url: me.base_url,
list_refs_url: me.list_refs_url,
@@ -698,7 +698,7 @@ Ext.define('PVE.FirewallRules', {
},
});
- var run_copy_editor = function() {
+ let run_copy_editor = function() {
let rec = sm.getSelection()[0];
if (!rec) {
return;
@@ -732,7 +732,7 @@ Ext.define('PVE.FirewallRules', {
gettext('Security Group'),
disabled: true,
handler: function() {
- var win = Ext.create('PVE.FirewallGroupRuleEdit', {
+ let win = Ext.create('PVE.FirewallGroupRuleEdit', {
allow_iface: me.allow_iface,
base_url: me.base_url,
});
@@ -747,7 +747,7 @@ Ext.define('PVE.FirewallRules', {
baseurl: me.base_url + '/',
confirmMsg: false,
getRecordName: function(rec) {
- var rule = rec.data;
+ let rule = rec.data;
return rule.pos.toString() +
'?digest=' + encodeURIComponent(rule.digest);
},
@@ -799,9 +799,9 @@ Ext.define('PVE.FirewallRules', {
dataIndex: 'enable',
listeners: {
checkchange: function(column, recordIndex, checked) {
- var record = me.getStore().getData().items[recordIndex];
+ let record = me.getStore().getData().items[recordIndex];
record.commit();
- var data = {};
+ let data = {};
Ext.Array.forEach(record.getFields(), function(field) {
data[field.name] = record.get(field.name);
});
diff --git a/www/manager6/grid/PoolMembers.js b/www/manager6/grid/PoolMembers.js
index 025288cc..f17e931a 100644
--- a/www/manager6/grid/PoolMembers.js
+++ b/www/manager6/grid/PoolMembers.js
@@ -5,7 +5,7 @@ Ext.define('PVE.pool.AddVM', {
isAdd: true,
isCreate: true,
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.pool) {
throw "no pool specified";
@@ -14,13 +14,13 @@ Ext.define('PVE.pool.AddVM', {
me.url = "/pools/" + me.pool;
me.method = 'PUT';
- var vmsField = Ext.create('Ext.form.field.Text', {
+ let vmsField = Ext.create('Ext.form.field.Text', {
name: 'vms',
hidden: true,
allowBlank: false,
});
- var vmStore = Ext.create('Ext.data.Store', {
+ let vmStore = Ext.create('Ext.data.Store', {
model: 'PVEResources',
sorters: [
{
@@ -35,7 +35,7 @@ Ext.define('PVE.pool.AddVM', {
],
});
- var vmGrid = Ext.create('widget.grid', {
+ let vmGrid = Ext.create('widget.grid', {
store: vmStore,
border: true,
height: 300,
@@ -45,7 +45,7 @@ Ext.define('PVE.pool.AddVM', {
mode: 'SIMPLE',
listeners: {
selectionchange: function(model, selected, opts) {
- var selectedVms = [];
+ let selectedVms = [];
selected.forEach(function(vm) {
selectedVms.push(vm.data.vmid);
});
@@ -99,7 +99,7 @@ Ext.define('PVE.pool.AddStorage', {
extend: 'Proxmox.window.Edit',
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.pool) {
throw "no pool specified";
@@ -139,13 +139,13 @@ Ext.define('PVE.grid.PoolMembers', {
stateId: 'grid-pool-members',
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.pool) {
throw "no pool specified";
}
- var store = Ext.create('Ext.data.Store', {
+ let store = Ext.create('Ext.data.Store', {
model: 'PVEResources',
sorters: [
{
@@ -160,15 +160,15 @@ Ext.define('PVE.grid.PoolMembers', {
},
});
- var coldef = PVE.data.ResourceStore.defaultColumns();
+ let coldef = PVE.data.ResourceStore.defaultColumns();
- var reload = function() {
+ let reload = function() {
store.load();
};
- var sm = Ext.create('Ext.selection.RowModel', {});
+ let sm = Ext.create('Ext.selection.RowModel', {});
- var remove_btn = new Proxmox.button.Button({
+ let remove_btn = new Proxmox.button.Button({
text: gettext('Remove'),
disabled: true,
selModel: sm,
@@ -177,7 +177,7 @@ Ext.define('PVE.grid.PoolMembers', {
"'" + rec.data.id + "'");
},
handler: function(btn, event, rec) {
- var params = { 'delete': 1 };
+ let params = { 'delete': 1 };
if (rec.data.type === 'storage') {
params.storage = rec.data.storage;
} else if (rec.data.type === 'qemu' || rec.data.type === 'lxc' || rec.data.type === 'openvz') {
@@ -213,7 +213,7 @@ Ext.define('PVE.grid.PoolMembers', {
text: gettext('Virtual Machine'),
iconCls: 'pve-itype-icon-qemu',
handler: function() {
- var win = Ext.create('PVE.pool.AddVM', { pool: me.pool });
+ let win = Ext.create('PVE.pool.AddVM', { pool: me.pool });
win.on('destroy', reload);
win.show();
},
@@ -222,7 +222,7 @@ Ext.define('PVE.grid.PoolMembers', {
text: gettext('Storage'),
iconCls: 'pve-itype-icon-storage',
handler: function() {
- var win = Ext.create('PVE.pool.AddStorage', { pool: me.pool });
+ let win = Ext.create('PVE.pool.AddStorage', { pool: me.pool });
win.on('destroy', reload);
win.show();
},
@@ -239,7 +239,7 @@ Ext.define('PVE.grid.PoolMembers', {
listeners: {
itemcontextmenu: PVE.Utils.createCmdMenu,
itemdblclick: function(v, record) {
- var ws = me.up('pveStdWorkspace');
+ let ws = me.up('pveStdWorkspace');
ws.selectById(record.data.id);
},
activate: reload,
diff --git a/www/manager6/grid/Replication.js b/www/manager6/grid/Replication.js
index b17288b9..3baa1b4f 100644
--- a/www/manager6/grid/Replication.js
+++ b/www/manager6/grid/Replication.js
@@ -9,12 +9,12 @@ Ext.define('PVE.window.ReplicaEdit', {
method: 'POST',
initComponent: function() {
- var me = this;
+ let me = this;
- var vmid = me.pveSelNode.data.vmid;
- var nodename = me.pveSelNode.data.node;
+ let vmid = me.pveSelNode.data.vmid;
+ let nodename = me.pveSelNode.data.node;
- var items = [];
+ let items = [];
items.push({
xtype: me.isCreate && !vmid?'pveGuestIDSelector':'displayfield',
@@ -99,10 +99,10 @@ Ext.define('PVE.window.ReplicaEdit', {
if (me.isCreate) {
me.load({
success: function(response) {
- var jobs = response.result.data;
- var highestids = {};
+ let jobs = response.result.data;
+ let highestids = {};
Ext.Array.forEach(jobs, function(job) {
- var match = /^([0-9]+)-([0-9]+)$/.exec(job.id);
+ let match = /^([0-9]+)-([0-9]+)$/.exec(job.id);
if (match) {
let jobVMID = parseInt(match[1], 10);
let id = parseInt(match[2], 10);
@@ -270,9 +270,9 @@ Ext.define('PVE.grid.ReplicaView', {
],
initComponent: function() {
- var me = this;
- var mode = '';
- var url = '/cluster/replication';
+ let me = this;
+ let mode = '';
+ let url = '/cluster/replication';
me.nodename = me.pveSelNode.data.node;
me.vmid = me.pveSelNode.data.vmid;
diff --git a/www/manager6/grid/ResourceGrid.js b/www/manager6/grid/ResourceGrid.js
index 29906a37..f23c8500 100644
--- a/www/manager6/grid/ResourceGrid.js
+++ b/www/manager6/grid/ResourceGrid.js
@@ -32,7 +32,7 @@ Ext.define('PVE.grid.ResourceGrid', {
};
let updateGrid = function() {
- var filterfn = me.viewFilter ? me.viewFilter.filterfn : null;
+ let filterfn = me.viewFilter ? me.viewFilter.filterfn : null;
store.suspendEvents();
@@ -122,7 +122,7 @@ Ext.define('PVE.grid.ResourceGrid', {
listeners: {
itemcontextmenu: PVE.Utils.createCmdMenu,
itemdblclick: function(v, record) {
- var ws = me.up('pveStdWorkspace');
+ let ws = me.up('pveStdWorkspace');
ws.selectById(record.data.id);
},
afterrender: function() {
diff --git a/www/manager6/ha/Fencing.js b/www/manager6/ha/Fencing.js
index c87a761c..c5a7b7d9 100644
--- a/www/manager6/ha/Fencing.js
+++ b/www/manager6/ha/Fencing.js
@@ -5,9 +5,9 @@ Ext.define('PVE.ha.FencingView', {
onlineHelp: 'ha_manager_fencing',
initComponent: function() {
- var me = this;
+ let me = this;
- var store = new Ext.data.Store({
+ let store = new Ext.data.Store({
model: 'pve-ha-fencing',
data: [],
});
diff --git a/www/manager6/ha/GroupEdit.js b/www/manager6/ha/GroupEdit.js
index 2c42de6b..27b52ffc 100644
--- a/www/manager6/ha/GroupEdit.js
+++ b/www/manager6/ha/GroupEdit.js
@@ -5,7 +5,7 @@ Ext.define('PVE.ha.GroupInputPanel', {
groupId: undefined,
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.isCreate) {
values.type = 'group';
@@ -15,7 +15,7 @@ Ext.define('PVE.ha.GroupInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
let update_nodefield, update_node_selection;
@@ -43,7 +43,7 @@ Ext.define('PVE.ha.GroupInputPanel', {
],
});
- var nodegrid = Ext.createWidget('grid', {
+ let nodegrid = Ext.createWidget('grid', {
store: store,
border: true,
height: 300,
@@ -180,7 +180,7 @@ Ext.define('PVE.ha.GroupEdit', {
groupId: undefined,
initComponent: function() {
- var me = this;
+ let me = this;
me.isCreate = !me.groupId;
@@ -192,7 +192,7 @@ Ext.define('PVE.ha.GroupEdit', {
me.method = 'PUT';
}
- var ipanel = Ext.create('PVE.ha.GroupInputPanel', {
+ let ipanel = Ext.create('PVE.ha.GroupInputPanel', {
isCreate: me.isCreate,
groupId: me.groupId,
});
@@ -207,7 +207,7 @@ Ext.define('PVE.ha.GroupEdit', {
if (!me.isCreate) {
me.load({
success: function(response, options) {
- var values = response.result.data;
+ let values = response.result.data;
ipanel.setValues(values);
},
diff --git a/www/manager6/ha/GroupSelector.js b/www/manager6/ha/GroupSelector.js
index 61ab0c03..00975458 100644
--- a/www/manager6/ha/GroupSelector.js
+++ b/www/manager6/ha/GroupSelector.js
@@ -37,7 +37,7 @@ Ext.define('PVE.ha.GroupSelector', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.callParent();
me.getStore().load();
},
diff --git a/www/manager6/ha/Groups.js b/www/manager6/ha/Groups.js
index da5f4479..98dc3ae4 100644
--- a/www/manager6/ha/Groups.js
+++ b/www/manager6/ha/Groups.js
@@ -8,11 +8,11 @@ Ext.define('PVE.ha.GroupsView', {
stateId: 'grid-ha-groups',
initComponent: function() {
- var me = this;
+ let me = this;
- var caps = Ext.state.Manager.get('GuiCap');
+ let caps = Ext.state.Manager.get('GuiCap');
- var store = new Ext.data.Store({
+ let store = new Ext.data.Store({
model: 'pve-ha-groups',
sorters: {
property: 'group',
@@ -20,11 +20,11 @@ Ext.define('PVE.ha.GroupsView', {
},
});
- var reload = function() {
+ let reload = function() {
store.load();
};
- var sm = Ext.create('Ext.selection.RowModel', {});
+ let sm = Ext.create('Ext.selection.RowModel', {});
let run_editor = function() {
let rec = sm.getSelection()[0];
diff --git a/www/manager6/ha/ResourceEdit.js b/www/manager6/ha/ResourceEdit.js
index f4c876ea..8e5e0a6d 100644
--- a/www/manager6/ha/ResourceEdit.js
+++ b/www/manager6/ha/ResourceEdit.js
@@ -4,7 +4,7 @@ Ext.define('PVE.ha.VMResourceInputPanel', {
vmid: undefined,
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (values.vmid) {
values.sid = values.vmid;
@@ -19,10 +19,10 @@ Ext.define('PVE.ha.VMResourceInputPanel', {
},
initComponent: function() {
- var me = this;
- var MIN_QUORUM_VOTES = 3;
+ let me = this;
+ let MIN_QUORUM_VOTES = 3;
- var disabledHint = Ext.createWidget({
+ let disabledHint = Ext.createWidget({
xtype: 'displayfield', // won't get submitted by default
userCls: 'pmx-hint',
value: 'Disabling the resource will stop the guest system. ' +
@@ -30,7 +30,7 @@ Ext.define('PVE.ha.VMResourceInputPanel', {
hidden: true,
});
- var fewVotesHint = Ext.createWidget({
+ let fewVotesHint = Ext.createWidget({
itemId: 'fewVotesHint',
xtype: 'displayfield',
userCls: 'pmx-hint',
@@ -45,10 +45,10 @@ Ext.define('PVE.ha.VMResourceInputPanel', {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
success: function(response) {
- var nodes = response.result.data;
- var votes = 0;
+ let nodes = response.result.data;
+ let votes = 0;
Ext.Array.forEach(nodes, function(node) {
- var vote = parseInt(node.quorum_votes, 10); // parse as base 10
+ let vote = parseInt(node.quorum_votes, 10); // parse as base 10
votes += vote || 0; // parseInt might return NaN, which is false
});
@@ -58,7 +58,7 @@ Ext.define('PVE.ha.VMResourceInputPanel', {
},
});
- var vmidStore = me.vmid ? {} : {
+ let vmidStore = me.vmid ? {} : {
model: 'PVEResources',
autoLoad: true,
sorters: 'vmid',
@@ -156,7 +156,7 @@ Ext.define('PVE.ha.VMResourceEdit', {
isCreate: undefined,
initComponent: function() {
- var me = this;
+ let me = this;
if (me.isCreate === undefined) {
me.isCreate = !me.vmid;
@@ -170,7 +170,7 @@ Ext.define('PVE.ha.VMResourceEdit', {
me.method = 'PUT';
}
- var ipanel = Ext.create('PVE.ha.VMResourceInputPanel', {
+ let ipanel = Ext.create('PVE.ha.VMResourceInputPanel', {
isCreate: me.isCreate,
vmid: me.vmid,
guestType: me.guestType,
@@ -188,10 +188,10 @@ Ext.define('PVE.ha.VMResourceEdit', {
if (!me.isCreate) {
me.load({
success: function(response, options) {
- var values = response.result.data;
+ let values = response.result.data;
- var regex = /^(\S+):(\S+)$/;
- var res = regex.exec(values.sid);
+ let regex = /^(\S+):(\S+)$/;
+ let res = regex.exec(values.sid);
if (res[1] !== 'vm' && res[1] !== 'ct') {
throw "got unexpected resource type";
diff --git a/www/manager6/ha/Status.js b/www/manager6/ha/Status.js
index 8870faf4..c1348482 100644
--- a/www/manager6/ha/Status.js
+++ b/www/manager6/ha/Status.js
@@ -9,7 +9,7 @@ Ext.define('PVE.ha.Status', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.rstore = Ext.create('Proxmox.data.ObjectStore', {
interval: me.interval,
diff --git a/www/manager6/ha/StatusView.js b/www/manager6/ha/StatusView.js
index 1ccc670f..f6e61359 100644
--- a/www/manager6/ha/StatusView.js
+++ b/www/manager6/ha/StatusView.js
@@ -12,7 +12,7 @@ Ext.define('PVE.ha.StatusView', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.rstore) {
throw "no rstore given";
@@ -20,13 +20,13 @@ Ext.define('PVE.ha.StatusView', {
Proxmox.Utils.monStoreErrors(me, me.rstore);
- var store = Ext.create('Proxmox.data.DiffStore', {
+ let store = Ext.create('Proxmox.data.DiffStore', {
rstore: me.rstore,
sortAfterUpdate: true,
sorters: [{
sorterFn: function(rec1, rec2) {
- var p1 = me.sortPriority[rec1.data.type];
- var p2 = me.sortPriority[rec2.data.type];
+ let p1 = me.sortPriority[rec1.data.type];
+ let p2 = me.sortPriority[rec2.data.type];
return p1 !== p2 ? p1 > p2 ? 1 : -1 : 0;
},
}],
diff --git a/www/manager6/lxc/Config.js b/www/manager6/lxc/Config.js
index 89b59c9b..6b0571ce 100644
--- a/www/manager6/lxc/Config.js
+++ b/www/manager6/lxc/Config.js
@@ -5,33 +5,33 @@ Ext.define('PVE.lxc.Config', {
onlineHelp: 'chapter_pct',
initComponent: function() {
- var me = this;
- var vm = me.pveSelNode.data;
+ let me = this;
+ let vm = me.pveSelNode.data;
- var nodename = vm.node;
+ let nodename = vm.node;
if (!nodename) {
throw "no node name specified";
}
- var vmid = vm.vmid;
+ let vmid = vm.vmid;
if (!vmid) {
throw "no VM ID specified";
}
- var template = !!vm.template;
+ let template = !!vm.template;
- var running = !!vm.uptime;
+ let running = !!vm.uptime;
- var caps = Ext.state.Manager.get('GuiCap');
+ let caps = Ext.state.Manager.get('GuiCap');
- var base_url = '/nodes/' + nodename + '/lxc/' + vmid;
+ let base_url = '/nodes/' + nodename + '/lxc/' + vmid;
me.statusStore = Ext.create('Proxmox.data.ObjectStore', {
url: '/api2/json' + base_url + '/status/current',
interval: 1000,
});
- var vm_command = function(cmd, params) {
+ let vm_command = function(cmd, params) {
Proxmox.Utils.API2Request({
params: params,
url: base_url + "/status/" + cmd,
@@ -43,7 +43,7 @@ Ext.define('PVE.lxc.Config', {
});
};
- var startBtn = Ext.create('Ext.Button', {
+ let startBtn = Ext.create('Ext.Button', {
text: gettext('Start'),
disabled: !caps.vms['VM.PowerMgmt'] || running,
hidden: template,
@@ -53,7 +53,7 @@ Ext.define('PVE.lxc.Config', {
iconCls: 'fa fa-play',
});
- var shutdownBtn = Ext.create('PVE.button.Split', {
+ let shutdownBtn = Ext.create('PVE.button.Split', {
text: gettext('Shutdown'),
disabled: !caps.vms['VM.PowerMgmt'] || !running,
hidden: template,
@@ -87,12 +87,12 @@ Ext.define('PVE.lxc.Config', {
iconCls: 'fa fa-power-off',
});
- var migrateBtn = Ext.create('Ext.Button', {
+ let migrateBtn = Ext.create('Ext.Button', {
text: gettext('Migrate'),
disabled: !caps.vms['VM.Migrate'],
hidden: PVE.data.ResourceStore.getNodes().length < 2,
handler: function() {
- var win = Ext.create('PVE.window.Migrate', {
+ let win = Ext.create('PVE.window.Migrate', {
vmtype: 'lxc',
nodename: nodename,
vmid: vmid,
@@ -102,7 +102,7 @@ Ext.define('PVE.lxc.Config', {
iconCls: 'fa fa-send-o',
});
- var moreBtn = Ext.create('Proxmox.button.Button', {
+ let moreBtn = Ext.create('Proxmox.button.Button', {
text: gettext('More'),
menu: {
items: [
@@ -137,7 +137,7 @@ Ext.define('PVE.lxc.Config', {
hidden: !caps.nodes['Sys.Console'],
text: gettext('Manage HA'),
handler: function() {
- var ha = vm.hastate;
+ let ha = vm.hastate;
Ext.create('PVE.ha.VMResourceEdit', {
vmid: vmid,
guestType: 'ct',
@@ -162,7 +162,7 @@ Ext.define('PVE.lxc.Config', {
},
});
- var consoleBtn = Ext.create('PVE.button.ConsoleButton', {
+ let consoleBtn = Ext.create('PVE.button.ConsoleButton', {
disabled: !caps.vms['VM.Console'],
consoleType: 'lxc',
consoleName: vm.name,
@@ -171,7 +171,7 @@ Ext.define('PVE.lxc.Config', {
vmid: vmid,
});
- var statusTxt = Ext.create('Ext.toolbar.TextItem', {
+ let statusTxt = Ext.create('Ext.toolbar.TextItem', {
data: {
lock: undefined,
},
@@ -340,14 +340,14 @@ Ext.define('PVE.lxc.Config', {
me.callParent();
- var prevStatus = 'unknown';
+ let prevStatus = 'unknown';
me.mon(me.statusStore, 'load', function(s, records, success) {
- var status;
- var lock;
+ let status;
+ let lock;
if (!success) {
status = 'unknown';
} else {
- var rec = s.data.get('status');
+ let rec = s.data.get('status');
status = rec ? rec.data.value : 'unknown';
rec = s.data.get('template');
template = rec ? rec.data.value : false;
diff --git a/www/manager6/lxc/CreateWizard.js b/www/manager6/lxc/CreateWizard.js
index 1f902c2c..b05586d6 100644
--- a/www/manager6/lxc/CreateWizard.js
+++ b/www/manager6/lxc/CreateWizard.js
@@ -104,7 +104,7 @@ Ext.define('PVE.lxc.CreateWizard', {
allowBlank: true,
submitValue: false,
validator: function(value) {
- var pw = this.up().down('field[name=password]').getValue();
+ let pw = this.up().down('field[name=password]').getValue();
if (pw !== value) {
return "Passwords do not match!";
}
diff --git a/www/manager6/lxc/DNS.js b/www/manager6/lxc/DNS.js
index 6c519023..b04c3c3d 100644
--- a/www/manager6/lxc/DNS.js
+++ b/www/manager6/lxc/DNS.js
@@ -5,9 +5,9 @@ Ext.define('PVE.lxc.DNSInputPanel', {
insideWizard: false,
onGetValues: function(values) {
- var me = this;
+ let me = this;
- var deletes = [];
+ let deletes = [];
if (!values.searchdomain && !me.insideWizard) {
deletes.push('searchdomain');
}
@@ -27,9 +27,9 @@ Ext.define('PVE.lxc.DNSInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
- var items = [
+ let items = [
{
xtype: 'proxmoxtextfield',
name: 'searchdomain',
@@ -63,9 +63,9 @@ Ext.define('PVE.lxc.DNSEdit', {
extend: 'Proxmox.window.Edit',
initComponent: function() {
- var me = this;
+ let me = this;
- var ipanel = Ext.create('PVE.lxc.DNSInputPanel');
+ let ipanel = Ext.create('PVE.lxc.DNSInputPanel');
Ext.apply(me, {
subject: gettext('Resources'),
@@ -77,7 +77,7 @@ Ext.define('PVE.lxc.DNSEdit', {
if (!me.isCreate) {
me.load({
success: function(response, options) {
- var values = response.result.data;
+ let values = response.result.data;
if (values.nameserver) {
values.nameserver.replace(/[,;]/, ' ');
@@ -98,21 +98,21 @@ Ext.define('PVE.lxc.DNS', {
onlineHelp: 'pct_container_network',
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var vmid = me.pveSelNode.data.vmid;
+ let vmid = me.pveSelNode.data.vmid;
if (!vmid) {
throw "no VM ID specified";
}
- var caps = Ext.state.Manager.get('GuiCap');
+ let caps = Ext.state.Manager.get('GuiCap');
- var rows = {
+ let rows = {
hostname: {
required: true,
defaultValue: me.pveSelNode.data.name,
@@ -131,7 +131,7 @@ Ext.define('PVE.lxc.DNS', {
emptyText: 'CT' + vmid.toString(),
},
onGetValues: function(values) {
- var params = values;
+ let params = values;
if (values.hostname === undefined ||
values.hostname === null ||
values.hostname === '') {
@@ -160,26 +160,26 @@ Ext.define('PVE.lxc.DNS', {
},
};
- var baseurl = 'nodes/' + nodename + '/lxc/' + vmid + '/config';
+ let baseurl = 'nodes/' + nodename + '/lxc/' + vmid + '/config';
- var reload = function() {
+ let reload = function() {
me.rstore.load();
};
- var sm = Ext.create('Ext.selection.RowModel', {});
+ let sm = Ext.create('Ext.selection.RowModel', {});
- var run_editor = function() {
- var rec = sm.getSelection()[0];
+ let run_editor = function() {
+ let rec = sm.getSelection()[0];
if (!rec) {
return;
}
- var rowdef = rows[rec.data.key];
+ let rowdef = rows[rec.data.key];
if (!rowdef.editor) {
return;
}
- var win;
+ let win;
if (Ext.isString(rowdef.editor)) {
win = Ext.create(rowdef.editor, {
pveSelNode: me.pveSelNode,
@@ -187,7 +187,7 @@ Ext.define('PVE.lxc.DNS', {
url: '/api2/extjs/nodes/' + nodename + '/lxc/' + vmid + '/config',
});
} else {
- var config = Ext.apply({
+ let config = Ext.apply({
pveSelNode: me.pveSelNode,
confid: rec.data.key,
url: '/api2/extjs/nodes/' + nodename + '/lxc/' + vmid + '/config',
@@ -200,20 +200,20 @@ Ext.define('PVE.lxc.DNS', {
win.on('destroy', reload);
};
- var edit_btn = new Proxmox.button.Button({
+ let edit_btn = new Proxmox.button.Button({
text: gettext('Edit'),
disabled: true,
selModel: sm,
enableFn: function(rec) {
- var rowdef = rows[rec.data.key];
+ let rowdef = rows[rec.data.key];
return !!rowdef.editor;
},
handler: run_editor,
});
- var revert_btn = new PVE.button.PendingRevert();
+ let revert_btn = new PVE.button.PendingRevert();
- var set_button_status = function() {
+ let set_button_status = function() {
let button_sm = me.getSelectionModel();
let rec = button_sm.getSelection()[0];
diff --git a/www/manager6/lxc/FeaturesEdit.js b/www/manager6/lxc/FeaturesEdit.js
index bce6e5fb..9dbe069a 100644
--- a/www/manager6/lxc/FeaturesEdit.js
+++ b/www/manager6/lxc/FeaturesEdit.js
@@ -69,8 +69,8 @@ Ext.define('PVE.lxc.FeaturesInputPanel', {
],
onGetValues: function(values) {
- var me = this;
- var mounts = me.mounts;
+ let me = this;
+ let mounts = me.mounts;
me.fstypes.forEach(function(fs) {
if (values[fs]) {
mounts.push(fs);
@@ -82,7 +82,7 @@ Ext.define('PVE.lxc.FeaturesInputPanel', {
values.mount = mounts.join(';');
}
- var featuresstring = PVE.Parser.printPropertyString(values, undefined);
+ let featuresstring = PVE.Parser.printPropertyString(values, undefined);
if (featuresstring === '') {
return { 'delete': 'features' };
}
@@ -90,12 +90,12 @@ Ext.define('PVE.lxc.FeaturesInputPanel', {
},
setValues: function(values) {
- var me = this;
+ let me = this;
me.viewModel.set('unprivileged', values.unprivileged);
if (values.features) {
- var res = PVE.Parser.parsePropertyString(values.features);
+ let res = PVE.Parser.parsePropertyString(values.features);
me.mounts = [];
if (res.mount) {
res.mount.split(/[; ]/).forEach(function(item) {
diff --git a/www/manager6/lxc/MPEdit.js b/www/manager6/lxc/MPEdit.js
index 609447ef..f43aab04 100644
--- a/www/manager6/lxc/MPEdit.js
+++ b/www/manager6/lxc/MPEdit.js
@@ -12,16 +12,16 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
vmconfig: {}, // used to select unused disks
setUnprivileged: function(unprivileged) {
- var me = this;
- var vm = me.getViewModel();
+ let me = this;
+ let vm = me.getViewModel();
me.unprivileged = unprivileged;
vm.set('unpriv', unprivileged);
},
onGetValues: function(values) {
- var me = this;
+ let me = this;
- var confid = me.confid || "mp"+values.mpid;
+ let confid = me.confid || "mp"+values.mpid;
me.mp.file = me.down('field[name=file]').getValue();
if (me.unused) {
diff --git a/www/manager6/lxc/MPResize.js b/www/manager6/lxc/MPResize.js
index 881c037b..783d96fe 100644
--- a/www/manager6/lxc/MPResize.js
+++ b/www/manager6/lxc/MPResize.js
@@ -4,8 +4,8 @@ Ext.define('PVE.window.MPResize', {
resizable: false,
resize_disk: function(disk, size) {
- var me = this;
- var params = { disk: disk, size: '+' + size + 'G' };
+ let me = this;
+ let params = { disk: disk, size: '+' + size + 'G' };
Proxmox.Utils.API2Request({
params: params,
@@ -16,8 +16,8 @@ Ext.define('PVE.window.MPResize', {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
success: function(response, opts) {
- var upid = response.result.data;
- var win = Ext.create('Proxmox.window.TaskViewer', { upid: upid });
+ let upid = response.result.data;
+ let win = Ext.create('Proxmox.window.TaskViewer', { upid: upid });
win.show();
me.close();
},
@@ -25,7 +25,7 @@ Ext.define('PVE.window.MPResize', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no node name specified";
@@ -35,7 +35,7 @@ Ext.define('PVE.window.MPResize', {
throw "no VM ID specified";
}
- var items = [
+ let items = [
{
xtype: 'displayfield',
name: 'disk',
@@ -68,16 +68,16 @@ Ext.define('PVE.window.MPResize', {
items: items,
});
- var form = me.formPanel.getForm();
+ let form = me.formPanel.getForm();
- var submitBtn;
+ let submitBtn;
me.title = gettext('Resize disk');
submitBtn = Ext.create('Ext.Button', {
text: gettext('Resize disk'),
handler: function() {
if (form.isValid()) {
- var values = form.getValues();
+ let values = form.getValues();
me.resize_disk(me.disk, values.size);
}
},
diff --git a/www/manager6/lxc/Options.js b/www/manager6/lxc/Options.js
index d0a53fc7..ab4ae5e6 100644
--- a/www/manager6/lxc/Options.js
+++ b/www/manager6/lxc/Options.js
@@ -5,21 +5,21 @@ Ext.define('PVE.lxc.Options', {
onlineHelp: 'pct_options',
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var vmid = me.pveSelNode.data.vmid;
+ let vmid = me.pveSelNode.data.vmid;
if (!vmid) {
throw "no VM ID specified";
}
- var caps = Ext.state.Manager.get('GuiCap');
+ let caps = Ext.state.Manager.get('GuiCap');
- var rows = {
+ let rows = {
onboot: {
header: gettext('Start at boot'),
defaultValue: '',
@@ -143,24 +143,24 @@ Ext.define('PVE.lxc.Options', {
},
};
- var baseurl = 'nodes/' + nodename + '/lxc/' + vmid + '/config';
+ let baseurl = 'nodes/' + nodename + '/lxc/' + vmid + '/config';
- var sm = Ext.create('Ext.selection.RowModel', {});
+ let sm = Ext.create('Ext.selection.RowModel', {});
- var edit_btn = new Proxmox.button.Button({
+ let edit_btn = new Proxmox.button.Button({
text: gettext('Edit'),
disabled: true,
selModel: sm,
enableFn: function(rec) {
- var rowdef = rows[rec.data.key];
+ let rowdef = rows[rec.data.key];
return !!rowdef.editor;
},
handler: function() { me.run_editor(); },
});
- var revert_btn = new PVE.button.PendingRevert();
+ let revert_btn = new PVE.button.PendingRevert();
- var set_button_status = function() {
+ let set_button_status = function() {
let button_sm = me.getSelectionModel();
let rec = button_sm.getSelection()[0];
@@ -169,9 +169,9 @@ Ext.define('PVE.lxc.Options', {
return;
}
- var key = rec.data.key;
- var pending = rec.data.delete || me.hasPendingChanges(key);
- var rowdef = rows[key];
+ let key = rec.data.key;
+ let pending = rec.data.delete || me.hasPendingChanges(key);
+ let rowdef = rows[key];
if (key === 'features') {
let unprivileged = me.getStore().getById('unprivileged').data.value;
diff --git a/www/manager6/lxc/ResourceEdit.js b/www/manager6/lxc/ResourceEdit.js
index 6f21571b..f4f0d76b 100644
--- a/www/manager6/lxc/ResourceEdit.js
+++ b/www/manager6/lxc/ResourceEdit.js
@@ -1,10 +1,10 @@
-var labelWidth = 120;
+let labelWidth = 120;
Ext.define('PVE.lxc.MemoryEdit', {
extend: 'Proxmox.window.Edit',
initComponent: function() {
- var me = this;
+ let me = this;
Ext.apply(me, {
subject: gettext('Memory'),
@@ -22,7 +22,7 @@ Ext.define('PVE.lxc.CPUEdit', {
extend: 'Proxmox.window.Edit',
initComponent: function() {
- var me = this;
+ let me = this;
Ext.apply(me, {
subject: gettext('CPU'),
@@ -44,7 +44,7 @@ Ext.define('PVE.lxc.CPUInputPanel', {
insideWizard: false,
onGetValues: function(values) {
- var me = this;
+ let me = this;
PVE.Utils.delete_if_default(values, 'cores', '', me.insideWizard);
// cpu{limit,unit} aren't in the wizard so create is always false
@@ -81,7 +81,7 @@ Ext.define('PVE.lxc.CPUInputPanel', {
],
initComponent: function() {
- var me = this;
+ let me = this;
me.column1 = [
{
@@ -110,9 +110,9 @@ Ext.define('PVE.lxc.MemoryInputPanel', {
insideWizard: false,
initComponent: function() {
- var me = this;
+ let me = this;
- var items = [
+ let items = [
{
xtype: 'proxmoxintegerfield',
name: 'memory',
diff --git a/www/manager6/lxc/Resources.js b/www/manager6/lxc/Resources.js
index 4b2ae95e..daa3c509 100644
--- a/www/manager6/lxc/Resources.js
+++ b/www/manager6/lxc/Resources.js
@@ -27,25 +27,25 @@ Ext.define('PVE.lxc.RessourceView', {
},
initComponent: function() {
- var me = this;
+ let me = this;
let confid;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var vmid = me.pveSelNode.data.vmid;
+ let vmid = me.pveSelNode.data.vmid;
if (!vmid) {
throw "no VM ID specified";
}
- var caps = Ext.state.Manager.get('GuiCap');
- var diskCap = caps.vms['VM.Config.Disk'];
+ let caps = Ext.state.Manager.get('GuiCap');
+ let diskCap = caps.vms['VM.Config.Disk'];
- var mpeditor = caps.vms['VM.Config.Disk'] ? 'PVE.lxc.MountPointEdit' : undefined;
+ let mpeditor = caps.vms['VM.Config.Disk'] ? 'PVE.lxc.MountPointEdit' : undefined;
- var rows = {
+ let rows = {
memory: {
header: gettext('Memory'),
editor: caps.vms['VM.Config.Memory'] ? 'PVE.lxc.MemoryEdit' : undefined,
@@ -73,9 +73,9 @@ Ext.define('PVE.lxc.RessourceView', {
tdCls: 'pmx-itype-icon-processor',
group: 3,
renderer: function(value) {
- var cpulimit = me.getObjectValue('cpulimit');
- var cpuunits = me.getObjectValue('cpuunits');
- var res;
+ let cpulimit = me.getObjectValue('cpulimit');
+ let cpuunits = me.getObjectValue('cpuunits');
+ let res;
if (value) {
res = value;
} else {
@@ -112,8 +112,8 @@ Ext.define('PVE.lxc.RessourceView', {
PVE.Utils.forEachMP(function(bus, i) {
confid = bus + i;
- var group = 5;
- var header;
+ let group = 5;
+ let header;
if (bus === 'mp') {
header = gettext('Mount Point') + ' (' + confid + ')';
} else {
@@ -129,17 +129,17 @@ Ext.define('PVE.lxc.RessourceView', {
};
}, true);
- var baseurl = 'nodes/' + nodename + '/lxc/' + vmid + '/config';
+ let baseurl = 'nodes/' + nodename + '/lxc/' + vmid + '/config';
me.selModel = Ext.create('Ext.selection.RowModel', {});
- var run_resize = function() {
- var rec = me.selModel.getSelection()[0];
+ let run_resize = function() {
+ let rec = me.selModel.getSelection()[0];
if (!rec) {
return;
}
- var win = Ext.create('PVE.window.MPResize', {
+ let win = Ext.create('PVE.window.MPResize', {
disk: rec.data.key,
nodename: nodename,
vmid: vmid,
@@ -148,7 +148,7 @@ Ext.define('PVE.lxc.RessourceView', {
win.show();
};
- var run_remove = function(b, e, rec) {
+ let run_remove = function(b, e, rec) {
Proxmox.Utils.API2Request({
url: '/api2/extjs/' + baseurl,
waitMsgTarget: me,
@@ -168,7 +168,7 @@ Ext.define('PVE.lxc.RessourceView', {
return;
}
- var win = Ext.create('PVE.window.HDMove', {
+ let win = Ext.create('PVE.window.HDMove', {
disk: rec.data.key,
nodename: nodename,
vmid: vmid,
@@ -198,7 +198,7 @@ Ext.define('PVE.lxc.RessourceView', {
});
};
- var edit_btn = new Proxmox.button.Button({
+ let edit_btn = new Proxmox.button.Button({
text: gettext('Edit'),
selModel: me.selModel,
disabled: true,
@@ -206,13 +206,13 @@ Ext.define('PVE.lxc.RessourceView', {
if (!rec) {
return false;
}
- var rowdef = rows[rec.data.key];
+ let rowdef = rows[rec.data.key];
return !!rowdef.editor;
},
handler: function() { me.run_editor(); },
});
- var remove_btn = new Proxmox.button.Button({
+ let remove_btn = new Proxmox.button.Button({
text: gettext('Remove'),
defaultText: gettext('Remove'),
altText: gettext('Detach'),
diff --git a/www/manager6/node/ACME.js b/www/manager6/node/ACME.js
index 0642e7c5..fa94042e 100644
--- a/www/manager6/node/ACME.js
+++ b/www/manager6/node/ACME.js
@@ -64,14 +64,14 @@ Ext.define('PVE.node.ACMEAccountCreate', {
},
listeners: {
change: function(combogrid, value) {
- var me = this;
+ let me = this;
if (!value) {
return;
}
- var disp = me.up('window').down('#tos_url_display');
- var field = me.up('window').down('#tos_url');
- var checkbox = me.up('window').down('#tos_checkbox');
+ let disp = me.up('window').down('#tos_url_display');
+ let field = me.up('window').down('#tos_url');
+ let checkbox = me.up('window').down('#tos_checkbox');
disp.setValue(gettext('Loading'));
field.setValue(undefined);
@@ -164,7 +164,7 @@ Ext.define('PVE.node.ACMEAccountView', {
],
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.accountname) {
throw "no account name defined";
@@ -179,7 +179,7 @@ Ext.define('PVE.node.ACMEAccountView', {
me.load({
success: function(response) {
- var data = response.result.data;
+ let data = response.result.data;
data.email = data.account.contact[0];
data.createdAt = data.account.createdAt;
data.status = data.account.status;
@@ -523,7 +523,7 @@ Ext.define('PVE.node.ACME', {
orderFinished: function(success) {
if (!success) return;
- var txt = gettext('pveproxy will be restarted with new certificates, please reload the GUI!');
+ let txt = gettext('pveproxy will be restarted with new certificates, please reload the GUI!');
Ext.getBody().mask(txt, ['pve-static-mask']);
// reload after 10 seconds automatically
Ext.defer(function() {
@@ -712,7 +712,7 @@ Ext.define('PVE.node.ACME', {
],
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no nodename given";
diff --git a/www/manager6/node/Certificates.js b/www/manager6/node/Certificates.js
index ab9f0696..6f195730 100644
--- a/www/manager6/node/Certificates.js
+++ b/www/manager6/node/Certificates.js
@@ -339,7 +339,7 @@ Ext.define('PVE.node.Certificates', {
if (!selection || selection.length < 1) {
return;
}
- var win = Ext.create('PVE.node.CertificateViewer', {
+ let win = Ext.create('PVE.node.CertificateViewer', {
cert: selection[0].data.filename,
nodename: me.nodename,
});
@@ -351,7 +351,7 @@ Ext.define('PVE.node.Certificates', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no nodename given";
diff --git a/www/manager6/node/Config.js b/www/manager6/node/Config.js
index 7e5b1112..3d58f095 100644
--- a/www/manager6/node/Config.js
+++ b/www/manager6/node/Config.js
@@ -5,21 +5,21 @@ Ext.define('PVE.node.Config', {
onlineHelp: 'chapter_system_administration',
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var caps = Ext.state.Manager.get('GuiCap');
+ let caps = Ext.state.Manager.get('GuiCap');
me.statusStore = Ext.create('Proxmox.data.ObjectStore', {
url: "/api2/json/nodes/" + nodename + "/status",
interval: 5000,
});
- var node_command = function(cmd) {
+ let node_command = function(cmd) {
Proxmox.Utils.API2Request({
params: { command: cmd },
url: '/nodes/' + nodename + '/status',
@@ -31,7 +31,7 @@ Ext.define('PVE.node.Config', {
});
};
- var actionBtn = Ext.create('Ext.Button', {
+ let actionBtn = Ext.create('Ext.Button', {
text: gettext('Bulk Actions'),
iconCls: 'fa fa-fw fa-ellipsis-v',
disabled: !caps.nodes['Sys.PowerMgmt'],
@@ -41,7 +41,7 @@ Ext.define('PVE.node.Config', {
text: gettext('Bulk Start'),
iconCls: 'fa fa-fw fa-play',
handler: function() {
- var win = Ext.create('PVE.window.BulkAction', {
+ let win = Ext.create('PVE.window.BulkAction', {
nodename: nodename,
title: gettext('Bulk Start'),
btnText: gettext('Start'),
@@ -54,7 +54,7 @@ Ext.define('PVE.node.Config', {
text: gettext('Bulk Stop'),
iconCls: 'fa fa-fw fa-stop',
handler: function() {
- var win = Ext.create('PVE.window.BulkAction', {
+ let win = Ext.create('PVE.window.BulkAction', {
nodename: nodename,
title: gettext('Bulk Stop'),
btnText: gettext('Stop'),
@@ -67,7 +67,7 @@ Ext.define('PVE.node.Config', {
text: gettext('Bulk Migrate'),
iconCls: 'fa fa-fw fa-send-o',
handler: function() {
- var win = Ext.create('PVE.window.BulkAction', {
+ let win = Ext.create('PVE.window.BulkAction', {
nodename: nodename,
title: gettext('Bulk Migrate'),
btnText: gettext('Migrate'),
@@ -91,7 +91,7 @@ Ext.define('PVE.node.Config', {
iconCls: 'fa fa-undo',
});
- var shutdownBtn = Ext.create('Proxmox.button.Button', {
+ let shutdownBtn = Ext.create('Proxmox.button.Button', {
text: gettext('Shutdown'),
disabled: !caps.nodes['Sys.PowerMgmt'],
dangerous: true,
@@ -102,7 +102,7 @@ Ext.define('PVE.node.Config', {
iconCls: 'fa fa-power-off',
});
- var shellBtn = Ext.create('PVE.button.ConsoleButton', {
+ let shellBtn = Ext.create('PVE.button.ConsoleButton', {
disabled: !caps.nodes['Sys.Console'],
text: gettext('Shell'),
consoleType: 'shell',
diff --git a/www/manager6/node/Directory.js b/www/manager6/node/Directory.js
index d79c0d63..685af75a 100644
--- a/www/manager6/node/Directory.js
+++ b/www/manager6/node/Directory.js
@@ -9,7 +9,7 @@ Ext.define('PVE.node.CreateDirectory', {
onlineHelp: 'chapter_storage',
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no node name specified";
diff --git a/www/manager6/node/LVMThin.js b/www/manager6/node/LVMThin.js
index b9ad4b8d..b77fbb43 100644
--- a/www/manager6/node/LVMThin.js
+++ b/www/manager6/node/LVMThin.js
@@ -175,7 +175,7 @@ Ext.define('PVE.node.LVMThinList', {
{
text: gettext('Create') + ': Thinpool',
handler: function() {
- var view = this.up('panel');
+ let view = this.up('panel');
Ext.create('PVE.node.CreateLVMThin', {
nodename: view.nodename,
taskDone: () => view.reload(),
diff --git a/www/manager6/node/StatusView.js b/www/manager6/node/StatusView.js
index d34724f7..33e61197 100644
--- a/www/manager6/node/StatusView.js
+++ b/www/manager6/node/StatusView.js
@@ -116,8 +116,8 @@ Ext.define('PVE.node.StatusView', {
],
updateTitle: function() {
- var me = this;
- var uptime = Proxmox.Utils.render_uptime(me.getRecordValue('uptime'));
+ let me = this;
+ let uptime = Proxmox.Utils.render_uptime(me.getRecordValue('uptime'));
me.setTitle(me.pveSelNode.data.node + ' (' + gettext('Uptime') + ': ' + uptime + ')');
},
diff --git a/www/manager6/node/Subscription.js b/www/manager6/node/Subscription.js
index 2558f523..3e21ba8f 100644
--- a/www/manager6/node/Subscription.js
+++ b/www/manager6/node/Subscription.js
@@ -9,7 +9,7 @@ Ext.define('PVE.node.SubscriptionKeyEdit', {
fieldLabel: gettext('Subscription Key'),
},
initComponent: function() {
- var me = this;
+ let me = this;
me.callParent();
@@ -29,14 +29,14 @@ Ext.define('PVE.node.Subscription', {
},
showReport: function() {
- var me = this;
+ let me = this;
- var getReportFileName = function() {
- var now = Ext.Date.format(new Date(), 'D-d-F-Y-G-i');
+ let getReportFileName = function() {
+ let now = Ext.Date.format(new Date(), 'D-d-F-Y-G-i');
return `${me.nodename}-pve-report-${now}.txt`;
};
- var view = Ext.createWidget('component', {
+ let view = Ext.createWidget('component', {
itemId: 'system-report-view',
scrollable: true,
style: {
@@ -47,7 +47,7 @@ Ext.define('PVE.node.Subscription', {
},
});
- var reportWindow = Ext.create('Ext.window.Window', {
+ let reportWindow = Ext.create('Ext.window.Window', {
title: gettext('System Report'),
width: 1024,
height: 600,
@@ -58,14 +58,14 @@ Ext.define('PVE.node.Subscription', {
{
text: gettext('Download'),
handler: function() {
- var fileContent = Ext.String.htmlDecode(reportWindow.getComponent('system-report-view').html);
- var fileName = getReportFileName();
+ let fileContent = Ext.String.htmlDecode(reportWindow.getComponent('system-report-view').html);
+ let fileName = getReportFileName();
// Internet Explorer
if (window.navigator.msSaveOrOpenBlob) {
navigator.msSaveOrOpenBlob(new Blob([fileContent]), fileName);
} else {
- var element = document.createElement('a');
+ let element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' +
encodeURIComponent(fileContent));
element.setAttribute('download', fileName);
@@ -88,7 +88,7 @@ Ext.define('PVE.node.Subscription', {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
success: function(response) {
- var report = Ext.htmlEncode(response.result.data);
+ let report = Ext.htmlEncode(response.result.data);
reportWindow.show();
view.update(report);
},
@@ -96,27 +96,27 @@ Ext.define('PVE.node.Subscription', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no node name specified";
}
- var reload = function() {
+ let reload = function() {
me.rstore.load();
};
- var baseurl = '/nodes/' + me.nodename + '/subscription';
+ let baseurl = '/nodes/' + me.nodename + '/subscription';
- var render_status = function(value) {
- var message = me.getObjectValue('message');
+ let render_status = function(value) {
+ let message = me.getObjectValue('message');
if (message) {
return value + ": " + message;
}
return value;
};
- var rows = {
+ let rows = {
productname: {
header: gettext('Type'),
},
@@ -152,7 +152,7 @@ Ext.define('PVE.node.Subscription', {
{
text: gettext('Upload Subscription Key'),
handler: function() {
- var win = Ext.create('PVE.node.SubscriptionKeyEdit', {
+ let win = Ext.create('PVE.node.SubscriptionKeyEdit', {
url: '/api2/extjs/' + baseurl,
});
win.show();
diff --git a/www/manager6/node/Summary.js b/www/manager6/node/Summary.js
index 8680fa5f..916a1ce5 100644
--- a/www/manager6/node/Summary.js
+++ b/www/manager6/node/Summary.js
@@ -6,14 +6,14 @@ Ext.define('PVE.node.Summary', {
bodyPadding: 5,
showVersions: function() {
- var me = this;
+ let me = this;
// Note: we use simply text/html here, because ExtJS grid has problems
// with cut&paste
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
- var view = Ext.createWidget('component', {
+ let view = Ext.createWidget('component', {
autoScroll: true,
id: 'pkgversions',
padding: 5,
@@ -24,7 +24,7 @@ Ext.define('PVE.node.Summary', {
},
});
- var win = Ext.create('Ext.window.Window', {
+ let win = Ext.create('Ext.window.Window', {
title: gettext('Package versions'),
width: 600,
height: 600,
@@ -109,9 +109,9 @@ Ext.define('PVE.node.Summary', {
},
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
@@ -120,16 +120,16 @@ Ext.define('PVE.node.Summary', {
throw "no status storage specified";
}
- var rstore = me.statusStore;
+ let rstore = me.statusStore;
- var version_btn = new Ext.Button({
+ let version_btn = new Ext.Button({
text: gettext('Package versions'),
handler: function() {
Proxmox.Utils.checked_command(function() { me.showVersions(); });
},
});
- var rrdstore = Ext.create('Proxmox.data.RRDStore', {
+ let rrdstore = Ext.create('Proxmox.data.RRDStore', {
rrdurl: "/api2/json/nodes/" + nodename + "/rrddata",
model: 'pve-rrd-node',
});
diff --git a/www/manager6/node/ZFS.js b/www/manager6/node/ZFS.js
index 5b3bdbda..f0e9e163 100644
--- a/www/manager6/node/ZFS.js
+++ b/www/manager6/node/ZFS.js
@@ -272,11 +272,11 @@ Ext.define('PVE.node.ZFSList', {
},
set_button_status: function() {
- var me = this;
+ let me = this;
},
reload: function() {
- var me = this;
+ let me = this;
me.store.load();
me.store.sort();
},
diff --git a/www/manager6/panel/ConfigPanel.js b/www/manager6/panel/ConfigPanel.js
index 224bc768..af7d1716 100644
--- a/www/manager6/panel/ConfigPanel.js
+++ b/www/manager6/panel/ConfigPanel.js
@@ -78,8 +78,8 @@ Ext.define('PVE.panel.Config', {
view.updateLayout();
},
itemclick: function(treelist, info) {
- var olditem = treelist.getSelection();
- var newitem = info.node;
+ let olditem = treelist.getSelection();
+ let newitem = info.node;
// when clicking on the expand arrow, we don't select items, but still want the original behaviour
if (info.select === false) {
@@ -111,14 +111,14 @@ Ext.define('PVE.panel.Config', {
// used for automated test
selectById: function(cardid) {
- var me = this;
+ let me = this;
- var root = me.store.getRoot();
- var selection = root.findChild('id', cardid, true);
+ let root = me.store.getRoot();
+ let selection = root.findChild('id', cardid, true);
if (selection) {
selection.expand();
- var menu = me.down('#menu');
+ let menu = me.down('#menu');
menu.setSelection(selection);
return cardid;
}
@@ -126,10 +126,10 @@ Ext.define('PVE.panel.Config', {
},
activateCard: function(cardid) {
- var me = this;
+ let me = this;
if (me.savedItems[cardid]) {
- var curcard = me.getLayout().getActiveItem();
- var newcard = me.add(me.savedItems[cardid]);
+ let curcard = me.getLayout().getActiveItem();
+ let newcard = me.add(me.savedItems[cardid]);
me.helpButton.setOnlineHelp(newcard.onlineHelp || me.onlineHelp);
if (curcard) {
me.setActiveItem(cardid);
@@ -137,7 +137,7 @@ Ext.define('PVE.panel.Config', {
// trigger state change
- var ncard = cardid;
+ let ncard = cardid;
// Note: '' is alias for first tab.
// First tab can be 'search' or something else
if (cardid === me.firstItem) {
@@ -151,13 +151,13 @@ Ext.define('PVE.panel.Config', {
},
initComponent: function() {
- var me = this;
+ let me = this;
- var stateid = me.hstateid;
+ let stateid = me.hstateid;
me.sp = Ext.state.Manager.getProvider();
- var activeTab; // leaving this undefined means items[0] will be the default tab
+ let activeTab; // leaving this undefined means items[0] will be the default tab
if (stateid) {
let state = me.sp.get(stateid);
@@ -168,11 +168,11 @@ Ext.define('PVE.panel.Config', {
}
// get title
- var title = me.title || me.pveSelNode.data.text;
+ let title = me.title || me.pveSelNode.data.text;
me.title = undefined;
// create toolbar
- var tbar = me.tbar || [];
+ let tbar = me.tbar || [];
me.tbar = undefined;
if (!me.onlineHelp) {
@@ -226,7 +226,7 @@ Ext.define('PVE.panel.Config', {
expanded: true,
},
});
- var root = me.store.getRoot();
+ let root = me.store.getRoot();
me.insertNodes(me.items);
delete me.items;
@@ -240,9 +240,9 @@ Ext.define('PVE.panel.Config', {
me.callParent();
- var menu = me.down('#menu');
- var selection = root.findChild('id', activeTab, true) || root.firstChild;
- var node = selection;
+ let menu = me.down('#menu');
+ let selection = root.findChild('id', activeTab, true) || root.firstChild;
+ let node = selection;
while (node !== root) {
node.expand();
node = node.parentNode;
@@ -252,13 +252,13 @@ Ext.define('PVE.panel.Config', {
// on a state change,
// select the new item
- var statechange = function(sp, key, state) {
+ let statechange = function(sp, key, state) {
// it the state change is for this panel
if (stateid && key === stateid && state) {
// get active item
- var acard = me.getLayout().getActiveItem().itemId;
+ let acard = me.getLayout().getActiveItem().itemId;
// get the itemid of the new value
- var ncard = state.value || me.firstItem;
+ let ncard = state.value || me.firstItem;
if (ncard && acard !== ncard) {
// select the chosen item
menu.setSelection(root.findChild('id', ncard, true) || root.firstChild);
@@ -272,11 +272,11 @@ Ext.define('PVE.panel.Config', {
},
insertNodes: function(items) {
- var me = this;
- var root = me.store.getRoot();
+ let me = this;
+ let root = me.store.getRoot();
items.forEach(function(item) {
- var treeitem = Ext.create('Ext.data.TreeModel', {
+ let treeitem = Ext.create('Ext.data.TreeModel', {
id: item.itemId,
text: item.title,
iconCls: item.iconCls,
@@ -289,14 +289,14 @@ Ext.define('PVE.panel.Config', {
}
me.savedItems[item.itemId] = item;
- var group;
- var curnode = root;
+ let group;
+ let curnode = root;
// get/create the group items
while (Ext.isArray(item.groups) && item.groups.length > 0) {
group = item.groups.shift();
- var child = curnode.findChild('id', group);
+ let child = curnode.findChild('id', group);
if (child === null) {
// did not find the group item
// so add it where we are
@@ -308,7 +308,7 @@ Ext.define('PVE.panel.Config', {
// insert the item
// lets see if it already exists
- var node = curnode.findChild('id', item.itemId);
+ let node = curnode.findChild('id', item.itemId);
if (node === null) {
curnode.appendChild(treeitem);
diff --git a/www/manager6/panel/GuestStatusView.js b/www/manager6/panel/GuestStatusView.js
index 8db1f492..ab187038 100644
--- a/www/manager6/panel/GuestStatusView.js
+++ b/www/manager6/panel/GuestStatusView.js
@@ -4,7 +4,7 @@ Ext.define('PVE.panel.GuestStatusView', {
mixins: ['Proxmox.Mixin.CBind'],
cbindData: function(initialConfig) {
- var me = this;
+ let me = this;
return {
isQemu: me.pveSelNode.data.type === 'qemu',
isLxc: me.pveSelNode.data.type === 'lxc',
@@ -32,9 +32,9 @@ Ext.define('PVE.panel.GuestStatusView', {
printBar: false,
multiField: true,
renderer: function(record) {
- var me = this;
- var text = record.data.status;
- var qmpstatus = record.data.qmpstatus;
+ let me = this;
+ let text = record.data.status;
+ let qmpstatus = record.data.qmpstatus;
if (qmpstatus && qmpstatus !== record.data.status) {
text += ' (' + qmpstatus + ')';
}
@@ -99,7 +99,7 @@ Ext.define('PVE.panel.GuestStatusView', {
maxField: 'maxdisk',
printBar: false,
renderer: function(used, max) {
- var me = this;
+ let me = this;
me.setPrintBar(used > 0);
if (used === 0) {
return Proxmox.Utils.render_size(max);
@@ -125,10 +125,10 @@ Ext.define('PVE.panel.GuestStatusView', {
],
updateTitle: function() {
- var me = this;
- var uptime = me.getRecordValue('uptime');
+ let me = this;
+ let uptime = me.getRecordValue('uptime');
- var text = "";
+ let text = "";
if (Number(uptime) > 0) {
text = " (" + gettext('Uptime') + ': ' + Proxmox.Utils.format_duration_long(uptime)
+ ')';
diff --git a/www/manager6/panel/GuestSummary.js b/www/manager6/panel/GuestSummary.js
index 35721419..1094be44 100644
--- a/www/manager6/panel/GuestSummary.js
+++ b/www/manager6/panel/GuestSummary.js
@@ -6,14 +6,14 @@ Ext.define('PVE.qemu.Summary', {
bodyPadding: 5,
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var vmid = me.pveSelNode.data.vmid;
+ let vmid = me.pveSelNode.data.vmid;
if (!vmid) {
throw "no VM ID specified";
}
@@ -26,11 +26,11 @@ Ext.define('PVE.qemu.Summary', {
throw "no status storage specified";
}
- var type = me.pveSelNode.data.type;
- var template = !!me.pveSelNode.data.template;
- var rstore = me.statusStore;
+ let type = me.pveSelNode.data.type;
+ let template = !!me.pveSelNode.data.template;
+ let rstore = me.statusStore;
- var items = [
+ let items = [
{
xtype: template ? 'pveTemplateStatusView' : 'pveGuestStatusView',
flex: 1,
@@ -48,7 +48,7 @@ Ext.define('PVE.qemu.Summary', {
},
];
- var rrdstore;
+ let rrdstore;
if (!template) {
// in non-template mode put the two panels always together
items = [
diff --git a/www/manager6/panel/HealthWidget.js b/www/manager6/panel/HealthWidget.js
index 3543223a..51743483 100644
--- a/www/manager6/panel/HealthWidget.js
+++ b/www/manager6/panel/HealthWidget.js
@@ -20,12 +20,12 @@ Ext.define('PVE.widget.HealthWidget', {
],
updateHealth: function(data) {
- var me = this;
+ let me = this;
me.update(Ext.apply(me.data, data));
},
initComponent: function() {
- var me = this;
+ let me = this;
if (me.title) {
me.config.data.title = me.title;
diff --git a/www/manager6/panel/IPSet.js b/www/manager6/panel/IPSet.js
index a4606769..8d8511a7 100644
--- a/www/manager6/panel/IPSet.js
+++ b/www/manager6/panel/IPSet.js
@@ -20,7 +20,7 @@ Ext.define('PVE.IPSetList', {
editBtn: undefined,
initComponent: function() {
- var me = this;
+ let me = this;
if (typeof me.ipset_panel === 'undefined') {
throw "no rule panel specified";
@@ -30,7 +30,7 @@ Ext.define('PVE.IPSetList', {
throw "no base_url specified";
}
- var store = new Ext.data.Store({
+ let store = new Ext.data.Store({
model: 'pve-fw-ipsets',
proxy: {
type: 'proxmox',
@@ -42,13 +42,13 @@ Ext.define('PVE.IPSetList', {
},
});
- var sm = Ext.create('Ext.selection.RowModel', {});
+ let sm = Ext.create('Ext.selection.RowModel', {});
- var reload = function() {
- var oldrec = sm.getSelection()[0];
+ let reload = function() {
+ let oldrec = sm.getSelection()[0];
store.load(function(records, operation, success) {
if (oldrec) {
- var rec = store.findRecord('name', oldrec.data.name, 0, false, true, true);
+ let rec = store.findRecord('name', oldrec.data.name, 0, false, true, true);
if (rec) {
sm.select(rec);
}
@@ -56,12 +56,12 @@ Ext.define('PVE.IPSetList', {
});
};
- var run_editor = function() {
- var rec = sm.getSelection()[0];
+ let run_editor = function() {
+ let rec = sm.getSelection()[0];
if (!rec) {
return;
}
- var win = Ext.create('Proxmox.window.Edit', {
+ let win = Ext.create('Proxmox.window.Edit', {
subject: "IPSet '" + rec.data.name + "'",
url: me.base_url,
method: 'POST',
@@ -102,7 +102,7 @@ Ext.define('PVE.IPSetList', {
text: gettext('Create'),
handler: function() {
sm.deselectAll();
- var win = Ext.create('Proxmox.window.Edit', {
+ let win = Ext.create('Proxmox.window.Edit', {
subject: 'IPSet',
url: me.base_url,
method: 'POST',
@@ -144,7 +144,7 @@ Ext.define('PVE.IPSetList', {
listeners: {
itemdblclick: run_editor,
select: function(_, rec) {
- var url = me.base_url + '/' + rec.data.name;
+ let url = me.base_url + '/' + rec.data.name;
me.ipset_panel.setBaseUrl(url);
},
deselect: function() {
@@ -166,7 +166,7 @@ Ext.define('PVE.IPSetCidrEdit', {
cidr: undefined,
initComponent: function() {
- var me = this;
+ let me = this;
me.isCreate = me.cidr === undefined;
@@ -179,7 +179,7 @@ Ext.define('PVE.IPSetCidrEdit', {
me.method = 'PUT';
}
- var column1 = [];
+ let column1 = [];
if (me.isCreate) {
if (!me.list_refs_url) {
@@ -205,7 +205,7 @@ Ext.define('PVE.IPSetCidrEdit', {
});
}
- var ipanel = Ext.create('Proxmox.panel.InputPanel', {
+ let ipanel = Ext.create('Proxmox.panel.InputPanel', {
isCreate: me.isCreate,
column1: column1,
column2: [
@@ -237,7 +237,7 @@ Ext.define('PVE.IPSetCidrEdit', {
if (!me.isCreate) {
me.load({
success: function(response, options) {
- var values = response.result.data;
+ let values = response.result.data;
ipanel.setValues(values);
},
});
@@ -260,7 +260,7 @@ Ext.define('PVE.IPSetGrid', {
editBtn: undefined,
setBaseUrl: function(url) {
- var me = this;
+ let me = this;
me.base_url = url;
@@ -280,28 +280,28 @@ Ext.define('PVE.IPSetGrid', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.list_refs_url) {
throw "no1 list_refs_url specified";
}
- var store = new Ext.data.Store({
+ let store = new Ext.data.Store({
model: 'pve-ipset',
});
- var reload = function() {
+ let reload = function() {
store.load();
};
- var sm = Ext.create('Ext.selection.RowModel', {});
+ let sm = Ext.create('Ext.selection.RowModel', {});
- var run_editor = function() {
- var rec = sm.getSelection()[0];
+ let run_editor = function() {
+ let rec = sm.getSelection()[0];
if (!rec) {
return;
}
- var win = Ext.create('PVE.IPSetCidrEdit', {
+ let win = Ext.create('PVE.IPSetCidrEdit', {
base_url: me.base_url,
cidr: rec.data.cidr,
});
@@ -323,7 +323,7 @@ Ext.define('PVE.IPSetGrid', {
if (!me.base_url) {
return;
}
- var win = Ext.create('PVE.IPSetCidrEdit', {
+ let win = Ext.create('PVE.IPSetCidrEdit', {
base_url: me.base_url,
list_refs_url: me.list_refs_url,
});
@@ -338,13 +338,13 @@ Ext.define('PVE.IPSetGrid', {
callback: reload,
});
- var render_errors = function(value, metaData, record) {
- var errors = record.data.errors;
+ let render_errors = function(value, metaData, record) {
+ let errors = record.data.errors;
if (errors) {
- var msg = errors.cidr || errors.nomatch;
+ let msg = errors.cidr || errors.nomatch;
if (msg) {
metaData.tdCls = 'proxmox-invalid-row';
- var html = '<p>' + Ext.htmlEncode(msg) + '</p>';
+ let html = '<p>' + Ext.htmlEncode(msg) + '</p>';
metaData.tdAttr = 'data-qwidth=600 data-qtitle="ERROR" data-qtip="' +
html.replace(/"/g, '"') + '"';
}
@@ -412,19 +412,19 @@ Ext.define('PVE.IPSet', {
list_refs_url: undefined,
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.list_refs_url) {
throw "no list_refs_url specified";
}
- var ipset_panel = Ext.createWidget('pveIPSetGrid', {
+ let ipset_panel = Ext.createWidget('pveIPSetGrid', {
region: 'center',
list_refs_url: me.list_refs_url,
border: false,
});
- var ipset_list = Ext.createWidget('pveIPSetList', {
+ let ipset_list = Ext.createWidget('pveIPSetList', {
region: 'west',
ipset_panel: ipset_panel,
base_url: me.base_url,
diff --git a/www/manager6/panel/RunningChart.js b/www/manager6/panel/RunningChart.js
index 19db8b50..d0c72934 100644
--- a/www/manager6/panel/RunningChart.js
+++ b/www/manager6/panel/RunningChart.js
@@ -117,7 +117,7 @@ Ext.define('PVE.widget.RunningChart', {
// we prevent a memory leak when someone has the site open for a long time
// with minimal graphical glitches
if (view.store.count() > panel.timeFrame * 20) {
- var oldData = view.store.getData().createFiltered(function(item) {
+ let oldData = view.store.getData().createFiltered(function(item) {
return item.data.time < begin;
});
@@ -141,7 +141,7 @@ Ext.define('PVE.widget.RunningChart', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.callParent();
if (me.title) {
diff --git a/www/manager6/panel/StatusPanel.js b/www/manager6/panel/StatusPanel.js
index f9e3537b..d078b7e4 100644
--- a/www/manager6/panel/StatusPanel.js
+++ b/www/manager6/panel/StatusPanel.js
@@ -10,12 +10,12 @@ Ext.define('PVE.panel.StatusPanel', {
//tabPosition: 'bottom',
initComponent: function() {
- var me = this;
+ let me = this;
- var stateid = 'ltab';
- var sp = Ext.state.Manager.getProvider();
+ let stateid = 'ltab';
+ let sp = Ext.state.Manager.getProvider();
- var state = sp.get(stateid);
+ let state = sp.get(stateid);
if (state && state.value) {
me.activeTab = state.value;
}
@@ -23,7 +23,7 @@ Ext.define('PVE.panel.StatusPanel', {
Ext.apply(me, {
listeners: {
tabchange: function() {
- var atab = me.getActiveTab().itemId;
+ let atab = me.getActiveTab().itemId;
let tabstate = { value: atab };
sp.set(stateid, tabstate);
},
@@ -46,9 +46,9 @@ Ext.define('PVE.panel.StatusPanel', {
me.items.get(0).fireEvent('show', me.items.get(0));
- var statechange = function(_, key, newstate) {
+ let statechange = function(_, key, newstate) {
if (key === stateid) {
- var atab = me.getActiveTab().itemId;
+ let atab = me.getActiveTab().itemId;
let ntab = newstate.value;
if (newstate && ntab && atab !== ntab) {
me.setActiveTab(ntab);
diff --git a/www/manager6/panel/TemplateStatusView.js b/www/manager6/panel/TemplateStatusView.js
index 4e17a41c..7cab05ed 100644
--- a/www/manager6/panel/TemplateStatusView.js
+++ b/www/manager6/panel/TemplateStatusView.js
@@ -68,9 +68,9 @@ Ext.define('PVE.panel.TemplateStatusView', {
],
initComponent: function() {
- var me = this;
+ let me = this;
- var name = me.pveSelNode.data.name;
+ let name = me.pveSelNode.data.name;
if (!name) {
throw "no name specified";
}
diff --git a/www/manager6/pool/Config.js b/www/manager6/pool/Config.js
index 1f04ba0e..7c4c5240 100644
--- a/www/manager6/pool/Config.js
+++ b/www/manager6/pool/Config.js
@@ -5,9 +5,9 @@ Ext.define('PVE.pool.Config', {
onlineHelp: 'pveum_pools',
initComponent: function() {
- var me = this;
+ let me = this;
- var pool = me.pveSelNode.data.pool;
+ let pool = me.pveSelNode.data.pool;
if (!pool) {
throw "no pool specified";
}
diff --git a/www/manager6/pool/StatusView.js b/www/manager6/pool/StatusView.js
index 302ae5ab..6f57f7b2 100644
--- a/www/manager6/pool/StatusView.js
+++ b/www/manager6/pool/StatusView.js
@@ -8,14 +8,14 @@ Ext.define('PVE.pool.StatusView', {
interval: 30000,
//height: 195,
initComponent: function() {
- var me = this;
+ let me = this;
- var pool = me.pveSelNode.data.pool;
+ let pool = me.pveSelNode.data.pool;
if (!pool) {
throw "no pool specified";
}
- var rows = {
+ let rows = {
comment: {
header: gettext('Comment'),
renderer: Ext.String.htmlEncode,
diff --git a/www/manager6/pool/Summary.js b/www/manager6/pool/Summary.js
index 1a47428d..837b183f 100644
--- a/www/manager6/pool/Summary.js
+++ b/www/manager6/pool/Summary.js
@@ -3,19 +3,19 @@ Ext.define('PVE.pool.Summary', {
alias: 'widget.pvePoolSummary',
initComponent: function() {
- var me = this;
+ let me = this;
- var pool = me.pveSelNode.data.pool;
+ let pool = me.pveSelNode.data.pool;
if (!pool) {
throw "no pool specified";
}
- var statusview = Ext.create('PVE.pool.StatusView', {
+ let statusview = Ext.create('PVE.pool.StatusView', {
pveSelNode: me.pveSelNode,
style: 'padding-top:0px',
});
- var rstore = statusview.rstore;
+ let rstore = statusview.rstore;
Ext.apply(me, {
autoScroll: true,
diff --git a/www/manager6/qemu/AgentIPView.js b/www/manager6/qemu/AgentIPView.js
index 1411361a..d67852b7 100644
--- a/www/manager6/qemu/AgentIPView.js
+++ b/www/manager6/qemu/AgentIPView.js
@@ -32,10 +32,10 @@ Ext.define('PVE.window.IPInfo', {
if (!Ext.isArray(val)) {
return '';
}
- var ips = [];
+ let ips = [];
val.forEach(function(ip) {
- var addr = ip['ip-address'];
- var pref = ip.prefix;
+ let addr = ip['ip-address'];
+ let pref = ip.prefix;
if (addr && pref) {
ips.push(addr + '/' + pref);
}
@@ -89,7 +89,7 @@ Ext.define('PVE.qemu.AgentIPView', {
handler: function(btn) {
let view = this.up('pveAgentIPView');
- var win = Ext.create('PVE.window.IPInfo');
+ let win = Ext.create('PVE.window.IPInfo');
win.down('grid').getStore().setData(view.nics);
win.show();
},
@@ -100,15 +100,15 @@ Ext.define('PVE.qemu.AgentIPView', {
],
getDefaultIps: function(nics) {
- var me = this;
- var ips = [];
+ let me = this;
+ let ips = [];
nics.forEach(function(nic) {
if (nic['hardware-address'] &&
nic['hardware-address'] !== '00:00:00:00:00:00' &&
nic['hardware-address'] !== '0:0:0:0:0:0') {
- var nic_ips = nic['ip-addresses'] || [];
+ let nic_ips = nic['ip-addresses'] || [];
nic_ips.forEach(function(ip) {
- var p = ip['ip-address'];
+ let p = ip['ip-address'];
// show 2 ips at maximum
if (ips.length < 2) {
ips.push(p);
@@ -121,17 +121,17 @@ Ext.define('PVE.qemu.AgentIPView', {
},
startIPStore: function(store, records, success) {
- var me = this;
+ let me = this;
let agentRec = store.getById('agent');
let state = store.getById('status');
me.agent = agentRec && agentRec.data.value === 1;
me.running = state && state.data.value === 'running';
- var caps = Ext.state.Manager.get('GuiCap');
+ let caps = Ext.state.Manager.get('GuiCap');
if (!caps.vms['VM.Monitor']) {
- var errorText = gettext("Requires '{0}' Privileges");
+ let errorText = gettext("Requires '{0}' Privileges");
me.updateStatus(false, Ext.String.format(errorText, 'VM.Monitor'));
return;
}
@@ -144,15 +144,15 @@ Ext.define('PVE.qemu.AgentIPView', {
},
updateStatus: function(unsuccessful, defaulttext) {
- var me = this;
- var text = defaulttext || gettext('No network information');
- var more = false;
+ let me = this;
+ let text = defaulttext || gettext('No network information');
+ let more = false;
if (unsuccessful) {
text = gettext('Guest Agent not running');
} else if (me.agent && me.running) {
if (Ext.isArray(me.nics) && me.nics.length) {
more = true;
- var ips = me.getDefaultIps(me.nics);
+ let ips = me.getDefaultIps(me.nics);
if (ips.length !== 0) {
text = ips.join('<br>');
}
@@ -165,15 +165,15 @@ Ext.define('PVE.qemu.AgentIPView', {
text = gettext('No Guest Agent configured');
}
- var ipBox = me.down('#ipBox');
+ let ipBox = me.down('#ipBox');
ipBox.update(text);
- var moreBtn = me.down('#moreBtn');
+ let moreBtn = me.down('#moreBtn');
moreBtn.setVisible(more);
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.rstore) {
throw 'rstore not given';
@@ -183,8 +183,8 @@ Ext.define('PVE.qemu.AgentIPView', {
throw 'pveSelNode not given';
}
- var nodename = me.pveSelNode.data.node;
- var vmid = me.pveSelNode.data.vmid;
+ let nodename = me.pveSelNode.data.node;
+ let vmid = me.pveSelNode.data.vmid;
me.ipStore = Ext.create('Proxmox.data.UpdateStore', {
interval: 10000,
diff --git a/www/manager6/qemu/AudioEdit.js b/www/manager6/qemu/AudioEdit.js
index e7861ceb..ff85c907 100644
--- a/www/manager6/qemu/AudioEdit.js
+++ b/www/manager6/qemu/AudioEdit.js
@@ -6,7 +6,7 @@ Ext.define('PVE.qemu.AudioInputPanel', {
//onlineHelp: 'qm_audio_device',
onGetValues: function(values) {
- var ret = PVE.Parser.printPropertyString(values);
+ let ret = PVE.Parser.printPropertyString(values);
if (ret === '') {
return {
'delete': 'audio0',
@@ -51,7 +51,7 @@ Ext.define('PVE.qemu.AudioEdit', {
}],
initComponent: function() {
- var me = this;
+ let me = this;
me.callParent();
@@ -59,7 +59,7 @@ Ext.define('PVE.qemu.AudioEdit', {
success: function(response) {
me.vmconfig = response.result.data;
- var audio0 = me.vmconfig.audio0;
+ let audio0 = me.vmconfig.audio0;
if (audio0) {
me.setValues(PVE.Parser.parsePropertyString(audio0));
}
diff --git a/www/manager6/qemu/CDEdit.js b/www/manager6/qemu/CDEdit.js
index fc7a59cc..d3b76432 100644
--- a/www/manager6/qemu/CDEdit.js
+++ b/www/manager6/qemu/CDEdit.js
@@ -5,9 +5,9 @@ Ext.define('PVE.qemu.CDInputPanel', {
insideWizard: false,
onGetValues: function(values) {
- var me = this;
+ let me = this;
- var confid = me.confid || values.controller + values.deviceid;
+ let confid = me.confid || values.controller + values.deviceid;
me.drive.media = 'cdrom';
if (values.mediaType === 'iso') {
@@ -18,7 +18,7 @@ Ext.define('PVE.qemu.CDInputPanel', {
me.drive.file = 'none';
}
- var params = {};
+ let params = {};
params[confid] = PVE.Parser.printQemuDrive(me.drive);
@@ -26,7 +26,7 @@ Ext.define('PVE.qemu.CDInputPanel', {
},
setVMConfig: function(vmconfig) {
- var me = this;
+ let me = this;
if (me.bussel) {
me.bussel.setVMConfig(vmconfig, 'cdrom');
@@ -34,16 +34,16 @@ Ext.define('PVE.qemu.CDInputPanel', {
},
setDrive: function(drive) {
- var me = this;
+ let me = this;
- var values = {};
+ let values = {};
if (drive.file === 'cdrom') {
values.mediaType = 'cdrom';
} else if (drive.file === 'none') {
values.mediaType = 'none';
} else {
values.mediaType = 'iso';
- var match = drive.file.match(/^([^:]+):/);
+ let match = drive.file.match(/^([^:]+):/);
if (match) {
values.cdstorage = match[1];
values.cdimage = drive.file;
@@ -56,18 +56,18 @@ Ext.define('PVE.qemu.CDInputPanel', {
},
setNodename: function(nodename) {
- var me = this;
+ let me = this;
me.cdstoragesel.setNodename(nodename);
me.cdfilesel.setStorage(undefined, nodename);
},
initComponent: function() {
- var me = this;
+ let me = this;
me.drive = {};
- var items = [];
+ let items = [];
if (!me.confid) {
me.bussel = Ext.create('PVE.form.ControllerSelector', {
@@ -88,7 +88,7 @@ Ext.define('PVE.qemu.CDInputPanel', {
return;
}
me.down('field[name=cdstorage]').setDisabled(!value);
- var cdImageField = me.down('field[name=cdimage]');
+ let cdImageField = me.down('field[name=cdimage]');
cdImageField.setDisabled(!value);
if (value) {
cdImageField.validate();
@@ -152,16 +152,16 @@ Ext.define('PVE.qemu.CDEdit', {
width: 400,
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
me.isCreate = !me.confid;
- var ipanel = Ext.create('PVE.qemu.CDInputPanel', {
+ let ipanel = Ext.create('PVE.qemu.CDInputPanel', {
confid: me.confid,
nodename: nodename,
});
@@ -177,8 +177,8 @@ Ext.define('PVE.qemu.CDEdit', {
success: function(response, options) {
ipanel.setVMConfig(response.result.data);
if (me.confid) {
- var value = response.result.data[me.confid];
- var drive = PVE.Parser.parseQemuDrive(me.confid, value);
+ let value = response.result.data[me.confid];
+ let drive = PVE.Parser.parseQemuDrive(me.confid, value);
if (!drive) {
Ext.Msg.alert('Error', 'Unable to parse drive options');
me.close();
diff --git a/www/manager6/qemu/CIDriveEdit.js b/www/manager6/qemu/CIDriveEdit.js
index a9ca8bf1..90d8aa8b 100644
--- a/www/manager6/qemu/CIDriveEdit.js
+++ b/www/manager6/qemu/CIDriveEdit.js
@@ -7,10 +7,10 @@ Ext.define('PVE.qemu.CIDriveInputPanel', {
vmconfig: {}, // used to select usused disks
onGetValues: function(values) {
- var me = this;
+ let me = this;
- var drive = {};
- var params = {};
+ let drive = {};
+ let params = {};
drive.file = values.hdstorage + ":cloudinit";
drive.format = values.diskformat;
params[values.controller + values.deviceid] = PVE.Parser.printQemuDrive(drive);
@@ -18,18 +18,18 @@ Ext.define('PVE.qemu.CIDriveInputPanel', {
},
setNodename: function(nodename) {
- var me = this;
+ let me = this;
me.down('#hdstorage').setNodename(nodename);
me.down('#hdimage').setStorage(undefined, nodename);
},
setVMConfig: function(config) {
- var me = this;
+ let me = this;
me.down('#drive').setVMConfig(config, 'cdrom');
},
initComponent: function() {
- var me = this;
+ let me = this;
me.drive = {};
@@ -61,9 +61,9 @@ Ext.define('PVE.qemu.CIDriveEdit', {
subject: gettext('CloudInit Drive'),
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
diff --git a/www/manager6/qemu/CloudInit.js b/www/manager6/qemu/CloudInit.js
index 77ff93d4..dd283360 100644
--- a/www/manager6/qemu/CloudInit.js
+++ b/www/manager6/qemu/CloudInit.js
@@ -11,17 +11,17 @@ Ext.define('PVE.qemu.CloudInit', {
dangerous: true,
confirmMsg: function(rec) {
let view = this.up('grid');
- var warn = gettext('Are you sure you want to remove entry {0}');
+ let warn = gettext('Are you sure you want to remove entry {0}');
- var entry = rec.data.key;
- var msg = Ext.String.format(warn, "'"
+ let entry = rec.data.key;
+ let msg = Ext.String.format(warn, "'"
+ view.renderKey(entry, {}, rec) + "'");
return msg;
},
enableFn: function(record) {
let view = this.up('grid');
- var caps = Ext.state.Manager.get('GuiCap');
+ let caps = Ext.state.Manager.get('GuiCap');
if (view.rows[record.data.key].never_delete ||
!caps.vms['VM.Config.Network']) {
return false;
@@ -39,13 +39,13 @@ Ext.define('PVE.qemu.CloudInit', {
return;
}
- var id = records[0].data.key;
- var match = id.match(/^net(\d+)$/);
+ let id = records[0].data.key;
+ let match = id.match(/^net(\d+)$/);
if (match) {
id = 'ipconfig' + match[1];
}
- var params = {};
+ let params = {};
params.delete = id;
Proxmox.Utils.API2Request({
url: view.baseurl + '/config',
@@ -82,18 +82,18 @@ Ext.define('PVE.qemu.CloudInit', {
text: gettext('Regenerate Image'),
handler: function() {
let view = this.up('grid');
- var eject_params = {};
- var insert_params = {};
+ let eject_params = {};
+ let insert_params = {};
let disk = PVE.Parser.parseQemuDrive(view.ciDriveId, view.ciDrive);
- var storage = '';
- var stormatch = disk.file.match(/^([^:]+):/);
+ let storage = '';
+ let stormatch = disk.file.match(/^([^:]+):/);
if (stormatch) {
storage = stormatch[1];
}
eject_params[view.ciDriveId] = 'none,media=cdrom';
insert_params[view.ciDriveId] = storage + ':cloudinit';
- var failure = function(response, opts) {
+ let failure = function(response, opts) {
Ext.Msg.alert('Error', response.htmlStatus);
};
@@ -126,15 +126,15 @@ Ext.define('PVE.qemu.CloudInit', {
if (!success || records.length < 1) {
return;
}
- var me = this;
- var found;
+ let me = this;
+ let found;
records.forEach(function(record) {
if (found) {
return;
}
- var id = record.data.key;
- var value = record.data.value;
- var ciregex = new RegExp("vm-" + me.pveSelNode.data.vmid + "-cloudinit");
+ let id = record.data.key;
+ let value = record.data.value;
+ let ciregex = new RegExp("vm-" + me.pveSelNode.data.vmid + "-cloudinit");
if (id.match(/^(ide|scsi|sata)\d+$/) && ciregex.test(value)) {
found = id;
me.ciDriveId = found;
@@ -152,11 +152,11 @@ Ext.define('PVE.qemu.CloudInit', {
},
renderKey: function(key, metaData, rec, rowIndex, colIndex, store) {
- var me = this;
- var rows = me.rows;
- var rowdef = rows[key] || {};
+ let me = this;
+ let rows = me.rows;
+ let rowdef = rows[key] || {};
- var icon = "";
+ let icon = "";
if (rowdef.iconCls) {
icon = '<i class="' + rowdef.iconCls + '"></i> ';
}
@@ -165,28 +165,28 @@ Ext.define('PVE.qemu.CloudInit', {
listeners: {
activate: function() {
- var me = this;
+ let me = this;
me.rstore.startUpdate();
},
itemdblclick: function() {
- var me = this;
+ let me = this;
me.run_editor();
},
},
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var vmid = me.pveSelNode.data.vmid;
+ let vmid = me.pveSelNode.data.vmid;
if (!vmid) {
throw "no VM ID specified";
}
- var caps = Ext.state.Manager.get('GuiCap');
+ let caps = Ext.state.Manager.get('GuiCap');
me.baseurl = '/api2/extjs/nodes/' + nodename + '/qemu/' + vmid;
me.url = me.baseurl + '/pending';
me.editorConfig.url = me.baseurl + '/config';
@@ -260,8 +260,8 @@ Ext.define('PVE.qemu.CloudInit', {
never_delete: true,
renderer: function(value) {
value = decodeURIComponent(value);
- var keys = value.split('\n');
- var text = [];
+ let keys = value.split('\n');
+ let text = [];
keys.forEach(function(key) {
if (key.length) {
let res = PVE.Parser.parseSSHKey(key);
@@ -287,11 +287,11 @@ Ext.define('PVE.qemu.CloudInit', {
defaultValue: '',
},
};
- var i;
- var ipconfig_renderer = function(value, md, record, ri, ci, store, pending) {
- var id = record.data.key;
- var match = id.match(/^net(\d+)$/);
- var val = '';
+ let i;
+ let ipconfig_renderer = function(value, md, record, ri, ci, store, pending) {
+ let id = record.data.key;
+ let match = id.match(/^net(\d+)$/);
+ let val = '';
if (match) {
val = me.getObjectValue('ipconfig'+match[1], '', pending);
}
diff --git a/www/manager6/qemu/Config.js b/www/manager6/qemu/Config.js
index 9fe933df..20767991 100644
--- a/www/manager6/qemu/Config.js
+++ b/www/manager6/qemu/Config.js
@@ -5,33 +5,33 @@ Ext.define('PVE.qemu.Config', {
onlineHelp: 'chapter_virtual_machines',
initComponent: function() {
- var me = this;
- var vm = me.pveSelNode.data;
+ let me = this;
+ let vm = me.pveSelNode.data;
- var nodename = vm.node;
+ let nodename = vm.node;
if (!nodename) {
throw "no node name specified";
}
- var vmid = vm.vmid;
+ let vmid = vm.vmid;
if (!vmid) {
throw "no VM ID specified";
}
- var template = !!vm.template;
+ let template = !!vm.template;
- var running = !!vm.uptime;
+ let running = !!vm.uptime;
- var caps = Ext.state.Manager.get('GuiCap');
+ let caps = Ext.state.Manager.get('GuiCap');
- var base_url = '/nodes/' + nodename + "/qemu/" + vmid;
+ let base_url = '/nodes/' + nodename + "/qemu/" + vmid;
me.statusStore = Ext.create('Proxmox.data.ObjectStore', {
url: '/api2/json' + base_url + '/status/current',
interval: 1000,
});
- var vm_command = function(cmd, params) {
+ let vm_command = function(cmd, params) {
Proxmox.Utils.API2Request({
params: params,
url: base_url + '/status/' + cmd,
@@ -43,7 +43,7 @@ Ext.define('PVE.qemu.Config', {
});
};
- var resumeBtn = Ext.create('Ext.Button', {
+ let resumeBtn = Ext.create('Ext.Button', {
text: gettext('Resume'),
disabled: !caps.vms['VM.PowerMgmt'],
hidden: true,
@@ -53,7 +53,7 @@ Ext.define('PVE.qemu.Config', {
iconCls: 'fa fa-play',
});
- var startBtn = Ext.create('Ext.Button', {
+ let startBtn = Ext.create('Ext.Button', {
text: gettext('Start'),
disabled: !caps.vms['VM.PowerMgmt'] || running,
hidden: template,
@@ -63,12 +63,12 @@ Ext.define('PVE.qemu.Config', {
iconCls: 'fa fa-play',
});
- var migrateBtn = Ext.create('Ext.Button', {
+ let migrateBtn = Ext.create('Ext.Button', {
text: gettext('Migrate'),
disabled: !caps.vms['VM.Migrate'],
hidden: PVE.data.ResourceStore.getNodes().length < 2,
handler: function() {
- var win = Ext.create('PVE.window.Migrate', {
+ let win = Ext.create('PVE.window.Migrate', {
vmtype: 'qemu',
nodename: nodename,
vmid: vmid,
@@ -78,7 +78,7 @@ Ext.define('PVE.qemu.Config', {
iconCls: 'fa fa-send-o',
});
- var moreBtn = Ext.create('Proxmox.button.Button', {
+ let moreBtn = Ext.create('Proxmox.button.Button', {
text: gettext('More'),
menu: {
items: [
@@ -113,7 +113,7 @@ Ext.define('PVE.qemu.Config', {
hidden: !caps.nodes['Sys.Console'],
text: gettext('Manage HA'),
handler: function() {
- var ha = vm.hastate;
+ let ha = vm.hastate;
Ext.create('PVE.ha.VMResourceEdit', {
vmid: vmid,
isCreate: !ha || ha === 'unmanaged',
@@ -137,7 +137,7 @@ Ext.define('PVE.qemu.Config', {
},
});
- var shutdownBtn = Ext.create('PVE.button.Split', {
+ let shutdownBtn = Ext.create('PVE.button.Split', {
text: gettext('Shutdown'),
disabled: !caps.vms['VM.PowerMgmt'] || !running,
hidden: template,
@@ -196,7 +196,7 @@ Ext.define('PVE.qemu.Config', {
iconCls: 'fa fa-power-off',
});
- var consoleBtn = Ext.create('PVE.button.ConsoleButton', {
+ let consoleBtn = Ext.create('PVE.button.ConsoleButton', {
disabled: !caps.vms['VM.Console'],
hidden: template,
consoleType: 'kvm',
@@ -208,7 +208,7 @@ Ext.define('PVE.qemu.Config', {
vmid: vmid,
});
- var statusTxt = Ext.create('Ext.toolbar.TextItem', {
+ let statusTxt = Ext.create('Ext.toolbar.TextItem', {
data: {
lock: undefined,
},
@@ -375,18 +375,18 @@ Ext.define('PVE.qemu.Config', {
me.callParent();
- var prevQMPStatus = 'unknown';
+ let prevQMPStatus = 'unknown';
me.mon(me.statusStore, 'load', function(s, records, success) {
- var status;
- var qmpstatus;
- var spice = false;
- var xtermjs = false;
- var lock;
+ let status;
+ let qmpstatus;
+ let spice = false;
+ let xtermjs = false;
+ let lock;
if (!success) {
status = qmpstatus = 'unknown';
} else {
- var rec = s.data.get('status');
+ let rec = s.data.get('status');
status = rec ? rec.data.value : 'unknown';
rec = s.data.get('qmpstatus');
qmpstatus = rec ? rec.data.value : 'unknown';
@@ -403,7 +403,7 @@ Ext.define('PVE.qemu.Config', {
return;
}
- var resume = ['prelaunch', 'paused', 'suspended'].indexOf(qmpstatus) !== -1;
+ let resume = ['prelaunch', 'paused', 'suspended'].indexOf(qmpstatus) !== -1;
if (resume || lock === 'suspended') {
startBtn.setVisible(false);
diff --git a/www/manager6/qemu/CreateWizard.js b/www/manager6/qemu/CreateWizard.js
index a785a882..8232113f 100644
--- a/www/manager6/qemu/CreateWizard.js
+++ b/www/manager6/qemu/CreateWizard.js
@@ -107,7 +107,7 @@ Ext.define('PVE.qemu.CreateWizard', {
}
});
- var res = PVE.Parser.printStartup({
+ let res = PVE.Parser.printStartup({
order: values.order,
up: values.up,
down: values.down,
@@ -208,8 +208,8 @@ Ext.define('PVE.qemu.CreateWizard', {
],
listeners: {
show: function(panel) {
- var kv = this.up('window').getValues();
- var data = [];
+ let kv = this.up('window').getValues();
+ let data = [];
Ext.Object.each(kv, function(key, value) {
if (key === 'delete') { // ignore
return;
@@ -217,7 +217,7 @@ Ext.define('PVE.qemu.CreateWizard', {
data.push({ key: key, value: value });
});
- var summarystore = panel.down('grid').getStore();
+ let summarystore = panel.down('grid').getStore();
summarystore.suspendEvents();
summarystore.removeAll();
summarystore.add(data);
@@ -227,11 +227,11 @@ Ext.define('PVE.qemu.CreateWizard', {
},
},
onSubmit: function() {
- var wizard = this.up('window');
- var kv = wizard.getValues();
+ let wizard = this.up('window');
+ let kv = wizard.getValues();
delete kv.delete;
- var nodename = kv.nodename;
+ let nodename = kv.nodename;
delete kv.nodename;
Proxmox.Utils.API2Request({
diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js
index 4e4d6aac..d7ccb774 100644
--- a/www/manager6/qemu/HDEdit.js
+++ b/www/manager6/qemu/HDEdit.js
@@ -49,14 +49,14 @@ Ext.define('PVE.qemu.HDInputPanel', {
if (!this.getView().insideWizard) {
return;
}
- var vmScsiType = value ? 'virtio-scsi-single': 'virtio-scsi-pci';
+ let vmScsiType = value ? 'virtio-scsi-single': 'virtio-scsi-pci';
this.lookupReference('scsiController').setValue(vmScsiType);
},
},
},
init: function(view) {
- var vm = this.getViewModel();
+ let vm = this.getViewModel();
if (view.isCreate) {
vm.set('isIncludedInBackup', true);
}
@@ -68,10 +68,10 @@ Ext.define('PVE.qemu.HDInputPanel', {
},
onGetValues: function(values) {
- var me = this;
+ let me = this;
- var params = {};
- var confid = me.confid || values.controller + values.deviceid;
+ let params = {};
+ let confid = me.confid || values.controller + values.deviceid;
if (me.unused) {
me.drive.file = me.vmconfig[values.unusedId];
@@ -106,13 +106,13 @@ Ext.define('PVE.qemu.HDInputPanel', {
},
updateVMConfig: function(vmconfig) {
- var me = this;
+ let me = this;
me.vmconfig = vmconfig;
me.bussel?.updateVMConfig(vmconfig);
},
setVMConfig: function(vmconfig) {
- var me = this;
+ let me = this;
me.vmconfig = vmconfig;
@@ -121,7 +121,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
me.scsiController.setValue(vmconfig.scsihw);
}
if (me.unusedDisks) {
- var disklist = [];
+ let disklist = [];
Ext.Object.each(vmconfig, function(key, value) {
if (key.match(/^unused\d+$/)) {
disklist.push([key, value]);
@@ -133,12 +133,12 @@ Ext.define('PVE.qemu.HDInputPanel', {
},
setDrive: function(drive) {
- var me = this;
+ let me = this;
me.drive = drive;
- var values = {};
- var match = drive.file.match(/^([^:]+):/);
+ let values = {};
+ let match = drive.file.match(/^([^:]+):/);
if (match) {
values.hdstorage = match[1];
}
@@ -167,7 +167,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
},
setNodename: function(nodename) {
- var me = this;
+ let me = this;
me.down('#hdstorage').setNodename(nodename);
me.down('#hdimage').setStorage(undefined, nodename);
},
@@ -175,7 +175,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
hasAdvanced: true,
initComponent: function() {
- var me = this;
+ let me = this;
me.drive = {};
@@ -448,18 +448,18 @@ Ext.define('PVE.qemu.HDEdit', {
bodyPadding: 0,
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var unused = me.confid && me.confid.match(/^unused\d+$/);
+ let unused = me.confid && me.confid.match(/^unused\d+$/);
me.isCreate = me.confid ? unused : true;
- var ipanel = Ext.create('PVE.qemu.HDInputPanel', {
+ let ipanel = Ext.create('PVE.qemu.HDInputPanel', {
confid: me.confid,
nodename: nodename,
unused: unused,
@@ -484,8 +484,8 @@ Ext.define('PVE.qemu.HDEdit', {
success: function(response, options) {
ipanel.setVMConfig(response.result.data);
if (me.confid) {
- var value = response.result.data[me.confid];
- var drive = PVE.Parser.parseQemuDrive(me.confid, value);
+ let value = response.result.data[me.confid];
+ let drive = PVE.Parser.parseQemuDrive(me.confid, value);
if (!drive) {
Ext.Msg.alert(gettext('Error'), 'Unable to parse drive options');
me.close();
diff --git a/www/manager6/qemu/HDEfi.js b/www/manager6/qemu/HDEfi.js
index a8ca8f56..c331bb32 100644
--- a/www/manager6/qemu/HDEfi.js
+++ b/www/manager6/qemu/HDEfi.js
@@ -9,13 +9,13 @@ Ext.define('PVE.qemu.EFIDiskInputPanel', {
vmconfig: {}, // used to select usused disks
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.disabled) {
return {};
}
- var confid = 'efidisk0';
+ let confid = 'efidisk0';
if (values.hdimage) {
me.drive.file = values.hdimage;
@@ -37,7 +37,7 @@ Ext.define('PVE.qemu.EFIDiskInputPanel', {
},
setNodename: function(nodename) {
- var me = this;
+ let me = this;
me.down('#hdstorage').setNodename(nodename);
me.down('#hdimage').setStorage(undefined, nodename);
},
@@ -50,7 +50,7 @@ Ext.define('PVE.qemu.EFIDiskInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.drive = {};
@@ -96,9 +96,9 @@ Ext.define('PVE.qemu.EFIDiskEdit', {
width: 450,
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
diff --git a/www/manager6/qemu/HDResize.js b/www/manager6/qemu/HDResize.js
index f9c7290d..b11aea31 100644
--- a/www/manager6/qemu/HDResize.js
+++ b/www/manager6/qemu/HDResize.js
@@ -4,8 +4,8 @@ Ext.define('PVE.window.HDResize', {
resizable: false,
resize_disk: function(disk, size) {
- var me = this;
- var params = { disk: disk, size: '+' + size + 'G' };
+ let me = this;
+ let params = { disk: disk, size: '+' + size + 'G' };
Proxmox.Utils.API2Request({
params: params,
@@ -22,7 +22,7 @@ Ext.define('PVE.window.HDResize', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no node name specified";
@@ -32,7 +32,7 @@ Ext.define('PVE.window.HDResize', {
throw "no VM ID specified";
}
- var items = [
+ let items = [
{
xtype: 'displayfield',
name: 'disk',
@@ -65,16 +65,16 @@ Ext.define('PVE.window.HDResize', {
items: items,
});
- var form = me.formPanel.getForm();
+ let form = me.formPanel.getForm();
- var submitBtn;
+ let submitBtn;
me.title = gettext('Resize disk');
submitBtn = Ext.create('Ext.Button', {
text: gettext('Resize disk'),
handler: function() {
if (form.isValid()) {
- var values = form.getValues();
+ let values = form.getValues();
me.resize_disk(me.disk, values.size);
}
},
diff --git a/www/manager6/qemu/HDTPM.js b/www/manager6/qemu/HDTPM.js
index 87349aed..3c6034e4 100644
--- a/www/manager6/qemu/HDTPM.js
+++ b/www/manager6/qemu/HDTPM.js
@@ -6,13 +6,13 @@ Ext.define('PVE.qemu.TPMDiskInputPanel', {
vmconfig: {},
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.disabled) {
return {};
}
- var confid = 'tpmstate0';
+ let confid = 'tpmstate0';
if (values.hdimage) {
me.drive.file = values.hdimage;
@@ -22,13 +22,13 @@ Ext.define('PVE.qemu.TPMDiskInputPanel', {
}
me.drive.version = values.version;
- var params = {};
+ let params = {};
params[confid] = PVE.Parser.printQemuDrive(me.drive);
return params;
},
setNodename: function(nodename) {
- var me = this;
+ let me = this;
me.down('#hdstorage').setNodename(nodename);
me.down('#hdimage').setStorage(undefined, nodename);
},
@@ -41,7 +41,7 @@ Ext.define('PVE.qemu.TPMDiskInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.drive = {};
@@ -82,9 +82,9 @@ Ext.define('PVE.qemu.TPMDiskEdit', {
width: 450,
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
index 6e9d03b4..5180f0aa 100644
--- a/www/manager6/qemu/HardwareView.js
+++ b/www/manager6/qemu/HardwareView.js
@@ -5,17 +5,17 @@ Ext.define('PVE.qemu.HardwareView', {
onlineHelp: 'qm_virtual_machines_settings',
renderKey: function(key, metaData, rec, rowIndex, colIndex, store) {
- var me = this;
- var rows = me.rows;
- var rowdef = rows[key] || {};
- var iconCls = rowdef.iconCls;
- var icon = '';
- var txt = rowdef.header || key;
+ let me = this;
+ let rows = me.rows;
+ let rowdef = rows[key] || {};
+ let iconCls = rowdef.iconCls;
+ let icon = '';
+ let txt = rowdef.header || key;
metaData.tdAttr = "valign=middle";
if (rowdef.isOnStorageBus) {
- var value = me.getObjectValue(key, '', false);
+ let value = me.getObjectValue(key, '', false);
if (value === '') {
value = me.getObjectValue(key, '', true);
}
@@ -44,7 +44,7 @@ Ext.define('PVE.qemu.HardwareView', {
},
initComponent: function() {
- var me = this;
+ let me = this;
const { node: nodename, vmid } = me.pveSelNode.data;
if (!nodename) {
@@ -69,11 +69,11 @@ Ext.define('PVE.qemu.HardwareView', {
group: 2,
multiKey: ['memory', 'balloon', 'shares'],
renderer: function(value, metaData, record, ri, ci, store, pending) {
- var res = '';
+ let res = '';
- var max = me.getObjectValue('memory', 512, pending);
- var balloon = me.getObjectValue('balloon', undefined, pending);
- var shares = me.getObjectValue('shares', undefined, pending);
+ let max = me.getObjectValue('memory', 512, pending);
+ let balloon = me.getObjectValue('balloon', undefined, pending);
+ let shares = me.getObjectValue('shares', undefined, pending);
res = Proxmox.Utils.format_size(max*1024*1024);
@@ -99,13 +99,13 @@ Ext.define('PVE.qemu.HardwareView', {
defaultValue: '1',
multiKey: ['sockets', 'cpu', 'cores', 'numa', 'vcpus', 'cpulimit', 'cpuunits'],
renderer: function(value, metaData, record, rowIndex, colIndex, store, pending) {
- var sockets = me.getObjectValue('sockets', 1, pending);
- var model = me.getObjectValue('cpu', undefined, pending);
- var cores = me.getObjectValue('cores', 1, pending);
- var numa = me.getObjectValue('numa', undefined, pending);
- var vcpus = me.getObjectValue('vcpus', undefined, pending);
- var cpulimit = me.getObjectValue('cpulimit', undefined, pending);
- var cpuunits = me.getObjectValue('cpuunits', undefined, pending);
+ let sockets = me.getObjectValue('sockets', 1, pending);
+ let model = me.getObjectValue('cpu', undefined, pending);
+ let cores = me.getObjectValue('cores', 1, pending);
+ let numa = me.getObjectValue('numa', undefined, pending);
+ let vcpus = me.getObjectValue('vcpus', undefined, pending);
+ let cpulimit = me.getObjectValue('cpulimit', undefined, pending);
+ let cpuunits = me.getObjectValue('cpuunits', undefined, pending);
let res = Ext.String.format(
'{0} ({1} sockets, {2} cores)', sockets * cores, sockets, cores);
@@ -304,13 +304,13 @@ Ext.define('PVE.qemu.HardwareView', {
header: gettext("VirtIO RNG"),
};
- var sorterFn = function(rec1, rec2) {
- var v1 = rec1.data.key;
- var v2 = rec2.data.key;
- var g1 = rows[v1].group || 0;
- var g2 = rows[v2].group || 0;
- var order1 = rows[v1].order || 0;
- var order2 = rows[v2].order || 0;
+ let sorterFn = function(rec1, rec2) {
+ let v1 = rec1.data.key;
+ let v2 = rec2.data.key;
+ let g1 = rows[v1].group || 0;
+ let g2 = rows[v2].group || 0;
+ let order1 = rows[v1].order || 0;
+ let order2 = rows[v2].order || 0;
if (g1 - g2 !== 0) {
return g1 - g2;
@@ -506,14 +506,14 @@ Ext.define('PVE.qemu.HardwareView', {
render: function(btn) {
// hack: calculate the max button width on first display to prevent the whole
// toolbar to move when we switch between the "Remove" and "Detach" labels
- var def = btn.getSize().width;
+ let def = btn.getSize().width;
btn.setText(btn.altText);
- var alt = btn.getSize().width;
+ let alt = btn.getSize().width;
btn.setText(btn.defaultText);
- var optimal = alt > def ? alt : def;
+ let optimal = alt > def ? alt : def;
btn.setSize({ width: optimal });
},
},
diff --git a/www/manager6/qemu/IPConfigEdit.js b/www/manager6/qemu/IPConfigEdit.js
index 829240c2..b42f5816 100644
--- a/www/manager6/qemu/IPConfigEdit.js
+++ b/www/manager6/qemu/IPConfigEdit.js
@@ -7,7 +7,7 @@ Ext.define('PVE.qemu.IPConfigPanel', {
vmconfig: {},
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (values.ipv4mode !== 'static') {
values.ip = values.ipv4mode;
@@ -17,9 +17,9 @@ Ext.define('PVE.qemu.IPConfigPanel', {
values.ip6 = values.ipv6mode;
}
- var params = {};
+ let params = {};
- var cfg = PVE.Parser.printIPConfig(values);
+ let cfg = PVE.Parser.printIPConfig(values);
if (cfg === '') {
params.delete = [me.confid];
} else {
@@ -29,12 +29,12 @@ Ext.define('PVE.qemu.IPConfigPanel', {
},
setVMConfig: function(config) {
- var me = this;
+ let me = this;
me.vmconfig = config;
},
setIPConfig: function(confid, data) {
- var me = this;
+ let me = this;
me.confid = confid;
@@ -56,7 +56,7 @@ Ext.define('PVE.qemu.IPConfigPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.ipconfig = {};
@@ -196,23 +196,23 @@ Ext.define('PVE.qemu.IPConfigEdit', {
isAdd: true,
initComponent: function() {
- var me = this;
+ let me = this;
// convert confid from netX to ipconfigX
- var match = me.confid.match(/^net(\d+)$/);
+ let match = me.confid.match(/^net(\d+)$/);
if (match) {
me.netid = me.confid;
me.confid = 'ipconfig' + match[1];
}
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
me.isCreate = !me.confid;
- var ipanel = Ext.create('PVE.qemu.IPConfigPanel', {
+ let ipanel = Ext.create('PVE.qemu.IPConfigPanel', {
confid: me.confid,
netid: me.netid,
nodename: nodename,
@@ -228,8 +228,8 @@ Ext.define('PVE.qemu.IPConfigEdit', {
me.load({
success: function(response, options) {
me.vmconfig = response.result.data;
- var ipconfig = {};
- var value = me.vmconfig[me.confid];
+ let ipconfig = {};
+ let value = me.vmconfig[me.confid];
if (value) {
ipconfig = PVE.Parser.parseIPConfig(me.confid, value);
if (!ipconfig) {
diff --git a/www/manager6/qemu/KeyboardEdit.js b/www/manager6/qemu/KeyboardEdit.js
index da7b56c0..461f3c0b 100644
--- a/www/manager6/qemu/KeyboardEdit.js
+++ b/www/manager6/qemu/KeyboardEdit.js
@@ -2,7 +2,7 @@ Ext.define('PVE.qemu.KeyboardEdit', {
extend: 'Proxmox.window.Edit',
initComponent: function() {
- var me = this;
+ let me = this;
Ext.applyIf(me, {
subject: gettext('Keyboard Layout'),
diff --git a/www/manager6/qemu/MemoryEdit.js b/www/manager6/qemu/MemoryEdit.js
index 5e91dc9b..4723f3a1 100644
--- a/www/manager6/qemu/MemoryEdit.js
+++ b/www/manager6/qemu/MemoryEdit.js
@@ -32,9 +32,9 @@ Ext.define('PVE.qemu.MemoryInputPanel', {
},
onGetValues: function(values) {
- var me = this;
+ let me = this;
- var res = {};
+ let res = {};
res.memory = values.memory;
res.balloon = values.balloon;
@@ -55,8 +55,8 @@ Ext.define('PVE.qemu.MemoryInputPanel', {
},
initComponent: function() {
- var me = this;
- var labelWidth = 160;
+ let me = this;
+ let labelWidth = 160;
me.items= [
{
@@ -70,8 +70,8 @@ Ext.define('PVE.qemu.MemoryInputPanel', {
hotplug: me.hotplug,
listeners: {
change: function(f, value, old) {
- var bf = me.down('field[name=balloon]');
- var balloon = bf.getValue();
+ let bf = me.down('field[name=balloon]');
+ let balloon = bf.getValue();
bf.setMaxValue(value);
if (balloon === old) {
bf.setValue(value);
@@ -96,8 +96,8 @@ Ext.define('PVE.qemu.MemoryInputPanel', {
allowBlank: false,
listeners: {
change: function(f, value) {
- var memory = me.down('field[name=memory]').getValue();
- var shares = me.down('field[name=shares]');
+ let memory = me.down('field[name=memory]').getValue();
+ let shares = me.down('field[name=shares]');
shares.setDisabled(value === memory);
},
},
@@ -124,9 +124,9 @@ Ext.define('PVE.qemu.MemoryInputPanel', {
fieldLabel: gettext('Ballooning Device'),
listeners: {
change: function(f, value) {
- var bf = me.down('field[name=balloon]');
- var shares = me.down('field[name=shares]');
- var memory = me.down('field[name=memory]');
+ let bf = me.down('field[name=balloon]');
+ let shares = me.down('field[name=shares]');
+ let memory = me.down('field[name=memory]');
bf.setDisabled(!value);
shares.setDisabled(!value || bf.getValue() === memory.getValue());
},
@@ -149,9 +149,9 @@ Ext.define('PVE.qemu.MemoryEdit', {
extend: 'Proxmox.window.Edit',
initComponent: function() {
- var me = this;
+ let me = this;
- var memoryhotplug;
+ let memoryhotplug;
if (me.hotplug) {
Ext.each(me.hotplug.split(','), function(el) {
if (el === 'memory') {
@@ -160,7 +160,7 @@ Ext.define('PVE.qemu.MemoryEdit', {
});
}
- var ipanel = Ext.create('PVE.qemu.MemoryInputPanel', {
+ let ipanel = Ext.create('PVE.qemu.MemoryInputPanel', {
hotplug: memoryhotplug,
});
@@ -176,9 +176,9 @@ Ext.define('PVE.qemu.MemoryEdit', {
me.load({
success: function(response, options) {
- var data = response.result.data;
+ let data = response.result.data;
- var values = {
+ let values = {
ballooning: data.balloon === 0 ? '0' : '1',
shares: data.shares,
memory: data.memory || '512',
diff --git a/www/manager6/qemu/Monitor.js b/www/manager6/qemu/Monitor.js
index d85018e6..889550fb 100644
--- a/www/manager6/qemu/Monitor.js
+++ b/www/manager6/qemu/Monitor.js
@@ -6,23 +6,23 @@ Ext.define('PVE.qemu.Monitor', {
maxLines: 500,
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var vmid = me.pveSelNode.data.vmid;
+ let vmid = me.pveSelNode.data.vmid;
if (!vmid) {
throw "no VM ID specified";
}
- var history = [];
- var histNum = -1;
- var lines = [];
+ let history = [];
+ let histNum = -1;
+ let lines = [];
- var textbox = Ext.createWidget('panel', {
+ let textbox = Ext.createWidget('panel', {
region: 'center',
xtype: 'panel',
autoScroll: true,
@@ -31,11 +31,11 @@ Ext.define('PVE.qemu.Monitor', {
bodyStyle: 'font-family: monospace;',
});
- var scrollToEnd = function() {
- var el = textbox.getTargetEl();
- var dom = Ext.getDom(el);
+ let scrollToEnd = function() {
+ let el = textbox.getTargetEl();
+ let dom = Ext.getDom(el);
- var clientHeight = dom.clientHeight;
+ let clientHeight = dom.clientHeight;
// BrowserBug: clientHeight reports 0 in IE9 StrictMode
// Instead we are using offsetHeight and hardcoding borders
if (Ext.isIE9 && Ext.isStrict) {
@@ -44,19 +44,19 @@ Ext.define('PVE.qemu.Monitor', {
dom.scrollTop = dom.scrollHeight - clientHeight;
};
- var refresh = function() {
+ let refresh = function() {
textbox.update('<pre>' + lines.join('\n') + '</pre>');
scrollToEnd();
};
- var addLine = function(line) {
+ let addLine = function(line) {
lines.push(line);
if (lines.length > me.maxLines) {
lines.shift();
}
};
- var executeCmd = function(cmd) {
+ let executeCmd = function(cmd) {
addLine("# " + Ext.htmlEncode(cmd));
if (cmd) {
history.unshift(cmd);
@@ -73,7 +73,7 @@ Ext.define('PVE.qemu.Monitor', {
method: 'POST',
waitMsgTarget: me,
success: function(response, opts) {
- var res = response.result.data;
+ let res = response.result.data;
Ext.Array.each(res.split('\n'), function(line) {
addLine(Ext.htmlEncode(line));
});
@@ -106,13 +106,14 @@ Ext.define('PVE.qemu.Monitor', {
refresh();
},
specialkey: function(f, e) {
- var key = e.getKey();
+ let key = e.getKey();
switch (key) {
- case e.ENTER:
- var cmd = f.getValue();
+ case e.ENTER: {
+ let cmd = f.getValue();
f.setValue('');
executeCmd(cmd);
break;
+ }
case e.PAGE_UP:
textbox.scrollBy(0, -0.9*textbox.getHeight(), false);
break;
@@ -140,7 +141,7 @@ Ext.define('PVE.qemu.Monitor', {
],
listeners: {
show: function() {
- var field = me.query('textfield[name="cmd"]')[0];
+ let field = me.query('textfield[name="cmd"]')[0];
field.focus(false, true);
},
},
diff --git a/www/manager6/qemu/NetworkEdit.js b/www/manager6/qemu/NetworkEdit.js
index b39cffdc..54224a75 100644
--- a/www/manager6/qemu/NetworkEdit.js
+++ b/www/manager6/qemu/NetworkEdit.js
@@ -6,7 +6,7 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
insideWizard: false,
onGetValues: function(values) {
- var me = this;
+ let me = this;
me.network.model = values.model;
if (values.nonetwork) {
@@ -26,7 +26,7 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
delete me.network.rate;
}
- var params = {};
+ let params = {};
params[me.confid] = PVE.Parser.printQemuNetwork(me.network);
@@ -34,7 +34,7 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
},
setNetwork: function(confid, data) {
- var me = this;
+ let me = this;
me.confid = confid;
@@ -50,13 +50,13 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
},
setNodename: function(nodename) {
- var me = this;
+ let me = this;
me.bridgesel.setNodename(nodename);
},
initComponent: function() {
- var me = this;
+ let me = this;
me.network = {};
me.confid = 'net0';
@@ -103,7 +103,7 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
boxLabel: gettext('No network device'),
listeners: {
change: function(cb, value) {
- var fields = [
+ let fields = [
'disconnect',
'bridge',
'tag',
@@ -173,16 +173,16 @@ Ext.define('PVE.qemu.NetworkEdit', {
isAdd: true,
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
me.isCreate = !me.confid;
- var ipanel = Ext.create('PVE.qemu.NetworkInputPanel', {
+ let ipanel = Ext.create('PVE.qemu.NetworkInputPanel', {
confid: me.confid,
nodename: nodename,
isCreate: me.isCreate,
@@ -197,11 +197,11 @@ Ext.define('PVE.qemu.NetworkEdit', {
me.load({
success: function(response, options) {
- var i, confid;
+ let i, confid;
me.vmconfig = response.result.data;
if (!me.isCreate) {
- var value = me.vmconfig[me.confid];
- var network = PVE.Parser.parseQemuNetwork(me.confid, value);
+ let value = me.vmconfig[me.confid];
+ let network = PVE.Parser.parseQemuNetwork(me.confid, value);
if (!network) {
Ext.Msg.alert(gettext('Error'), 'Unable to parse network options');
me.close();
diff --git a/www/manager6/qemu/OSDefaults.js b/www/manager6/qemu/OSDefaults.js
index eed9eebc..6411c9d0 100644
--- a/www/manager6/qemu/OSDefaults.js
+++ b/www/manager6/qemu/OSDefaults.js
@@ -25,7 +25,7 @@ Ext.define('PVE.qemu.OSDefaults', {
let addOS = function(settings) {
if (Object.prototype.hasOwnProperty.call(settings, 'parent')) {
- var child = Ext.clone(me[settings.parent]);
+ let child = Ext.clone(me[settings.parent]);
me[settings.pveOS] = Ext.apply(child, settings);
} else {
throw "Could not find your genitor";
diff --git a/www/manager6/qemu/OSTypeEdit.js b/www/manager6/qemu/OSTypeEdit.js
index d9a0988e..36637af1 100644
--- a/www/manager6/qemu/OSTypeEdit.js
+++ b/www/manager6/qemu/OSTypeEdit.js
@@ -19,22 +19,22 @@ Ext.define('PVE.qemu.OSTypeInputPanel', {
this.lookup('ostype').getStore().setData(PVE.Utils.kvm_ostypes[value]);
},
onOSTypeChange: function(field) {
- var me = this, ostype = field.getValue();
+ let me = this, ostype = field.getValue();
if (!me.getView().insideWizard) {
return;
}
- var targetValues = PVE.qemu.OSDefaults.getDefaults(ostype);
+ let targetValues = PVE.qemu.OSDefaults.getDefaults(ostype);
me.setWidget('pveBusSelector', targetValues.busType);
me.setWidget('pveNetworkCardSelector', targetValues.networkCard);
- var scsihw = targetValues.scsihw || '__default__';
+ let scsihw = targetValues.scsihw || '__default__';
this.getViewModel().set('current.scsihw', scsihw);
this.getViewModel().set('current.ostype', ostype);
},
setWidget: function(widget, newValue) {
// changing a widget is safe only if ComponentQuery.query returns us
// a single value array
- var widgets = Ext.ComponentQuery.query('pveQemuCreateWizard ' + widget);
+ let widgets = Ext.ComponentQuery.query('pveQemuCreateWizard ' + widget);
if (widgets.length === 1) {
widgets[0].setValue(newValue);
} else {
@@ -44,7 +44,7 @@ Ext.define('PVE.qemu.OSTypeInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.items = [
{
@@ -78,8 +78,8 @@ Ext.define('PVE.qemu.OSTypeInputPanel', {
data: PVE.Utils.kvm_ostypes.Linux,
listeners: {
datachanged: function(store) {
- var ostype = me.lookup('ostype');
- var old_val = ostype.getValue();
+ let ostype = me.lookup('ostype');
+ let old_val = ostype.getValue();
if (!me.insideWizard && old_val && store.find('val', old_val) !== -1) {
ostype.setValue(old_val);
} else {
@@ -103,14 +103,14 @@ Ext.define('PVE.qemu.OSTypeEdit', {
items: [{ xtype: 'pveQemuOSTypePanel' }],
initComponent: function() {
- var me = this;
+ let me = this;
me.callParent();
me.load({
success: function(response, options) {
- var value = response.result.data.ostype || 'other';
- var osinfo = PVE.Utils.get_kvm_osinfo(value);
+ let value = response.result.data.ostype || 'other';
+ let osinfo = PVE.Utils.get_kvm_osinfo(value);
me.setValues({ ostype: value, osbase: osinfo.base });
},
});
diff --git a/www/manager6/qemu/Options.js b/www/manager6/qemu/Options.js
index a1def4bb..edc5f8c4 100644
--- a/www/manager6/qemu/Options.js
+++ b/www/manager6/qemu/Options.js
@@ -5,21 +5,21 @@ Ext.define('PVE.qemu.Options', {
onlineHelp: 'qm_options',
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var vmid = me.pveSelNode.data.vmid;
+ let vmid = me.pveSelNode.data.vmid;
if (!vmid) {
throw "no VM ID specified";
}
- var caps = Ext.state.Manager.get('GuiCap');
+ let caps = Ext.state.Manager.get('GuiCap');
- var rows = {
+ let rows = {
name: {
required: true,
defaultValue: me.pveSelNode.data.name,
@@ -38,7 +38,7 @@ Ext.define('PVE.qemu.Options', {
allowBlank: true,
},
onGetValues: function(values) {
- var params = values;
+ let params = values;
if (values.name === undefined ||
values.name === null ||
values.name === '') {
@@ -109,14 +109,14 @@ Ext.define('PVE.qemu.Options', {
// legacy style and fallback
let i;
- var text = '';
- var bootdisk = me.getObjectValue('bootdisk', undefined, pending);
+ let text = '';
+ let bootdisk = me.getObjectValue('bootdisk', undefined, pending);
order = boot.legacy || 'cdn';
for (i = 0; i < order.length; i++) {
if (text) {
text += ', ';
}
- var sel = order.substring(i, i + 1);
+ let sel = order.substring(i, i + 1);
if (sel === 'c') {
if (bootdisk) {
text += bootdisk;
@@ -343,28 +343,28 @@ Ext.define('PVE.qemu.Options', {
},
};
- var baseurl = 'nodes/' + nodename + '/qemu/' + vmid + '/config';
+ let baseurl = 'nodes/' + nodename + '/qemu/' + vmid + '/config';
- var edit_btn = new Ext.Button({
+ let edit_btn = new Ext.Button({
text: gettext('Edit'),
disabled: true,
handler: function() { me.run_editor(); },
});
- var revert_btn = new PVE.button.PendingRevert();
+ let revert_btn = new PVE.button.PendingRevert();
- var set_button_status = function() {
- var sm = me.getSelectionModel();
- var rec = sm.getSelection()[0];
+ let set_button_status = function() {
+ let sm = me.getSelectionModel();
+ let rec = sm.getSelection()[0];
if (!rec) {
edit_btn.disable();
return;
}
- var key = rec.data.key;
- var pending = rec.data.delete || me.hasPendingChanges(key);
- var rowdef = rows[key];
+ let key = rec.data.key;
+ let pending = rec.data.delete || me.hasPendingChanges(key);
+ let rowdef = rows[key];
edit_btn.setDisabled(!rowdef.editor);
revert_btn.setDisabled(!pending);
diff --git a/www/manager6/qemu/PCIEdit.js b/www/manager6/qemu/PCIEdit.js
index 2f67aece..5dab88c5 100644
--- a/www/manager6/qemu/PCIEdit.js
+++ b/www/manager6/qemu/PCIEdit.js
@@ -4,12 +4,12 @@ Ext.define('PVE.qemu.PCIInputPanel', {
onlineHelp: 'qm_pci_passthrough_vm_config',
setVMConfig: function(vmconfig) {
- var me = this;
+ let me = this;
me.vmconfig = vmconfig;
- var hostpci = me.vmconfig[me.confid] || '';
+ let hostpci = me.vmconfig[me.confid] || '';
- var values = PVE.Parser.parsePropertyString(hostpci, 'host');
+ let values = PVE.Parser.parsePropertyString(hostpci, 'host');
if (values.host) {
if (!values.host.match(/^[0-9a-f]{4}:/i)) { // add optional domain
values.host = "0000:" + values.host;
@@ -27,7 +27,7 @@ Ext.define('PVE.qemu.PCIInputPanel', {
me.setValues(values);
if (!me.vmconfig.machine || me.vmconfig.machine.indexOf('q35') === -1) {
// machine is not set to some variant of q35, so we disable pcie
- var pcie = me.down('field[name=pcie]');
+ let pcie = me.down('field[name=pcie]');
pcie.setDisabled(true);
pcie.setBoxLabel(gettext('Q35 only'));
}
diff --git a/www/manager6/qemu/ProcessorEdit.js b/www/manager6/qemu/ProcessorEdit.js
index 1bed2877..476ea218 100644
--- a/www/manager6/qemu/ProcessorEdit.js
+++ b/www/manager6/qemu/ProcessorEdit.js
@@ -21,7 +21,7 @@ Ext.define('PVE.qemu.ProcessorInputPanel', {
},
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (Array.isArray(values.delete)) {
values.delete = values.delete.join(',');
@@ -41,10 +41,10 @@ Ext.define('PVE.qemu.ProcessorInputPanel', {
delete values.cputype;
delete values.flags;
- var cpustring = PVE.Parser.printQemuCpu(me.cpu);
+ let cpustring = PVE.Parser.printQemuCpu(me.cpu);
// remove cputype delete request:
- var del = values.delete;
+ let del = values.delete;
delete values.delete;
if (del) {
del = del.split(',');
@@ -59,7 +59,7 @@ Ext.define('PVE.qemu.ProcessorInputPanel', {
del.push('cpu');
}
- var delarr = del.join(',');
+ let delarr = del.join(',');
if (delarr) {
values.delete = delarr;
}
@@ -219,9 +219,9 @@ Ext.define('PVE.qemu.ProcessorEdit', {
width: 700,
initComponent: function() {
- var me = this;
+ let me = this;
- var ipanel = Ext.create('PVE.qemu.ProcessorInputPanel');
+ let ipanel = Ext.create('PVE.qemu.ProcessorInputPanel');
Ext.apply(me, {
subject: gettext('Processors'),
@@ -232,10 +232,10 @@ Ext.define('PVE.qemu.ProcessorEdit', {
me.load({
success: function(response, options) {
- var data = response.result.data;
- var value = data.cpu;
+ let data = response.result.data;
+ let value = data.cpu;
if (value) {
- var cpu = PVE.Parser.parseQemuCpu(value);
+ let cpu = PVE.Parser.parseQemuCpu(value);
ipanel.cpu = cpu;
data.cputype = cpu.cputype;
if (cpu.flags) {
diff --git a/www/manager6/qemu/RNGEdit.js b/www/manager6/qemu/RNGEdit.js
index e34e2c08..05045dd6 100644
--- a/www/manager6/qemu/RNGEdit.js
+++ b/www/manager6/qemu/RNGEdit.js
@@ -11,7 +11,7 @@ Ext.define('PVE.qemu.RNGInputPanel', {
delete values.max_bytes;
}
- var ret = PVE.Parser.printPropertyString(values);
+ let ret = PVE.Parser.printPropertyString(values);
return {
rng0: ret,
@@ -103,7 +103,7 @@ Ext.define('PVE.qemu.RNGEdit', {
}],
initComponent: function() {
- var me = this;
+ let me = this;
me.callParent();
@@ -112,7 +112,7 @@ Ext.define('PVE.qemu.RNGEdit', {
success: function(response) {
me.vmconfig = response.result.data;
- var rng0 = me.vmconfig.rng0;
+ let rng0 = me.vmconfig.rng0;
if (rng0) {
me.setValues(PVE.Parser.parsePropertyString(rng0));
}
diff --git a/www/manager6/qemu/SSHKey.js b/www/manager6/qemu/SSHKey.js
index f38e5fab..58621d2a 100644
--- a/www/manager6/qemu/SSHKey.js
+++ b/www/manager6/qemu/SSHKey.js
@@ -5,7 +5,7 @@ Ext.define('PVE.qemu.SSHKeyInputPanel', {
insideWizard: false,
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (values.sshkeys) {
values.sshkeys.trim();
}
@@ -39,7 +39,7 @@ Ext.define('PVE.qemu.SSHKeyInputPanel', {
Ext.Array.each(e.target.files, function(file) {
PVE.Utils.loadSSHKeyFromFile(file, function(res) {
let keysField = view.down('#sshkeys');
- var old = keysField.getValue();
+ let old = keysField.getValue();
keysField.setValue(old + res);
});
});
@@ -50,7 +50,7 @@ Ext.define('PVE.qemu.SSHKeyInputPanel', {
],
initComponent: function() {
- var me = this;
+ let me = this;
me.callParent();
if (!window.FileReader) {
@@ -65,9 +65,9 @@ Ext.define('PVE.qemu.SSHKeyEdit', {
width: 800,
initComponent: function() {
- var me = this;
+ let me = this;
- var ipanel = Ext.create('PVE.qemu.SSHKeyInputPanel');
+ let ipanel = Ext.create('PVE.qemu.SSHKeyInputPanel');
Ext.apply(me, {
subject: gettext('SSH Keys'),
@@ -79,7 +79,7 @@ Ext.define('PVE.qemu.SSHKeyEdit', {
if (!me.create) {
me.load({
success: function(response, options) {
- var data = response.result.data;
+ let data = response.result.data;
if (data.sshkeys) {
data.sshkeys = decodeURIComponent(data.sshkeys);
ipanel.setValues(data);
diff --git a/www/manager6/qemu/ScsiHwEdit.js b/www/manager6/qemu/ScsiHwEdit.js
index 70f09c17..09e24dcf 100644
--- a/www/manager6/qemu/ScsiHwEdit.js
+++ b/www/manager6/qemu/ScsiHwEdit.js
@@ -2,7 +2,7 @@ Ext.define('PVE.qemu.ScsiHwEdit', {
extend: 'Proxmox.window.Edit',
initComponent: function() {
- var me = this;
+ let me = this;
Ext.applyIf(me, {
subject: gettext('SCSI Controller Type'),
diff --git a/www/manager6/qemu/SerialEdit.js b/www/manager6/qemu/SerialEdit.js
index 6ce18ec2..e4f09186 100644
--- a/www/manager6/qemu/SerialEdit.js
+++ b/www/manager6/qemu/SerialEdit.js
@@ -4,11 +4,11 @@ Ext.define('PVE.qemu.SerialnputPanel', {
autoComplete: false,
setVMConfig: function(vmconfig) {
- var me = this, i;
+ let me = this, i;
me.vmconfig = vmconfig;
for (i = 0; i < 4; i++) {
- var port = 'serial' + i.toString();
+ let port = 'serial' + i.toString();
if (!me.vmconfig[port]) {
me.down('field[name=serialid]').setValue(i);
break;
@@ -17,9 +17,9 @@ Ext.define('PVE.qemu.SerialnputPanel', {
},
onGetValues: function(values) {
- var me = this;
+ let me = this;
- var id = 'serial' + values.serialid;
+ let id = 'serial' + values.serialid;
delete values.serialid;
values[id] = 'socket';
return values;
@@ -57,12 +57,12 @@ Ext.define('PVE.qemu.SerialEdit', {
subject: gettext('Serial Port'),
initComponent: function() {
- var me = this;
+ let me = this;
// for now create of (socket) serial port only
me.isCreate = true;
- var ipanel = Ext.create('PVE.qemu.SerialnputPanel', {});
+ let ipanel = Ext.create('PVE.qemu.SerialnputPanel', {});
Ext.apply(me, {
items: [ipanel],
diff --git a/www/manager6/qemu/Smbios1Edit.js b/www/manager6/qemu/Smbios1Edit.js
index fc159125..529497fc 100644
--- a/www/manager6/qemu/Smbios1Edit.js
+++ b/www/manager6/qemu/Smbios1Edit.js
@@ -7,9 +7,9 @@ Ext.define('PVE.qemu.Smbios1InputPanel', {
smbios1: {},
onGetValues: function(values) {
- var me = this;
+ let me = this;
- var params = {
+ let params = {
smbios1: PVE.Parser.printQemuSmbios1(values),
};
@@ -17,7 +17,7 @@ Ext.define('PVE.qemu.Smbios1InputPanel', {
},
setSmbios1: function(data) {
- var me = this;
+ let me = this;
me.smbios1 = data;
@@ -92,9 +92,9 @@ Ext.define('PVE.qemu.Smbios1Edit', {
extend: 'Proxmox.window.Edit',
initComponent: function() {
- var me = this;
+ let me = this;
- var ipanel = Ext.create('PVE.qemu.Smbios1InputPanel', {});
+ let ipanel = Ext.create('PVE.qemu.Smbios1InputPanel', {});
Ext.applyIf(me, {
subject: gettext('SMBIOS settings (type1)'),
@@ -107,9 +107,9 @@ Ext.define('PVE.qemu.Smbios1Edit', {
me.load({
success: function(response, options) {
me.vmconfig = response.result.data;
- var value = me.vmconfig.smbios1;
+ let value = me.vmconfig.smbios1;
if (value) {
- var data = PVE.Parser.parseQemuSmbios1(value);
+ let data = PVE.Parser.parseQemuSmbios1(value);
if (!data) {
Ext.Msg.alert(gettext('Error'), 'Unable to parse smbios options');
me.close();
diff --git a/www/manager6/qemu/SystemEdit.js b/www/manager6/qemu/SystemEdit.js
index 592c88ee..c86685aa 100644
--- a/www/manager6/qemu/SystemEdit.js
+++ b/www/manager6/qemu/SystemEdit.js
@@ -36,14 +36,14 @@ Ext.define('PVE.qemu.SystemInputPanel', {
xclass: 'Ext.app.ViewController',
scsihwChange: function(field, value) {
- var me = this;
+ let me = this;
if (me.getView().insideWizard) {
me.getViewModel().set('current.scsihw', value);
}
},
biosChange: function(field, value) {
- var me = this;
+ let me = this;
if (me.getView().insideWizard) {
me.getViewModel().set('efi', value === 'ovmf');
}
diff --git a/www/manager6/qemu/USBEdit.js b/www/manager6/qemu/USBEdit.js
index a2204584..ddf8d0d2 100644
--- a/www/manager6/qemu/USBEdit.js
+++ b/www/manager6/qemu/USBEdit.js
@@ -10,12 +10,12 @@ Ext.define('PVE.qemu.USBInputPanel', {
},
setVMConfig: function(vmconfig) {
- var me = this;
+ let me = this;
me.vmconfig = vmconfig;
},
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (!me.confid) {
for (let i = 0; i < 6; i++) {
let id = 'usb' + i.toString();
@@ -25,8 +25,8 @@ Ext.define('PVE.qemu.USBInputPanel', {
}
}
}
- var val = "";
- var type = me.down('radiofield').getGroupValue();
+ let val = "";
+ let type = me.down('radiofield').getGroupValue();
switch (type) {
case 'spice':
val = 'spice';
@@ -122,11 +122,11 @@ Ext.define('PVE.qemu.USBEdit', {
subject: gettext('USB Device'),
initComponent: function() {
- var me = this;
+ let me = this;
me.isCreate = !me.confid;
- var ipanel = Ext.create('PVE.qemu.USBInputPanel', {
+ let ipanel = Ext.create('PVE.qemu.USBInputPanel', {
confid: me.confid,
pveSelNode: me.pveSelNode,
});
@@ -144,9 +144,9 @@ Ext.define('PVE.qemu.USBEdit', {
return;
}
- var data = response.result.data[me.confid].split(',');
- var port, hostdevice, usb3 = false;
- var type = 'spice';
+ let data = response.result.data[me.confid].split(',');
+ let port, hostdevice, usb3 = false;
+ let type = 'spice';
for (let i = 0; i < data.length; i++) {
if (/^(host=)?(0x)?[a-zA-Z0-9]{4}:(0x)?[a-zA-Z0-9]{4}$/.test(data[i])) {
@@ -163,7 +163,7 @@ Ext.define('PVE.qemu.USBEdit', {
usb3 = true;
}
}
- var values = {
+ let values = {
usb: type,
hostdevice: hostdevice,
port: port,
diff --git a/www/manager6/sdn/Browser.js b/www/manager6/sdn/Browser.js
index bb30cbe0..008931a2 100644
--- a/www/manager6/sdn/Browser.js
+++ b/www/manager6/sdn/Browser.js
@@ -5,21 +5,21 @@ Ext.define('PVE.sdn.Browser', {
onlineHelp: 'chapter_pvesdn',
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var sdnid = me.pveSelNode.data.sdn;
+ let sdnid = me.pveSelNode.data.sdn;
if (!sdnid) {
throw "no sdn ID specified";
}
me.items = [];
- var caps = Ext.state.Manager.get('GuiCap');
+ let caps = Ext.state.Manager.get('GuiCap');
Ext.apply(me, {
title: Ext.String.format(gettext("Zone {0} on node {1}"),
diff --git a/www/manager6/sdn/ControllerView.js b/www/manager6/sdn/ControllerView.js
index aff3fb8d..8b46be6e 100644
--- a/www/manager6/sdn/ControllerView.js
+++ b/www/manager6/sdn/ControllerView.js
@@ -8,7 +8,7 @@ Ext.define('PVE.sdn.ControllerView', {
stateId: 'grid-sdn-controller',
createSDNControllerEditWindow: function(type, sid) {
- var schema = PVE.Utils.sdncontrollerSchema[type];
+ let schema = PVE.Utils.sdncontrollerSchema[type];
if (!schema || !schema.ipanel) {
throw "no editor registered for controller type: " + type;
}
@@ -25,9 +25,9 @@ Ext.define('PVE.sdn.ControllerView', {
},
initComponent: function() {
- var me = this;
+ let me = this;
- var store = new Ext.data.Store({
+ let store = new Ext.data.Store({
model: 'pve-sdn-controller',
proxy: {
type: 'proxmox',
diff --git a/www/manager6/sdn/Status.js b/www/manager6/sdn/Status.js
index 0fdcfda0..005d3043 100644
--- a/www/manager6/sdn/Status.js
+++ b/www/manager6/sdn/Status.js
@@ -10,7 +10,7 @@ Ext.define('PVE.sdn.Status', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.rstore = Ext.create('Proxmox.data.ObjectStore', {
interval: me.interval,
diff --git a/www/manager6/sdn/StatusView.js b/www/manager6/sdn/StatusView.js
index 970aa919..fa83b0ae 100644
--- a/www/manager6/sdn/StatusView.js
+++ b/www/manager6/sdn/StatusView.js
@@ -9,7 +9,7 @@ Ext.define('PVE.sdn.StatusView', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.rstore) {
throw "no rstore given";
@@ -17,13 +17,13 @@ Ext.define('PVE.sdn.StatusView', {
Proxmox.Utils.monStoreErrors(me, me.rstore);
- var store = Ext.create('Proxmox.data.DiffStore', {
+ let store = Ext.create('Proxmox.data.DiffStore', {
rstore: me.rstore,
sortAfterUpdate: true,
sorters: [{
sorterFn: function(rec1, rec2) {
- var p1 = me.sortPriority[rec1.data.type];
- var p2 = me.sortPriority[rec2.data.type];
+ let p1 = me.sortPriority[rec1.data.type];
+ let p2 = me.sortPriority[rec2.data.type];
return p1 !== p2 ? p1 > p2 ? 1 : -1 : 0;
},
}],
diff --git a/www/manager6/sdn/SubnetEdit.js b/www/manager6/sdn/SubnetEdit.js
index 154de8ef..57ce91f8 100644
--- a/www/manager6/sdn/SubnetEdit.js
+++ b/www/manager6/sdn/SubnetEdit.js
@@ -68,7 +68,7 @@ Ext.define('PVE.sdn.SubnetEdit', {
base_url: undefined,
initComponent: function() {
- var me = this;
+ let me = this;
me.isCreate = me.subnet === undefined;
diff --git a/www/manager6/sdn/SubnetView.js b/www/manager6/sdn/SubnetView.js
index 4a8b0754..309d6495 100644
--- a/www/manager6/sdn/SubnetView.js
+++ b/www/manager6/sdn/SubnetView.js
@@ -79,7 +79,7 @@ Ext.define('PVE.sdn.SubnetView', {
});
let set_button_status = function() {
- var rec = me.selModel.getSelection()[0];
+ let rec = me.selModel.getSelection()[0];
if (!rec || rec.data.state === 'deleted') {
edit_btn.disable();
diff --git a/www/manager6/sdn/VnetEdit.js b/www/manager6/sdn/VnetEdit.js
index 0f55595f..067c4ebd 100644
--- a/www/manager6/sdn/VnetEdit.js
+++ b/www/manager6/sdn/VnetEdit.js
@@ -69,7 +69,7 @@ Ext.define('PVE.sdn.VnetEdit', {
width: 350,
initComponent: function() {
- var me = this;
+ let me = this;
me.isCreate = me.vnet === undefined;
diff --git a/www/manager6/sdn/VnetPanel.js b/www/manager6/sdn/VnetPanel.js
index 48c09693..8cf77e89 100644
--- a/www/manager6/sdn/VnetPanel.js
+++ b/www/manager6/sdn/VnetPanel.js
@@ -7,15 +7,15 @@ Ext.define('PVE.sdn.Vnet', {
onlineHelp: 'pvesdn_config_vnet',
initComponent: function() {
- var me = this;
+ let me = this;
- var subnetview_panel = Ext.createWidget('pveSDNSubnetView', {
+ let subnetview_panel = Ext.createWidget('pveSDNSubnetView', {
title: gettext('Subnets'),
region: 'center',
border: false,
});
- var vnetview_panel = Ext.createWidget('pveSDNVnetView', {
+ let vnetview_panel = Ext.createWidget('pveSDNVnetView', {
title: 'Vnets',
region: 'west',
subnetview_panel: subnetview_panel,
diff --git a/www/manager6/sdn/VnetView.js b/www/manager6/sdn/VnetView.js
index 3fd3c916..d1d91b5e 100644
--- a/www/manager6/sdn/VnetView.js
+++ b/www/manager6/sdn/VnetView.js
@@ -53,7 +53,7 @@ Ext.define('PVE.sdn.VnetView', {
});
let set_button_status = function() {
- var rec = me.selModel.getSelection()[0];
+ let rec = me.selModel.getSelection()[0];
if (!rec || rec.data.state === 'deleted') {
edit_btn.disable();
diff --git a/www/manager6/sdn/ZoneContentView.js b/www/manager6/sdn/ZoneContentView.js
index 1ea65450..db737828 100644
--- a/www/manager6/sdn/ZoneContentView.js
+++ b/www/manager6/sdn/ZoneContentView.js
@@ -15,20 +15,20 @@ Ext.define('PVE.sdn.ZoneContentView', {
},
],
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var zone = me.pveSelNode.data.sdn;
+ let zone = me.pveSelNode.data.sdn;
if (!zone) {
throw "no zone ID specified";
}
- var baseurl = "/nodes/" + nodename + "/sdn/zones/" + zone + "/content";
- var store = Ext.create('Ext.data.Store', {
+ let baseurl = "/nodes/" + nodename + "/sdn/zones/" + zone + "/content";
+ let store = Ext.create('Ext.data.Store', {
model: 'pve-sdnzone-content',
groupField: 'content',
proxy: {
@@ -41,9 +41,9 @@ Ext.define('PVE.sdn.ZoneContentView', {
},
});
- var sm = Ext.create('Ext.selection.RowModel', {});
+ let sm = Ext.create('Ext.selection.RowModel', {});
- var reload = function() {
+ let reload = function() {
store.load();
};
diff --git a/www/manager6/sdn/ZoneView.js b/www/manager6/sdn/ZoneView.js
index 71890dd3..f1834c16 100644
--- a/www/manager6/sdn/ZoneView.js
+++ b/www/manager6/sdn/ZoneView.js
@@ -70,7 +70,7 @@ Ext.define('PVE.sdn.ZoneView', {
});
let set_button_status = function() {
- var rec = me.selModel.getSelection()[0];
+ let rec = me.selModel.getSelection()[0];
if (!rec || rec.data.state === 'deleted') {
edit_btn.disable();
diff --git a/www/manager6/sdn/controllers/Base.js b/www/manager6/sdn/controllers/Base.js
index fd8bd9a0..fdc77afc 100644
--- a/www/manager6/sdn/controllers/Base.js
+++ b/www/manager6/sdn/controllers/Base.js
@@ -4,7 +4,7 @@ Ext.define('PVE.panel.SDNControllerBase', {
type: '',
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.isCreate) {
values.type = me.type;
@@ -20,7 +20,7 @@ Ext.define('PVE.sdn.controllers.BaseEdit', {
extend: 'Proxmox.window.Edit',
initComponent: function() {
- var me = this;
+ let me = this;
me.isCreate = !me.controllerid;
@@ -32,7 +32,7 @@ Ext.define('PVE.sdn.controllers.BaseEdit', {
me.method = 'PUT';
}
- var ipanel = Ext.create(me.paneltype, {
+ let ipanel = Ext.create(me.paneltype, {
type: me.type,
isCreate: me.isCreate,
controllerid: me.controllerid,
@@ -49,8 +49,8 @@ Ext.define('PVE.sdn.controllers.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/sdn/controllers/BgpEdit.js b/www/manager6/sdn/controllers/BgpEdit.js
index ce5ef93d..c9839bc4 100644
--- a/www/manager6/sdn/controllers/BgpEdit.js
+++ b/www/manager6/sdn/controllers/BgpEdit.js
@@ -4,7 +4,7 @@ Ext.define('PVE.sdn.controllers.BgpInputPanel', {
onlineHelp: 'pvesdn_controller_plugin_evpn',
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.isCreate) {
values.type = me.type;
@@ -17,7 +17,7 @@ Ext.define('PVE.sdn.controllers.BgpInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.items = [
{
diff --git a/www/manager6/sdn/controllers/EvpnEdit.js b/www/manager6/sdn/controllers/EvpnEdit.js
index d04b3e54..347ede20 100644
--- a/www/manager6/sdn/controllers/EvpnEdit.js
+++ b/www/manager6/sdn/controllers/EvpnEdit.js
@@ -4,7 +4,7 @@ Ext.define('PVE.sdn.controllers.EvpnInputPanel', {
onlineHelp: 'pvesdn_controller_plugin_evpn',
initComponent: function() {
- var me = this;
+ let me = this;
me.items = [
{
diff --git a/www/manager6/sdn/dns/Base.js b/www/manager6/sdn/dns/Base.js
index 6ce97b0c..5ba20e8d 100644
--- a/www/manager6/sdn/dns/Base.js
+++ b/www/manager6/sdn/dns/Base.js
@@ -4,7 +4,7 @@ Ext.define('PVE.panel.SDNDnsBase', {
type: '',
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.isCreate) {
values.type = me.type;
@@ -16,7 +16,7 @@ Ext.define('PVE.panel.SDNDnsBase', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.callParent();
},
@@ -26,7 +26,7 @@ Ext.define('PVE.sdn.dns.BaseEdit', {
extend: 'Proxmox.window.Edit',
initComponent: function() {
- var me = this;
+ let me = this;
me.isCreate = !me.dns;
@@ -38,7 +38,7 @@ Ext.define('PVE.sdn.dns.BaseEdit', {
me.method = 'PUT';
}
- var ipanel = Ext.create(me.paneltype, {
+ let ipanel = Ext.create(me.paneltype, {
type: me.type,
isCreate: me.isCreate,
dns: me.dns,
@@ -55,8 +55,8 @@ Ext.define('PVE.sdn.dns.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/sdn/dns/PowerdnsEdit.js b/www/manager6/sdn/dns/PowerdnsEdit.js
index f35b89af..9e167fe9 100644
--- a/www/manager6/sdn/dns/PowerdnsEdit.js
+++ b/www/manager6/sdn/dns/PowerdnsEdit.js
@@ -4,7 +4,7 @@ Ext.define('PVE.sdn.dns.PowerdnsInputPanel', {
onlineHelp: 'pvesdn_dns_plugin_powerdns',
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.isCreate) {
values.type = me.type;
@@ -16,7 +16,7 @@ Ext.define('PVE.sdn.dns.PowerdnsInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.items = [
{
diff --git a/www/manager6/sdn/ipams/Base.js b/www/manager6/sdn/ipams/Base.js
index 2fb82fbf..6ea7df99 100644
--- a/www/manager6/sdn/ipams/Base.js
+++ b/www/manager6/sdn/ipams/Base.js
@@ -4,7 +4,7 @@ Ext.define('PVE.panel.SDNIpamBase', {
type: '',
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.isCreate) {
values.type = me.type;
@@ -16,7 +16,7 @@ Ext.define('PVE.panel.SDNIpamBase', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.callParent();
},
@@ -26,7 +26,7 @@ Ext.define('PVE.sdn.ipams.BaseEdit', {
extend: 'Proxmox.window.Edit',
initComponent: function() {
- var me = this;
+ let me = this;
me.isCreate = !me.ipam;
@@ -38,7 +38,7 @@ Ext.define('PVE.sdn.ipams.BaseEdit', {
me.method = 'PUT';
}
- var ipanel = Ext.create(me.paneltype, {
+ let ipanel = Ext.create(me.paneltype, {
type: me.type,
isCreate: me.isCreate,
ipam: me.ipam,
@@ -55,8 +55,8 @@ Ext.define('PVE.sdn.ipams.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/sdn/ipams/NetboxEdit.js b/www/manager6/sdn/ipams/NetboxEdit.js
index 2133b48c..4627cd36 100644
--- a/www/manager6/sdn/ipams/NetboxEdit.js
+++ b/www/manager6/sdn/ipams/NetboxEdit.js
@@ -4,7 +4,7 @@ Ext.define('PVE.sdn.ipams.NetboxInputPanel', {
onlineHelp: 'pvesdn_ipam_plugin_netbox',
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.isCreate) {
values.type = me.type;
@@ -16,7 +16,7 @@ Ext.define('PVE.sdn.ipams.NetboxInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.items = [
{
diff --git a/www/manager6/sdn/ipams/PVEIpamEdit.js b/www/manager6/sdn/ipams/PVEIpamEdit.js
index 783bbdb9..b45edd65 100644
--- a/www/manager6/sdn/ipams/PVEIpamEdit.js
+++ b/www/manager6/sdn/ipams/PVEIpamEdit.js
@@ -4,7 +4,7 @@ Ext.define('PVE.sdn.ipams.PVEIpamInputPanel', {
onlineHelp: 'pvesdn_ipam_plugin_pveipam',
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.isCreate) {
values.type = me.type;
@@ -16,7 +16,7 @@ Ext.define('PVE.sdn.ipams.PVEIpamInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.items = [
{
diff --git a/www/manager6/sdn/ipams/PhpIpamEdit.js b/www/manager6/sdn/ipams/PhpIpamEdit.js
index 8726e0c8..1182aa4f 100644
--- a/www/manager6/sdn/ipams/PhpIpamEdit.js
+++ b/www/manager6/sdn/ipams/PhpIpamEdit.js
@@ -4,7 +4,7 @@ Ext.define('PVE.sdn.ipams.PhpIpamInputPanel', {
onlineHelp: 'pvesdn_ipam_plugin_phpipam',
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.isCreate) {
values.type = me.type;
@@ -16,7 +16,7 @@ Ext.define('PVE.sdn.ipams.PhpIpamInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.items = [
{
diff --git a/www/manager6/sdn/zones/Base.js b/www/manager6/sdn/zones/Base.js
index 347889c0..c670fd33 100644
--- a/www/manager6/sdn/zones/Base.js
+++ b/www/manager6/sdn/zones/Base.js
@@ -4,7 +4,7 @@ Ext.define('PVE.panel.SDNZoneBase', {
type: '',
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.isCreate) {
values.type = me.type;
@@ -16,7 +16,7 @@ Ext.define('PVE.panel.SDNZoneBase', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.advancedItems = [
{
@@ -59,7 +59,7 @@ Ext.define('PVE.sdn.zones.BaseEdit', {
width: 400,
initComponent: function() {
- var me = this;
+ let me = this;
me.isCreate = !me.zone;
@@ -71,7 +71,7 @@ Ext.define('PVE.sdn.zones.BaseEdit', {
me.method = 'PUT';
}
- var ipanel = Ext.create(me.paneltype, {
+ let ipanel = Ext.create(me.paneltype, {
type: me.type,
isCreate: me.isCreate,
zone: me.zone,
@@ -88,8 +88,8 @@ Ext.define('PVE.sdn.zones.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/sdn/zones/EvpnEdit.js b/www/manager6/sdn/zones/EvpnEdit.js
index f1314ad5..aefbe84b 100644
--- a/www/manager6/sdn/zones/EvpnEdit.js
+++ b/www/manager6/sdn/zones/EvpnEdit.js
@@ -4,7 +4,7 @@ Ext.define('PVE.sdn.zones.EvpnInputPanel', {
onlineHelp: 'pvesdn_zone_plugin_evpn',
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.isCreate) {
values.type = me.type;
@@ -36,7 +36,7 @@ Ext.define('PVE.sdn.zones.EvpnInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.items = [
{
diff --git a/www/manager6/sdn/zones/SimpleEdit.js b/www/manager6/sdn/zones/SimpleEdit.js
index 56df7952..1385616f 100644
--- a/www/manager6/sdn/zones/SimpleEdit.js
+++ b/www/manager6/sdn/zones/SimpleEdit.js
@@ -4,7 +4,7 @@ Ext.define('PVE.sdn.zones.SimpleInputPanel', {
onlineHelp: 'pvesdn_zone_plugin_simple',
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.isCreate) {
values.type = me.type;
@@ -16,7 +16,7 @@ Ext.define('PVE.sdn.zones.SimpleInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.items = [
{
diff --git a/www/manager6/sdn/zones/VlanEdit.js b/www/manager6/sdn/zones/VlanEdit.js
index 93d2bede..fac122ad 100644
--- a/www/manager6/sdn/zones/VlanEdit.js
+++ b/www/manager6/sdn/zones/VlanEdit.js
@@ -4,7 +4,7 @@ Ext.define('PVE.sdn.zones.VlanInputPanel', {
onlineHelp: 'pvesdn_zone_plugin_vlan',
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.isCreate) {
values.type = me.type;
@@ -16,7 +16,7 @@ Ext.define('PVE.sdn.zones.VlanInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.items = [
{
diff --git a/www/manager6/sdn/zones/VxlanEdit.js b/www/manager6/sdn/zones/VxlanEdit.js
index 41cc7e68..03556496 100644
--- a/www/manager6/sdn/zones/VxlanEdit.js
+++ b/www/manager6/sdn/zones/VxlanEdit.js
@@ -4,7 +4,7 @@ Ext.define('PVE.sdn.zones.VxlanInputPanel', {
onlineHelp: 'pvesdn_zone_plugin_vxlan',
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.isCreate) {
values.type = me.type;
@@ -18,7 +18,7 @@ Ext.define('PVE.sdn.zones.VxlanInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.items = [
{
diff --git a/www/manager6/storage/BackupView.js b/www/manager6/storage/BackupView.js
index 2328c0fc..95c971fc 100644
--- a/www/manager6/storage/BackupView.js
+++ b/www/manager6/storage/BackupView.js
@@ -6,23 +6,23 @@ Ext.define('PVE.storage.BackupView', {
showColumns: ['name', 'notes', 'protected', 'date', 'format', 'size'],
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.nodename = me.pveSelNode.data.node;
+ let nodename = me.nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var storage = me.storage = me.pveSelNode.data.storage;
+ let storage = me.storage = me.pveSelNode.data.storage;
if (!storage) {
throw "no storage ID specified";
}
me.content = 'backup';
- var sm = me.sm = Ext.create('Ext.selection.RowModel', {});
+ let sm = me.sm = Ext.create('Ext.selection.RowModel', {});
- var reload = function() {
+ let reload = function() {
me.store.load();
};
@@ -85,7 +85,7 @@ Ext.define('PVE.storage.BackupView', {
selModel: sm,
disabled: true,
handler: function(b, e, rec) {
- var vmtype;
+ let vmtype;
if (PVE.Utils.volume_is_qemu_backup(rec.data.volid, rec.data.format)) {
vmtype = 'qemu';
} else if (PVE.Utils.volume_is_lxc_backup(rec.data.volid, rec.data.format)) {
@@ -94,7 +94,7 @@ Ext.define('PVE.storage.BackupView', {
return;
}
- var win = Ext.create('PVE.window.Restore', {
+ let win = Ext.create('PVE.window.Restore', {
nodename: nodename,
volid: rec.data.volid,
volidText: PVE.Utils.render_storage_content(rec.data.volid, {}, rec),
@@ -134,7 +134,7 @@ Ext.define('PVE.storage.BackupView', {
disabled: true,
selModel: sm,
handler: function(b, e, rec) {
- var win = Ext.create('PVE.window.BackupConfig', {
+ let win = Ext.create('PVE.window.BackupConfig', {
volume: rec.data.volid,
pveSelNode: me.pveSelNode,
});
diff --git a/www/manager6/storage/Browser.js b/www/manager6/storage/Browser.js
index 1916ff6a..35343eda 100644
--- a/www/manager6/storage/Browser.js
+++ b/www/manager6/storage/Browser.js
@@ -5,14 +5,14 @@ Ext.define('PVE.storage.Browser', {
onlineHelp: 'chapter_storage',
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var storeid = me.pveSelNode.data.storage;
+ let storeid = me.pveSelNode.data.storage;
if (!storeid) {
throw "no storage ID specified";
}
@@ -27,7 +27,7 @@ Ext.define('PVE.storage.Browser', {
},
];
- var caps = Ext.state.Manager.get('GuiCap');
+ let caps = Ext.state.Manager.get('GuiCap');
Ext.apply(me, {
title: Ext.String.format(
diff --git a/www/manager6/storage/CIFSEdit.js b/www/manager6/storage/CIFSEdit.js
index 71415401..5c172bd1 100644
--- a/www/manager6/storage/CIFSEdit.js
+++ b/www/manager6/storage/CIFSEdit.js
@@ -14,13 +14,13 @@ Ext.define('PVE.storage.CIFSScan', {
doRawQuery: Ext.emptyFn,
onTriggerClick: function() {
- var me = this;
+ let me = this;
if (!me.queryCaching || me.lastQuery !== me.cifsServer) {
me.store.removeAll();
}
- var params = {};
+ let params = {};
if (me.cifsUsername) {
params.username = me.cifsUsername;
}
@@ -73,7 +73,7 @@ Ext.define('PVE.storage.CIFSScan', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
me.nodename = 'localhost';
@@ -134,7 +134,7 @@ Ext.define('PVE.storage.CIFSInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.column1 = [
{
@@ -146,7 +146,7 @@ Ext.define('PVE.storage.CIFSInputPanel', {
listeners: {
change: function(f, value) {
if (me.isCreate) {
- var exportField = me.down('field[name=share]');
+ let exportField = me.down('field[name=share]');
exportField.setServer(value);
}
},
@@ -163,7 +163,7 @@ Ext.define('PVE.storage.CIFSInputPanel', {
if (!me.isCreate) {
return;
}
- var exportField = me.down('field[name=share]');
+ let exportField = me.down('field[name=share]');
exportField.setUsername(value);
},
},
diff --git a/www/manager6/storage/CephFSEdit.js b/www/manager6/storage/CephFSEdit.js
index 6a95a00a..b9a11437 100644
--- a/www/manager6/storage/CephFSEdit.js
+++ b/www/manager6/storage/CephFSEdit.js
@@ -18,7 +18,7 @@ Ext.define('PVE.storage.CephFSInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
me.nodename = 'localhost';
diff --git a/www/manager6/storage/ContentView.js b/www/manager6/storage/ContentView.js
index 2761b48e..0bb07db1 100644
--- a/www/manager6/storage/ContentView.js
+++ b/www/manager6/storage/ContentView.js
@@ -8,7 +8,7 @@ Ext.define('PVE.storage.ContentView', {
loadMask: false,
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
me.nodename = me.pveSelNode.data.node;
@@ -26,7 +26,7 @@ Ext.define('PVE.storage.ContentView', {
}
const storage = me.storage;
- var content = me.content;
+ let content = me.content;
if (!content) {
throw "no content type specified";
}
diff --git a/www/manager6/storage/DirEdit.js b/www/manager6/storage/DirEdit.js
index 7e9ec44d..8d60af5f 100644
--- a/www/manager6/storage/DirEdit.js
+++ b/www/manager6/storage/DirEdit.js
@@ -4,7 +4,7 @@ Ext.define('PVE.storage.DirInputPanel', {
onlineHelp: 'storage_directory',
initComponent: function() {
- var me = this;
+ let me = this;
me.column1 = [
{
diff --git a/www/manager6/storage/GlusterFsEdit.js b/www/manager6/storage/GlusterFsEdit.js
index 8155d9c2..86eb4c90 100644
--- a/www/manager6/storage/GlusterFsEdit.js
+++ b/www/manager6/storage/GlusterFsEdit.js
@@ -16,7 +16,7 @@ Ext.define('PVE.storage.GlusterFsScan', {
},
onTriggerClick: function() {
- var me = this;
+ let me = this;
if (!me.queryCaching || me.lastQuery !== me.glusterServer) {
me.store.removeAll();
@@ -28,19 +28,19 @@ Ext.define('PVE.storage.GlusterFsScan', {
},
setServer: function(server) {
- var me = this;
+ let me = this;
me.glusterServer = server;
},
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: ['volname'],
proxy: {
type: 'proxmox',
@@ -64,7 +64,7 @@ Ext.define('PVE.storage.GlusterFsInputPanel', {
onlineHelp: 'storage_glusterfs',
initComponent: function() {
- var me = this;
+ let me = this;
me.column1 = [
{
@@ -76,7 +76,7 @@ Ext.define('PVE.storage.GlusterFsInputPanel', {
listeners: {
change: function(f, value) {
if (me.isCreate) {
- var volumeField = me.down('field[name=volume]');
+ let volumeField = me.down('field[name=volume]');
volumeField.setServer(value);
volumeField.setValue('');
}
diff --git a/www/manager6/storage/ImageView.js b/www/manager6/storage/ImageView.js
index 69517b5e..e38fd8b8 100644
--- a/www/manager6/storage/ImageView.js
+++ b/www/manager6/storage/ImageView.js
@@ -4,14 +4,14 @@ Ext.define('PVE.storage.ImageView', {
alias: 'widget.pveStorageImageView',
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.nodename = me.pveSelNode.data.node;
+ let nodename = me.nodename = me.pveSelNode.data.node;
if (!me.nodename) {
throw "no node name specified";
}
- var storage = me.storage = me.pveSelNode.data.storage;
+ let storage = me.storage = me.pveSelNode.data.storage;
if (!me.storage) {
throw "no storage ID specified";
}
@@ -20,9 +20,9 @@ Ext.define('PVE.storage.ImageView', {
throw "content needs to be either 'images' or 'rootdir'";
}
- var sm = me.sm = Ext.create('Ext.selection.RowModel', {});
+ let sm = me.sm = Ext.create('Ext.selection.RowModel', {});
- var reload = function() {
+ let reload = function() {
me.store.load();
};
@@ -34,17 +34,17 @@ Ext.define('PVE.storage.ImageView', {
disabled: true,
handler: function(btn, event, rec) {
let url = `/nodes/${nodename}/storage/${storage}/content/${rec.data.volid}`;
- var vmid = rec.data.vmid;
+ let vmid = rec.data.vmid;
- var store = PVE.data.ResourceStore;
+ let store = PVE.data.ResourceStore;
if (vmid && store.findVMID(vmid)) {
- var guest_node = store.guestNode(vmid);
- var storage_path = 'storage/' + nodename + '/' + storage;
+ let guest_node = store.guestNode(vmid);
+ let storage_path = 'storage/' + nodename + '/' + storage;
// allow to delete local backed images if a VMID exists on another node.
if (store.storageIsShared(storage_path) || guest_node === nodename) {
- var msg = Ext.String.format(
+ let msg = Ext.String.format(
gettext("Cannot remove image, a guest with VMID '{0}' exists!"), vmid);
msg += '<br />' + gettext("You can delete the image from the guest's hardware pane");
@@ -56,7 +56,7 @@ Ext.define('PVE.storage.ImageView', {
return;
}
}
- var win = Ext.create('Proxmox.window.SafeDestroy', {
+ let win = Ext.create('Proxmox.window.SafeDestroy', {
title: Ext.String.format(gettext("Destroy '{0}'"), rec.data.volid),
showProgress: true,
url: url,
diff --git a/www/manager6/storage/NFSEdit.js b/www/manager6/storage/NFSEdit.js
index 202c7de0..85fe7dcf 100644
--- a/www/manager6/storage/NFSEdit.js
+++ b/www/manager6/storage/NFSEdit.js
@@ -16,7 +16,7 @@ Ext.define('PVE.storage.NFSScan', {
},
onTriggerClick: function() {
- var me = this;
+ let me = this;
if (!me.queryCaching || me.lastQuery !== me.nfsServer) {
me.store.removeAll();
@@ -28,19 +28,19 @@ Ext.define('PVE.storage.NFSScan', {
},
setServer: function(server) {
- var me = this;
+ let me = this;
me.nfsServer = server;
},
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: ['path', 'options'],
proxy: {
type: 'proxmox',
@@ -66,12 +66,12 @@ Ext.define('PVE.storage.NFSInputPanel', {
options: [],
onGetValues: function(values) {
- var me = this;
+ let me = this;
- var i;
- var res = [];
+ let i;
+ let res = [];
for (i = 0; i < me.options.length; i++) {
- var item = me.options[i];
+ let item = me.options[i];
if (!item.match(/^vers=(.*)$/)) {
res.push(item);
}
@@ -92,11 +92,11 @@ Ext.define('PVE.storage.NFSInputPanel', {
},
setValues: function(values) {
- var me = this;
+ let me = this;
if (values.options) {
me.options = values.options.split(',');
me.options.forEach(function(item) {
- var match = item.match(/^vers=(.*)$/);
+ let match = item.match(/^vers=(.*)$/);
if (match) {
values.nfsversion = match[1];
}
@@ -106,7 +106,7 @@ Ext.define('PVE.storage.NFSInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.column1 = [
@@ -119,7 +119,7 @@ Ext.define('PVE.storage.NFSInputPanel', {
listeners: {
change: function(f, value) {
if (me.isCreate) {
- var exportField = me.down('field[name=export]');
+ let exportField = me.down('field[name=export]');
exportField.setServer(value);
exportField.setValue('');
}
diff --git a/www/manager6/storage/PBSEdit.js b/www/manager6/storage/PBSEdit.js
index d880308c..76981eda 100644
--- a/www/manager6/storage/PBSEdit.js
+++ b/www/manager6/storage/PBSEdit.js
@@ -469,7 +469,7 @@ Ext.define('PVE.storage.PBSInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.column1 = [
{
diff --git a/www/manager6/storage/RBDEdit.js b/www/manager6/storage/RBDEdit.js
index 15fc1304..0d7c0124 100644
--- a/www/manager6/storage/RBDEdit.js
+++ b/www/manager6/storage/RBDEdit.js
@@ -45,23 +45,23 @@ Ext.define('PVE.storage.Ceph.Controller', {
if (field && !newVal && oldVal) {
return;
}
- var view = this.getView();
- var vm = this.getViewModel();
+ let view = this.getView();
+ let vm = this.getViewModel();
if (!(view.isCreate || vm.get('pveceph'))) {
return; // only query on create or if editing a pveceph store
}
- var monhostField = this.lookupReference('monhost');
+ let monhostField = this.lookupReference('monhost');
Proxmox.Utils.API2Request({
url: '/api2/json/nodes/localhost/ceph/mon',
method: 'GET',
scope: this,
callback: function(options, success, response) {
- var data = response.result.data;
+ let data = response.result.data;
if (response.status === 200) {
if (data.length > 0) {
- var monhost = Ext.Array.pluck(data, 'name').sort().join(',');
+ let monhost = Ext.Array.pluck(data, 'name').sort().join(',');
monhostField.setValue(monhost);
monhostField.resetOriginalValue();
if (view.isCreate) {
@@ -102,7 +102,7 @@ Ext.define('PVE.storage.RBDInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
me.nodename = 'localhost';
diff --git a/www/manager6/storage/Summary.js b/www/manager6/storage/Summary.js
index bc61139d..131e9dc7 100644
--- a/www/manager6/storage/Summary.js
+++ b/www/manager6/storage/Summary.js
@@ -17,24 +17,24 @@ Ext.define('PVE.storage.Summary', {
columnWidth: 1,
},
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var storage = me.pveSelNode.data.storage;
+ let storage = me.pveSelNode.data.storage;
if (!storage) {
throw "no storage ID specified";
}
- var rstore = Ext.create('Proxmox.data.ObjectStore', {
+ let rstore = Ext.create('Proxmox.data.ObjectStore', {
url: "/api2/json/nodes/" + nodename + "/storage/" + storage + "/status",
interval: 1000,
});
- var rrdstore = Ext.create('Proxmox.data.RRDStore', {
+ let rrdstore = Ext.create('Proxmox.data.RRDStore', {
rrdurl: "/api2/json/nodes/" + nodename + "/storage/" + storage + "/rrddata",
model: 'pve-rrd-storage',
});
diff --git a/www/manager6/storage/TemplateView.js b/www/manager6/storage/TemplateView.js
index a2a05e00..3b3064d0 100644
--- a/www/manager6/storage/TemplateView.js
+++ b/www/manager6/storage/TemplateView.js
@@ -9,14 +9,14 @@ Ext.define('PVE.grid.TemplateSelector', {
trackOver: false,
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no node name specified";
}
- var baseurl = "/nodes/" + me.nodename + "/aplinfo";
- var store = new Ext.data.Store({
+ let baseurl = "/nodes/" + me.nodename + "/aplinfo";
+ let store = new Ext.data.Store({
model: 'pve-aplinfo',
groupField: 'section',
proxy: {
@@ -25,13 +25,13 @@ Ext.define('PVE.grid.TemplateSelector', {
},
});
- var sm = Ext.create('Ext.selection.RowModel', {});
+ let sm = Ext.create('Ext.selection.RowModel', {});
- var groupingFeature = Ext.create('Ext.grid.feature.Grouping', {
+ let groupingFeature = Ext.create('Ext.grid.feature.Grouping', {
groupHeaderTpl: '{[ "Section: " + values.name ]} ({rows.length} Item{[values.rows.length > 1 ? "s" : ""]})',
});
- var reload = function() {
+ let reload = function() {
store.load();
};
@@ -50,7 +50,7 @@ Ext.define('PVE.grid.TemplateSelector', {
listeners: {
buffer: 500,
keyup: function(field) {
- var value = field.getValue().toLowerCase();
+ let value = field.getValue().toLowerCase();
store.clearFilter(true);
store.filterBy(function(rec) {
return rec.data.package.toLowerCase().indexOf(value) !== -1 ||
@@ -113,17 +113,17 @@ Ext.define('PVE.storage.TemplateDownload', {
width: 900,
height: 600,
initComponent: function() {
- var me = this;
+ let me = this;
- var grid = Ext.create('PVE.grid.TemplateSelector', {
+ let grid = Ext.create('PVE.grid.TemplateSelector', {
border: false,
scrollable: true,
nodename: me.nodename,
});
- var sm = grid.getSelectionModel();
+ let sm = grid.getSelectionModel();
- var submitBtn = Ext.create('Proxmox.button.Button', {
+ let submitBtn = Ext.create('Proxmox.button.Button', {
text: gettext('Download'),
disabled: true,
selModel: sm,
@@ -139,7 +139,7 @@ Ext.define('PVE.storage.TemplateDownload', {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
success: function(response, options) {
- var upid = response.result.data;
+ let upid = response.result.data;
Ext.create('Proxmox.window.TaskViewer', {
upid: upid,
@@ -169,29 +169,29 @@ Ext.define('PVE.storage.TemplateView', {
alias: 'widget.pveStorageTemplateView',
initComponent: function() {
- var me = this;
+ let me = this;
- var nodename = me.nodename = me.pveSelNode.data.node;
+ let nodename = me.nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
- var storage = me.storage = me.pveSelNode.data.storage;
+ let storage = me.storage = me.pveSelNode.data.storage;
if (!storage) {
throw "no storage ID specified";
}
me.content = 'vztmpl';
- var reload = function() {
+ let reload = function() {
me.store.load();
};
- var templateButton = Ext.create('Proxmox.button.Button', {
+ let templateButton = Ext.create('Proxmox.button.Button', {
itemId: 'tmpl-btn',
text: gettext('Templates'),
handler: function() {
- var win = Ext.create('PVE.storage.TemplateDownload', {
+ let win = Ext.create('PVE.storage.TemplateDownload', {
nodename: nodename,
storage: storage,
reloadGrid: reload,
diff --git a/www/manager6/storage/ZFSEdit.js b/www/manager6/storage/ZFSEdit.js
index 0c5a3ceb..c1baedb6 100644
--- a/www/manager6/storage/ZFSEdit.js
+++ b/www/manager6/storage/ZFSEdit.js
@@ -18,7 +18,7 @@ Ext.define('PVE.storage.ZFSInputPanel', {
},
},
changeISCSIProvider: function(f, newVal, oldVal) {
- var vm = this.getViewModel();
+ let vm = this.getViewModel();
vm.set('isLIO', newVal === 'LIO');
vm.set('isComstar', newVal === 'comstar');
vm.set('hasWriteCacheOption', newVal === 'comstar' || newVal === 'istgt');
@@ -26,7 +26,7 @@ Ext.define('PVE.storage.ZFSInputPanel', {
},
onGetValues: function(values) {
- var me = this;
+ let me = this;
if (me.isCreate) {
values.content = 'images';
@@ -44,7 +44,7 @@ Ext.define('PVE.storage.ZFSInputPanel', {
},
initComponent: function() {
- var me = this;
+ let me = this;
me.column1 = [
{
diff --git a/www/manager6/tree/SnapshotTree.js b/www/manager6/tree/SnapshotTree.js
index 97268072..ab576d44 100644
--- a/www/manager6/tree/SnapshotTree.js
+++ b/www/manager6/tree/SnapshotTree.js
@@ -83,8 +83,8 @@ Ext.define('PVE.guest.SnapshotTree', {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
success: function(response, options) {
- var upid = response.result.data;
- var win = Ext.create('Proxmox.window.TaskProgress', { upid: upid });
+ let upid = response.result.data;
+ let win = Ext.create('Proxmox.window.TaskProgress', { upid: upid });
win.show();
},
});
@@ -124,9 +124,9 @@ Ext.define('PVE.guest.SnapshotTree', {
return;
}
Proxmox.Utils.setErrorMask(view, false);
- var digest = 'invalid';
- var idhash = {};
- var root = { name: '__root', expanded: true, children: [] };
+ let digest = 'invalid';
+ let idhash = {};
+ let root = { name: '__root', expanded: true, children: [] };
Ext.Array.each(response.result.data, function(item) {
item.leaf = true;
item.children = [];
@@ -145,7 +145,7 @@ Ext.define('PVE.guest.SnapshotTree', {
Ext.Array.each(response.result.data, function(item) {
if (item.parent && idhash[item.parent]) {
- var parent_item = idhash[item.parent];
+ let parent_item = idhash[item.parent];
parent_item.children.push(item);
parent_item.leaf = false;
parent_item.expanded = true;
diff --git a/www/manager6/window/Backup.js b/www/manager6/window/Backup.js
index 510430c0..d2f8aa66 100644
--- a/www/manager6/window/Backup.js
+++ b/www/manager6/window/Backup.js
@@ -4,7 +4,7 @@ Ext.define('PVE.window.Backup', {
resizable: false,
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no node name specified";
@@ -71,7 +71,7 @@ Ext.define('PVE.window.Backup', {
let initialDefaults = false;
- var storagesel = Ext.create('PVE.form.StorageSelector', {
+ let storagesel = Ext.create('PVE.form.StorageSelector', {
nodename: me.nodename,
name: 'storage',
fieldLabel: gettext('Storage'),
@@ -239,12 +239,12 @@ Ext.define('PVE.window.Backup', {
],
});
- var submitBtn = Ext.create('Ext.Button', {
+ let submitBtn = Ext.create('Ext.Button', {
text: gettext('Backup'),
handler: function() {
- var storage = storagesel.getValue();
+ let storage = storagesel.getValue();
let values = me.formPanel.getValues();
- var params = {
+ let params = {
storage: storage,
vmid: me.vmid,
mode: values.mode,
@@ -280,9 +280,9 @@ Ext.define('PVE.window.Backup', {
// after the task has completed
me.hide();
- var upid = response.result.data;
+ let upid = response.result.data;
- var win = Ext.create('Proxmox.window.TaskViewer', {
+ let win = Ext.create('Proxmox.window.TaskViewer', {
upid: upid,
listeners: {
close: function() {
@@ -296,13 +296,13 @@ Ext.define('PVE.window.Backup', {
},
});
- var helpBtn = Ext.create('Proxmox.button.Help', {
+ let helpBtn = Ext.create('Proxmox.button.Help', {
onlineHelp: 'chapter_vzdump',
listenToGlobalEvent: false,
hidden: false,
});
- var title = gettext('Backup') + " " +
+ let title = gettext('Backup') + " " +
(me.vmtype === 'lxc' ? "CT" : "VM") +
" " + me.vmid;
diff --git a/www/manager6/window/BackupConfig.js b/www/manager6/window/BackupConfig.js
index ca61b1e4..413e8a1d 100644
--- a/www/manager6/window/BackupConfig.js
+++ b/www/manager6/window/BackupConfig.js
@@ -18,13 +18,13 @@ Ext.define('PVE.window.BackupConfig', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.volume) {
throw "no volume specified";
}
- var nodename = me.pveSelNode.data.node;
+ let nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
diff --git a/www/manager6/window/BulkAction.js b/www/manager6/window/BulkAction.js
index 01233080..f6c7a37d 100644
--- a/www/manager6/window/BulkAction.js
+++ b/www/manager6/window/BulkAction.js
@@ -17,7 +17,7 @@ Ext.define('PVE.window.BulkAction', {
action: undefined,
submit: function(params) {
- var me = this;
+ let me = this;
Proxmox.Utils.API2Request({
params: params,
@@ -28,9 +28,9 @@ Ext.define('PVE.window.BulkAction', {
Ext.Msg.alert('Error', response.htmlStatus);
},
success: function(response, options) {
- var upid = response.result.data;
+ let upid = response.result.data;
- var win = Ext.create('Proxmox.window.TaskViewer', {
+ let win = Ext.create('Proxmox.window.TaskViewer', {
upid: upid,
});
win.show();
@@ -43,7 +43,7 @@ Ext.define('PVE.window.BulkAction', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no node name specified";
@@ -58,7 +58,7 @@ Ext.define('PVE.window.BulkAction', {
throw "no title specified";
}
- var items = [];
+ let items = [];
if (me.action === 'migrateall') {
/*value is string and number*/
@@ -155,9 +155,9 @@ Ext.define('PVE.window.BulkAction', {
items: items,
});
- var form = me.formPanel.getForm();
+ let form = me.formPanel.getForm();
- var submitBtn = Ext.create('Ext.Button', {
+ let submitBtn = Ext.create('Ext.Button', {
text: me.btnText,
handler: function() {
form.isValid();
@@ -173,7 +173,7 @@ Ext.define('PVE.window.BulkAction', {
me.callParent();
form.on('validitychange', function() {
- var valid = form.isValid();
+ let valid = form.isValid();
submitBtn.setDisabled(!valid);
});
form.isValid();
diff --git a/www/manager6/window/Clone.js b/www/manager6/window/Clone.js
index e94cd92d..918ab9b7 100644
--- a/www/manager6/window/Clone.js
+++ b/www/manager6/window/Clone.js
@@ -28,8 +28,8 @@ Ext.define('PVE.window.Clone', {
Ext.Msg.alert('Error', response.htmlStatus);
},
success: function(response, opts) {
- var snapshotList = response.result.data;
- var hasSnapshots = !(snapshotList.length === 1 &&
+ let snapshotList = response.result.data;
+ let hasSnapshots = !(snapshotList.length === 1 &&
snapshotList[0].name === 'current');
Ext.create('PVE.window.Clone', {
@@ -45,9 +45,9 @@ Ext.define('PVE.window.Clone', {
},
create_clone: function(values) {
- var me = this;
+ let me = this;
- var params = { newid: values.newvmid };
+ let params = { newid: values.newvmid };
if (values.snapname && values.snapname !== 'current') {
params.snapname = values.snapname;
@@ -95,21 +95,21 @@ Ext.define('PVE.window.Clone', {
// disable the Storage selector when clone mode is linked clone
updateVisibility: function() {
- var me = this;
- var clonemode = me.lookupReference('clonemodesel').getValue();
- var disksel = me.lookup('diskselector');
+ let me = this;
+ let clonemode = me.lookupReference('clonemodesel').getValue();
+ let disksel = me.lookup('diskselector');
disksel.setDisabled(clonemode === 'clone');
},
// add to the list of valid nodes each node where
// all the VM disks are available
verifyFeature: function() {
- var me = this;
+ let me = this;
- var snapname = me.lookupReference('snapshotsel').getValue();
- var clonemode = me.lookupReference('clonemodesel').getValue();
+ let snapname = me.lookupReference('snapshotsel').getValue();
+ let clonemode = me.lookupReference('clonemodesel').getValue();
- var params = { feature: clonemode };
+ let params = { feature: clonemode };
if (snapname !== 'current') {
params.snapname = snapname;
}
@@ -124,7 +124,7 @@ Ext.define('PVE.window.Clone', {
Ext.Msg.alert('Error', response.htmlStatus);
},
success: function(response, options) {
- var res = response.result.data;
+ let res = response.result.data;
me.lookupReference('targetsel').allowedNodes = res.nodes;
me.lookupReference('targetsel').validate();
@@ -133,7 +133,7 @@ Ext.define('PVE.window.Clone', {
},
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no node name specified";
@@ -151,14 +151,14 @@ Ext.define('PVE.window.Clone', {
throw "no Guest Type specified";
}
- var titletext = me.guestType === 'lxc' ? 'CT' : 'VM';
+ let titletext = me.guestType === 'lxc' ? 'CT' : 'VM';
if (me.isTemplate) {
titletext += ' Template';
}
me.title = "Clone " + titletext + " " + me.vmid;
- var col1 = [];
- var col2 = [];
+ let col1 = [];
+ let col2 = [];
col1.push({
xtype: 'pveNodeSelector',
@@ -175,7 +175,7 @@ Ext.define('PVE.window.Clone', {
},
});
- var modelist = [['copy', gettext('Full Clone')]];
+ let modelist = [['copy', gettext('Full Clone')]];
if (me.isTemplate) {
modelist.push(['clone', gettext('Linked Clone')]);
}
@@ -251,7 +251,7 @@ Ext.define('PVE.window.Clone', {
disabled: !!me.isTemplate, // because default mode is clone for templates
});
- var formPanel = Ext.create('Ext.form.Panel', {
+ let formPanel = Ext.create('Ext.form.Panel', {
bodyPadding: 10,
reference: 'cloneform',
border: false,
@@ -295,7 +295,7 @@ Ext.define('PVE.window.Clone', {
text: gettext('Clone'),
disabled: true,
handler: function() {
- var cloneForm = me.lookupReference('cloneform');
+ let cloneForm = me.lookupReference('cloneform');
if (cloneForm.isValid()) {
me.create_clone(cloneForm.getValues());
}
diff --git a/www/manager6/window/DownloadUrlToStorage.js b/www/manager6/window/DownloadUrlToStorage.js
index 48543d28..61f6a329 100644
--- a/www/manager6/window/DownloadUrlToStorage.js
+++ b/www/manager6/window/DownloadUrlToStorage.js
@@ -13,7 +13,7 @@ Ext.define('PVE.window.DownloadUrlToStorage', {
submitText: gettext('Download'),
cbindData: function(initialConfig) {
- var me = this;
+ let me = this;
return {
nodename: me.nodename,
storage: me.storage,
@@ -215,7 +215,7 @@ Ext.define('PVE.window.DownloadUrlToStorage', {
],
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no node name specified";
diff --git a/www/manager6/window/FirewallEnableEdit.js b/www/manager6/window/FirewallEnableEdit.js
index 34ecadbc..cb81656f 100644
--- a/www/manager6/window/FirewallEnableEdit.js
+++ b/www/manager6/window/FirewallEnableEdit.js
@@ -31,7 +31,7 @@ Ext.define('PVE.FirewallEnableEdit', {
],
beforeShow: function() {
- var me = this;
+ let me = this;
Proxmox.Utils.API2Request({
url: '/api2/extjs/cluster/firewall/options',
diff --git a/www/manager6/window/FirewallLograteEdit.js b/www/manager6/window/FirewallLograteEdit.js
index 12fcc3f1..d3a1e865 100644
--- a/www/manager6/window/FirewallLograteEdit.js
+++ b/www/manager6/window/FirewallLograteEdit.js
@@ -77,7 +77,7 @@ Ext.define('PVE.FirewallLograteInputPanel', {
if (values.log_ratelimit !== undefined) {
properties = PVE.Parser.parsePropertyString(values.log_ratelimit, 'enable');
if (properties.rate) {
- var matches = properties.rate.match(/^(\d+)\/(second|minute|hour|day)$/);
+ let matches = properties.rate.match(/^(\d+)\/(second|minute|hour|day)$/);
if (matches) {
properties.rate = matches[1];
properties.unit = matches[2];
diff --git a/www/manager6/window/LoginWindow.js b/www/manager6/window/LoginWindow.js
index 4a07f75b..99c3f6b8 100644
--- a/www/manager6/window/LoginWindow.js
+++ b/www/manager6/window/LoginWindow.js
@@ -22,12 +22,12 @@ Ext.define('PVE.window.LoginWindow', {
xclass: 'Ext.app.ViewController',
onLogon: async function() {
- var me = this;
+ let me = this;
- var form = this.lookupReference('loginForm');
- var unField = this.lookupReference('usernameField');
- var saveunField = this.lookupReference('saveunField');
- var view = this.getView();
+ let form = this.lookupReference('loginForm');
+ let unField = this.lookupReference('usernameField');
+ let saveunField = this.lookupReference('saveunField');
+ let view = this.getView();
if (!form.isValid()) {
return;
@@ -62,7 +62,7 @@ Ext.define('PVE.window.LoginWindow', {
view.el.mask(gettext('Please wait...'), 'x-mask-loading');
// set or clear username
- var sp = Ext.state.Manager.getProvider();
+ let sp = Ext.state.Manager.getProvider();
if (saveunField.getValue() === true) {
sp.set(unField.getStateId(), unField.getValue());
} else {
@@ -135,11 +135,11 @@ Ext.define('PVE.window.LoginWindow', {
/* END NEW TFA CODE (pbs copy) */
failure: function(resp) {
- var me = this;
- var view = me.getView();
+ let me = this;
+ let view = me.getView();
view.el.unmask();
- var handler = function() {
- var uf = me.lookupReference('usernameField');
+ let handler = function() {
+ let uf = me.lookupReference('usernameField');
uf.focus(true, true);
};
@@ -152,16 +152,16 @@ Ext.define('PVE.window.LoginWindow', {
Ext.MessageBox.alert(gettext('Error'), emsg, handler);
},
success: function(data) {
- var me = this;
- var view = me.getView();
- var handler = view.handler || Ext.emptyFn;
+ let me = this;
+ let view = me.getView();
+ let handler = view.handler || Ext.emptyFn;
handler.call(me, data);
view.close();
},
perform_otp: function() {
- var me = this;
- var win = Ext.create('PVE.window.TFALoginWindow', {
+ let me = this;
+ let win = Ext.create('PVE.window.TFALoginWindow', {
onLogin: function(value) {
me.finish_tfa(value);
},
@@ -175,15 +175,15 @@ Ext.define('PVE.window.LoginWindow', {
},
perform_u2f: function(data) {
- var me = this;
+ let me = this;
// Show the message:
- var msg = Ext.Msg.show({
+ let msg = Ext.Msg.show({
title: 'U2F: '+gettext('Verification'),
message: gettext('Please press the button on your U2F Device'),
buttons: [],
});
- var chlg = data.U2FChallenge;
- var key = {
+ let chlg = data.U2FChallenge;
+ let key = {
version: chlg.version,
keyHandle: chlg.keyHandle,
};
@@ -199,8 +199,8 @@ Ext.define('PVE.window.LoginWindow', {
});
},
finish_tfa: function(res) {
- var me = this;
- var view = me.getView();
+ let me = this;
+ let view = me.getView();
view.el.mask(gettext('Please wait...'), 'x-mask-loading');
Proxmox.Utils.API2Request({
url: '/api2/extjs/access/tfa',
@@ -212,7 +212,7 @@ Ext.define('PVE.window.LoginWindow', {
success: function(resp, opts) {
view.el.unmask();
// Fill in what we copy over from the 1st factor:
- var data = resp.result.data;
+ let data = resp.result.data;
data.CSRFPreventionToken = Proxmox.CSRFPreventionToken;
data.username = Proxmox.UserName;
// Finish logging in:
@@ -229,7 +229,7 @@ Ext.define('PVE.window.LoginWindow', {
'field[name=username]': {
specialkey: function(f, e) {
if (e.getKey() === e.ENTER) {
- var pf = this.lookupReference('passwordField');
+ let pf = this.lookupReference('passwordField');
if (!pf.getValue()) {
pf.focus(false);
}
@@ -238,7 +238,7 @@ Ext.define('PVE.window.LoginWindow', {
},
'field[name=lang]': {
change: function(f, value) {
- var dt = Ext.Date.add(new Date(), Ext.Date.YEAR, 10);
+ let dt = Ext.Date.add(new Date(), Ext.Date.YEAR, 10);
Ext.util.Cookies.set('PVELangCookie', value, dt);
this.getView().mask(gettext('Please wait...'), 'x-mask-loading');
window.location.reload();
@@ -257,19 +257,19 @@ Ext.define('PVE.window.LoginWindow', {
},
'#': {
show: function() {
- var me = this;
+ let me = this;
- var sp = Ext.state.Manager.getProvider();
- var checkboxField = this.lookupReference('saveunField');
- var unField = this.lookupReference('usernameField');
+ let sp = Ext.state.Manager.getProvider();
+ let checkboxField = this.lookupReference('saveunField');
+ let unField = this.lookupReference('usernameField');
- var checked = sp.get(checkboxField.getStateId());
+ let checked = sp.get(checkboxField.getStateId());
checkboxField.setValue(checked);
if (checked === true) {
- var username = sp.get(unField.getStateId());
+ let username = sp.get(unField.getStateId());
unField.setValue(username);
- var pwField = this.lookupReference('passwordField');
+ let pwField = this.lookupReference('passwordField');
pwField.focus();
}
diff --git a/www/manager6/window/Migrate.js b/www/manager6/window/Migrate.js
index 1c23abb3..54e1f700 100644
--- a/www/manager6/window/Migrate.js
+++ b/www/manager6/window/Migrate.js
@@ -74,7 +74,7 @@ Ext.define('PVE.window.Migrate', {
},
init: function(view) {
- var me = this,
+ let me = this,
vm = view.getViewModel();
if (!view.nodename) {
@@ -108,12 +108,12 @@ Ext.define('PVE.window.Migrate', {
},
startMigration: function() {
- var me = this,
+ let me = this,
view = me.getView(),
vm = me.getViewModel();
- var values = me.lookup('formPanel').getValues();
- var params = {
+ let values = me.lookup('formPanel').getValues();
+ let params = {
target: values.target,
};
@@ -142,8 +142,8 @@ Ext.define('PVE.window.Migrate', {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
success: function(response, options) {
- var upid = response.result.data;
- var extraTitle = Ext.String.format(' ({0} ---> {1})', vm.get('nodename'), params.target);
+ let upid = response.result.data;
+ let extraTitle = Ext.String.format(' ({0} ---> {1})', vm.get('nodename'), params.target);
Ext.create('Proxmox.window.TaskViewer', {
upid: upid,
@@ -156,10 +156,10 @@ Ext.define('PVE.window.Migrate', {
},
checkMigratePreconditions: function(resetMigrationPossible) {
- var me = this,
+ let me = this,
vm = me.getViewModel();
- var vmrec = PVE.data.ResourceStore.findRecord('vmid', vm.get('vmid'),
+ let vmrec = PVE.data.ResourceStore.findRecord('vmid', vm.get('vmid'),
0, false, false, true);
if (vmrec && vmrec.data && vmrec.data.running) {
vm.set('running', true);
diff --git a/www/manager6/window/Prune.js b/www/manager6/window/Prune.js
index 6156fe03..e16daa25 100644
--- a/www/manager6/window/Prune.js
+++ b/www/manager6/window/Prune.js
@@ -106,7 +106,7 @@ Ext.define('PVE.PruneInputPanel', {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
success: function(response, options) {
- var data = response.result.data;
+ let data = response.result.data;
addKeepReasons(data, keepParams);
view.pruneStore.setData(data);
},
@@ -152,7 +152,7 @@ Ext.define('PVE.PruneInputPanel', {
],
initComponent: function() {
- var me = this;
+ let me = this;
me.pruneStore = Ext.create('Ext.data.Store', {
model: 'pve-prune-list',
@@ -214,7 +214,7 @@ Ext.define('PVE.window.Prune', {
isCreate: true,
initComponent: function() {
- var me = this;
+ let me = this;
if (!me.nodename) {
throw "no nodename specified";
diff --git a/www/manager6/window/Settings.js b/www/manager6/window/Settings.js
index 5cf7a70f..67a55b5b 100644
--- a/www/manager6/window/Settings.js
+++ b/www/manager6/window/Settings.js
@@ -29,12 +29,12 @@ Ext.define('PVE.window.Settings', {
xclass: 'Ext.app.ViewController',
init: function(view) {
- var me = this;
- var sp = Ext.state.Manager.getProvider();
+ let me = this;
+ let sp = Ext.state.Manager.getProvider();
- var username = sp.get('login-username') || Proxmox.Utils.noneText;
+ let username = sp.get('login-username') || Proxmox.Utils.noneText;
me.lookupReference('savedUserName').setValue(Ext.String.htmlEncode(username));
- var vncMode = sp.get('novnc-scaling') || 'auto';
+ let vncMode = sp.get('novnc-scaling') || 'auto';
me.lookupReference('noVNCScalingGroup').setValue({ noVNCScalingField: vncMode });
let summarycolumns = sp.get('summarycolumns', 'auto');
@@ -42,11 +42,11 @@ Ext.define('PVE.window.Settings', {
me.lookup('guestNotesCollapse').setValue(sp.get('guest-notes-collapse', 'never'));
- var settings = ['fontSize', 'fontFamily', 'letterSpacing', 'lineHeight'];
+ let settings = ['fontSize', 'fontFamily', 'letterSpacing', 'lineHeight'];
settings.forEach(function(setting) {
- var val = localStorage.getItem('pve-xterm-' + setting);
+ let val = localStorage.getItem('pve-xterm-' + setting);
if (val !== undefined && val !== null) {
- var field = me.lookup(setting);
+ let field = me.lookup(setting);
field.setValue(val);
field.resetOriginalValue();
}
@@ -71,12 +71,12 @@ Ext.define('PVE.window.Settings', {
},
'#xtermjs button': {
click: function(button) {
- var me = this;
- var settings = ['fontSize', 'fontFamily', 'letterSpacing', 'lineHeight'];
+ let me = this;
+ let settings = ['fontSize', 'fontFamily', 'letterSpacing', 'lineHeight'];
settings.forEach(function(setting) {
- var field = me.lookup(setting);
+ let field = me.lookup(setting);
if (button.reference === 'xtermsave') {
- var value = field.getValue();
+ let value = field.getValue();
if (value) {
localStorage.setItem('pve-xterm-' + setting, value);
} else {
@@ -112,8 +112,8 @@ Ext.define('PVE.window.Settings', {
},
'grid[reference=dashboard-storages]': {
selectionchange: function(grid, selected) {
- var me = this;
- var sp = Ext.state.Manager.getProvider();
+ let me = this;
+ let sp = Ext.state.Manager.getProvider();
// saves the selected storageids as "id1,id2,id3,..." or clears the variable
if (selected.length > 0) {
diff --git a/www/manager6/window/Snapshot.js b/www/manager6/window/Snapshot.js
index 426be7cc..42d4981a 100644
--- a/www/manager6/window/Snapshot.js
+++ b/www/manager6/window/Snapshot.js
@@ -25,8 +25,8 @@ Ext.define('PVE.window.Snapshot', {
},
initComponent: function() {
- var me = this;
- var vm = me.getViewModel();
+ let me = this;
+ let vm = me.getViewModel();
if (!me.nodename) {
throw "no node name specified";
diff --git a/www/manager6/window/StartupEdit.js b/www/manager6/window/StartupEdit.js
index b9fd7646..dd107c11 100644
--- a/www/manager6/window/StartupEdit.js
+++ b/www/manager6/window/StartupEdit.js
@@ -3,9 +3,9 @@ Ext.define('PVE.panel.StartupInputPanel', {
onlineHelp: 'qm_startup_and_shutdown',
onGetValues: function(values) {
- var me = this;
+ let me = this;
- var res = PVE.Parser.printStartup(values);
+ let res = PVE.Parser.printStartup(values);
if (res === undefined || res === '') {
return { 'delete': 'startup' };
@@ -15,16 +15,16 @@ Ext.define('PVE.panel.StartupInputPanel', {
},
setStartup: function(value) {
- var me = this;
+ let me = this;
- var startup = PVE.Parser.parseStartup(value);
+ let startup = PVE.Parser.parseStartup(value);
if (startup) {
me.setValues(startup);
}
},
initComponent: function() {
- var me = this;
+ let me = this;
me.items = [
{
diff --git a/www/manager6/window/Wizard.js b/www/manager6/window/Wizard.js
index 4aacb8a3..8a3942bc 100644
--- a/www/manager6/window/Wizard.js
+++ b/www/manager6/window/Wizard.js
@@ -34,9 +34,9 @@ Ext.define('PVE.window.Wizard', {
},
initComponent: function() {
- var me = this;
+ let me = this;
- var tabs = me.items || [];
+ let tabs = me.items || [];
delete me.items;
/*
--
2.30.2
^ permalink raw reply [flat|nested] 8+ messages in thread