ui: add tape drive Eject button

This commit is contained in:
Dietmar Maurer 2021-02-25 12:52:04 +01:00
parent 1cf191c597
commit e8653b96be
1 changed files with 20 additions and 0 deletions

View File

@ -98,6 +98,20 @@ Ext.define('PBS.TapeManagement.DrivePanel', {
}).show(); }).show();
}, },
ejectMedia: function(button, event, record) {
let me = this;
let driveid = record.data.name;
PBS.Utils.driveCommand(driveid, 'eject-media', {
waitMsgTarget: me.getView(),
method: 'POST',
success: function(response) {
Ext.create('Proxmox.window.TaskProgress', {
upid: response.result.data,
}).show();
},
});
},
reload: function() { reload: function() {
this.getView().getStore().rstore.load(); this.getView().getStore().rstore.load();
}, },
@ -159,6 +173,12 @@ Ext.define('PBS.TapeManagement.DrivePanel', {
iconCls: 'fa fa-barcode', iconCls: 'fa fa-barcode',
disabled: true, disabled: true,
}, },
{
text: gettext('Eject'),
xtype: 'proxmoxButton',
handler: 'ejectMedia',
disabled: true,
},
], ],
columns: [ columns: [
{ {