ui: lxc resources: refactor add menu handler

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-04-01 13:35:10 +02:00
parent 809f6b6ef5
commit 163d9f17cb

View File

@ -324,13 +324,15 @@ Ext.define('PVE.lxc.RessourceView', {
iconCls: 'fa fa-fw fa-hdd-o black',
disabled: !caps.vms['VM.Config.Disk'],
handler: function() {
var win = Ext.create('PVE.lxc.MountPointEdit', {
url: '/api2/extjs/' + baseurl,
Ext.create('PVE.lxc.MountPointEdit', {
autoShow: true,
url: `/api2/extjs/${baseurl}`,
unprivileged: me.getObjectValue('unprivileged'),
pveSelNode: me.pveSelNode,
listeners: {
destroy: () => me.reload(),
},
});
win.on('destroy', me.reload, me);
win.show();
},
},
],