pve-manager/www/manager6/form/ComboBoxSetStoreNode.js
Stefan Hrdlicka 14d9ecc416 fix #2822: add iscsi, lvm, lvmthin & zfs storage for all cluster nodes
This adds a dropdown box for iSCSI, LVM, LVMThin & ZFS storage options where a
cluster node needs to be chosen. As default the current node is
selected. It restricts the the storage to be only availabe on the
selected node.

Signed-off-by: Stefan Hrdlicka <s.hrdlicka@proxmox.com>
2022-12-21 16:24:04 +01:00

17 lines
347 B
JavaScript

Ext.define('PVE.form.ComboBoxSetStoreNode', {
extend: 'Ext.form.field.ComboBox',
config: {
apiBaseUrl: '/api2/json/nodes/',
apiSuffix: '',
},
setNodeName: function(value) {
let me = this;
value ||= Proxmox.NodeName;
me.getStore().getProxy().setUrl(`${me.apiBaseUrl}${value}${me.apiSuffix}`);
this.clearValue();
},
});