mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-08-01 22:59:21 +00:00
ui: tape/ChangerStatus: adding parameter selection to inventory
namely 'catalog' and 'read-all-labels', by always opening a window (with a drive now autoselected) and the two checkboxes Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
4ebc97ad4b
commit
57ee4e9ea4
@ -375,25 +375,6 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let singleDrive = me.drives.length === 1 ? me.drives[0] : undefined;
|
|
||||||
|
|
||||||
if (singleDrive !== undefined) {
|
|
||||||
Proxmox.Utils.API2Request({
|
|
||||||
method: 'PUT',
|
|
||||||
url: `/api2/extjs/tape/drive/${singleDrive}/inventory`,
|
|
||||||
success: function(response, opt) {
|
|
||||||
Ext.create('Proxmox.window.TaskViewer', {
|
|
||||||
upid: response.result.data,
|
|
||||||
taskDone: function(success) {
|
|
||||||
me.reload();
|
|
||||||
},
|
|
||||||
}).show();
|
|
||||||
},
|
|
||||||
failure: function(response, opt) {
|
|
||||||
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
Ext.create('Proxmox.window.Edit', {
|
Ext.create('Proxmox.window.Edit', {
|
||||||
title: gettext('Inventory'),
|
title: gettext('Inventory'),
|
||||||
showTaskViewer: true,
|
showTaskViewer: true,
|
||||||
@ -408,13 +389,26 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
|
|||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
xtype: 'pbsDriveSelector',
|
xtype: 'pbsDriveSelector',
|
||||||
|
labelWidth: 120,
|
||||||
fieldLabel: gettext('Drive'),
|
fieldLabel: gettext('Drive'),
|
||||||
name: 'drive',
|
name: 'drive',
|
||||||
changer: changer,
|
changer: changer,
|
||||||
|
autoSelect: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: 'proxmoxcheckbox',
|
||||||
|
labelWidth: 120,
|
||||||
|
fieldLabel: gettext('Restore Catalogs'),
|
||||||
|
name: 'catalog',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: 'proxmoxcheckbox',
|
||||||
|
labelWidth: 120,
|
||||||
|
fieldLabel: gettext('Force all Tapes'),
|
||||||
|
name: 'read-all-labels',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}).show();
|
}).show();
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
scheduleReload: function(time) {
|
scheduleReload: function(time) {
|
||||||
|
Loading…
Reference in New Issue
Block a user