ui: tape/DriveConfig: add Catalog button

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-02-05 15:26:19 +01:00 committed by Dietmar Maurer
parent e2225aa882
commit 1d70e3812c

View File

@ -57,6 +57,16 @@ Ext.define('PBS.TapeManagement.DrivePanel', {
});
},
catalog: function(view, rI, cI, button, el, record) {
let me = this;
let drive = record.data.name;
me.driveCommand(drive, 'catalog', function(response) {
Ext.create('Proxmox.window.TaskViewer', {
upid: response.result.data,
}).show();
}, {}, 'POST');
},
readLabel: function(view, rI, cI, button, el, record) {
let me = this;
let drive = record.data.name;
@ -286,7 +296,7 @@ Ext.define('PBS.TapeManagement.DrivePanel', {
},
{
text: gettext('Actions'),
width: 120,
width: 140,
xtype: 'actioncolumn',
items: [
{
@ -301,6 +311,11 @@ Ext.define('PBS.TapeManagement.DrivePanel', {
iconCls: 'fa fa-tag',
handler: 'readLabel',
},
{
iconCls: 'fa fa-book',
handler: 'catalog',
tooltip: gettext('Catalog'),
},
{
iconCls: 'fa fa-info-circle',
handler: 'status',