ui: tape/Drive{Config, Status} move actions to status panel
so that the 'DriveConfig' panel is purely for configuration Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
		
				
					committed by
					
						
						Dietmar Maurer
					
				
			
			
				
	
			
			
			
						parent
						
							a4003d9078
						
					
				
				
					commit
					d0a0bad9d6
				
			@ -55,34 +55,6 @@ Ext.define('PBS.TapeManagement.DrivePanel', {
 | 
			
		||||
	    });
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	readLabel: function(view, rI, cI, button, el, record) {
 | 
			
		||||
	    let me = this;
 | 
			
		||||
	    let drive = record.data.name;
 | 
			
		||||
 | 
			
		||||
	    PBS.Utils.driveCommand(drive, 'read-label', {
 | 
			
		||||
		waitMsgTarget: me.getView(),
 | 
			
		||||
		success: PBS.Utils.showMediaLabelWindow,
 | 
			
		||||
	    });
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	volumeStatistics: function(view, rI, cI, button, el, record) {
 | 
			
		||||
	    let me = this;
 | 
			
		||||
	    let drive = record.data.name;
 | 
			
		||||
	    PBS.Utils.driveCommand(drive, 'volume-statistics', {
 | 
			
		||||
		waitMsgTarget: me.getView(),
 | 
			
		||||
		success: PBS.Utils.showVolumeStatisticsWindow,
 | 
			
		||||
	    });
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	cartridgeMemory: function(view, rI, cI, button, el, record) {
 | 
			
		||||
	    let me = this;
 | 
			
		||||
	    let drive = record.data.name;
 | 
			
		||||
	    PBS.Utils.driveCommand(drive, 'cartridge-memory', {
 | 
			
		||||
		waitMsgTarget: me.getView(),
 | 
			
		||||
		success: PBS.Utils.showCartridgeMemoryWindow,
 | 
			
		||||
	    });
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	reload: function() {
 | 
			
		||||
	    this.getView().getStore().rstore.load();
 | 
			
		||||
	},
 | 
			
		||||
@ -193,33 +165,6 @@ Ext.define('PBS.TapeManagement.DrivePanel', {
 | 
			
		||||
		return record.data.changer ? value : '';
 | 
			
		||||
	    },
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
	    text: gettext('Actions'),
 | 
			
		||||
	    width: 140,
 | 
			
		||||
	    xtype: 'actioncolumn',
 | 
			
		||||
	    items: [
 | 
			
		||||
		{
 | 
			
		||||
		    iconCls: 'fa fa-hdd-o',
 | 
			
		||||
		    handler: 'cartridgeMemory',
 | 
			
		||||
		    tooltip: gettext('Cartridge Memory'),
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
		    iconCls: 'fa fa-line-chart',
 | 
			
		||||
		    handler: 'volumeStatistics',
 | 
			
		||||
		    tooltip: gettext('Volume Statistics'),
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
		    iconCls: 'fa fa-tag',
 | 
			
		||||
		    handler: 'readLabel',
 | 
			
		||||
		    tooltip: gettext('Read Label'),
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
		    iconCls: 'fa fa-info-circle',
 | 
			
		||||
		    handler: 'status',
 | 
			
		||||
		    tooltip: gettext('Status'),
 | 
			
		||||
		},
 | 
			
		||||
	    ],
 | 
			
		||||
	},
 | 
			
		||||
    ],
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -120,6 +120,27 @@ Ext.define('PBS.TapeManagement.DriveStatus', {
 | 
			
		||||
	    });
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	readLabel: function() {
 | 
			
		||||
	    let me = this;
 | 
			
		||||
	    let view = me.getView();
 | 
			
		||||
	    let drive = view.drive;
 | 
			
		||||
 | 
			
		||||
	    PBS.Utils.driveCommand(drive, 'read-label', {
 | 
			
		||||
		waitMsgTarget: view,
 | 
			
		||||
		success: PBS.Utils.showMediaLabelWindow,
 | 
			
		||||
	    });
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	volumeStatistics: function() {
 | 
			
		||||
	    let me = this;
 | 
			
		||||
	    let view = me.getView();
 | 
			
		||||
	    let drive = view.drive;
 | 
			
		||||
	    PBS.Utils.driveCommand(drive, 'volume-statistics', {
 | 
			
		||||
		waitMsgTarget: view,
 | 
			
		||||
		success: PBS.Utils.showVolumeStatisticsWindow,
 | 
			
		||||
	    });
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	init: function(view) {
 | 
			
		||||
	    let me = this;
 | 
			
		||||
	    me.mon(me.lookup('statusgrid').getStore().rstore, 'load', 'onLoad');
 | 
			
		||||
@ -172,6 +193,27 @@ Ext.define('PBS.TapeManagement.DriveStatus', {
 | 
			
		||||
		disabled: '{!online}',
 | 
			
		||||
	    },
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
	    text: gettext('Read Label'),
 | 
			
		||||
	    xtype: 'proxmoxButton',
 | 
			
		||||
	    handler: 'readLabel',
 | 
			
		||||
	    iconCls: 'fa fa-tag',
 | 
			
		||||
	    disabled: true,
 | 
			
		||||
	    bind: {
 | 
			
		||||
		disabled: '{!online}',
 | 
			
		||||
	    },
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
	    text: gettext('Show Volume Statistics'),
 | 
			
		||||
	    xtype: 'proxmoxButton',
 | 
			
		||||
	    handler: 'volumeStatistics',
 | 
			
		||||
	    iconCls: 'fa fa-line-chart',
 | 
			
		||||
	    disabled: true,
 | 
			
		||||
	    bind: {
 | 
			
		||||
		disabled: '{!online}',
 | 
			
		||||
	    },
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
    ],
 | 
			
		||||
 | 
			
		||||
    items: [
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user