Signed-off-by: Hannes Laimer <h.lai...@proxmox.com> --- add remove button to ui, all previous patches are needed for this one
www/DirectoryList.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/www/DirectoryList.js b/www/DirectoryList.js index 00531fd0..51b30c78 100644 --- a/www/DirectoryList.js +++ b/www/DirectoryList.js @@ -21,6 +21,24 @@ Ext.define('PBS.admin.Directorylist', { }).show(); }, + removeDirectory: function() { + let me = this; + const view = me.getView(); + const rec = view.getSelection()[0]; + const id = rec.data.id; + Ext.create('Proxmox.window.SafeDestroy', { + url: `/nodes/localhost/disks/directory/${id}`, + item: { + id: id, + }, + note: gettext('Data and partitions on the disk will be left untouched.'), + taskName: 'dirremove', + listeners: { + destroy: () => me.reload(), + }, + }).show(); + }, + reload: function() { let me = this; let store = me.getView().getStore(); @@ -49,6 +67,13 @@ Ext.define('PBS.admin.Directorylist', { text: gettext('Create') + ': Directory', handler: 'createDirectory', }, + { + xtype: 'proxmoxButton', + text: gettext('Remove'), + handler: 'removeDir', + disabled: true, + iconCls: 'fa fa-trash-o', + }, ], columns: [ -- 2.20.1 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel