From 2af8b8ef919a2185770ab63d8f11cb6a3051ae54 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 2 Mar 2021 08:53:18 +0100 Subject: [PATCH] ui: add 'Catalog' button to changer drive --- www/tape/ChangerStatus.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/www/tape/ChangerStatus.js b/www/tape/ChangerStatus.js index caaa051d..4faad6f5 100644 --- a/www/tape/ChangerStatus.js +++ b/www/tape/ChangerStatus.js @@ -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: [ {