[pbs-devel] [PATCH proxmox-backup 4/5] ui: tape/DriveConfig: add Catalog button

Dominik Csapak d.csapak at proxmox.com
Fri Feb 5 15:26:19 CET 2021


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/tape/DriveConfig.js | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/www/tape/DriveConfig.js b/www/tape/DriveConfig.js
index 8eb40da3..0d28eb87 100644
--- a/www/tape/DriveConfig.js
+++ b/www/tape/DriveConfig.js
@@ -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',
-- 
2.20.1






More information about the pbs-devel mailing list