ui: tape/ChangerStatus: hide selector for single drives in barcode-label
it is rather pointless to let the user select something were there is no choice. We have to keep the window though, since the user may want to choose a pool Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
a316178768
commit
3f0e344bc1
@ -302,6 +302,8 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
|
||||
return;
|
||||
}
|
||||
|
||||
let singleDrive = me.drives.length === 1 ? me.drives[0] : undefined;
|
||||
|
||||
Ext.create('Proxmox.window.Edit', {
|
||||
title: gettext('Barcode Label'),
|
||||
showTaskViewer: true,
|
||||
@ -315,9 +317,11 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
|
||||
|
||||
items: [
|
||||
{
|
||||
xtype: 'pbsDriveSelector',
|
||||
xtype: singleDrive === undefined ? 'pbsDriveSelector' : 'displayfield',
|
||||
fieldLabel: gettext('Drive'),
|
||||
submitValue: true,
|
||||
name: 'drive',
|
||||
value: singleDrive,
|
||||
changer: changer,
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user