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:
Dominik Csapak
2021-03-08 10:06:07 +01:00
committed by Dietmar Maurer
parent a4003d9078
commit d0a0bad9d6
2 changed files with 42 additions and 55 deletions

View File

@ -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: [