[pbs-devel] [PATCH proxmox-backup v2] ui: tape: prevent mislabeling tapes in changers

Dominik Csapak d.csapak at proxmox.com
Mon Apr 17 13:59:05 CEST 2023


when labeling a tape in a changer, we pre-fill the label field with
the one from the barcode (if it exists). Letting the user change
the label here does not make much sense, since we assume that they are
the same (e.g. for move operations etc.)

So instead simply display the label to protect users from accidentally
changing it. If a user really needs to have a different label than the
suggested one, it's still possible on the cli.

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
changes from v1:
* remove left-over readOnly flag
 www/tape/window/LabelMedia.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/www/tape/window/LabelMedia.js b/www/tape/window/LabelMedia.js
index 21f20dba..06c43063 100644
--- a/www/tape/window/LabelMedia.js
+++ b/www/tape/window/LabelMedia.js
@@ -50,10 +50,12 @@ Ext.define('PBS.TapeManagement.LabelMediaWindow', {
 	{
 	    fieldLabel: gettext('Label'),
 	    name: 'label-text',
-	    xtype: 'proxmoxtextfield',
+	    xtype: 'pmxDisplayEditField',
+	    submitValue: true,
 	    allowBlank: false,
 	    cbind: {
 		value: '{label}',
+		editable: '{!label}',
 	    },
 	},
 	{
-- 
2.30.2






More information about the pbs-devel mailing list