diff --git a/www/tape/DriveConfig.js b/www/tape/DriveConfig.js index 7433f37c..6ffa2606 100644 --- a/www/tape/DriveConfig.js +++ b/www/tape/DriveConfig.js @@ -98,6 +98,20 @@ Ext.define('PBS.TapeManagement.DrivePanel', { }).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() { this.getView().getStore().rstore.load(); }, @@ -159,6 +173,12 @@ Ext.define('PBS.TapeManagement.DrivePanel', { iconCls: 'fa fa-barcode', disabled: true, }, + { + text: gettext('Eject'), + xtype: 'proxmoxButton', + handler: 'ejectMedia', + disabled: true, + }, ], columns: [ {