ui: add 'Catalog' button to changer drive

This commit is contained in:
Dietmar Maurer 2021-03-02 08:53:18 +01:00
parent d4bfdfe749
commit 2af8b8ef91
1 changed files with 22 additions and 0 deletions

View File

@ -92,6 +92,21 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
}).show();
},
catalog: function(button, event, record) {
let me = this;
let view = me.getView();
PBS.Utils.driveCommand(record.data.name, 'catalog', {
waitMsgTarget: view,
method: 'POST',
success: function(response) {
Ext.create('Proxmox.window.TaskViewer', {
upid: response.result.data,
}).show();
},
});
},
erase: function(v, rI, cI, button, el, record) {
let me = this;
let view = me.getView();
@ -617,6 +632,13 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
iconCls: 'fa fa-barcode',
disabled: true,
},
{
text: gettext('Catalog'),
xtype: 'proxmoxButton',
handler: 'catalog',
iconCls: 'fa fa-book',
disabled: true,
},
],
columns: [
{