public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] ui: tape: prevent mislabeling tapes in changers
@ 2023-04-17 11:00 Dominik Csapak
  2023-04-17 11:59 ` Dominik Csapak
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2023-04-17 11:00 UTC (permalink / raw)
  To: pbs-devel

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@proxmox.com>
---
 www/tape/window/LabelMedia.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/www/tape/window/LabelMedia.js b/www/tape/window/LabelMedia.js
index 21f20dba..e6a3655e 100644
--- a/www/tape/window/LabelMedia.js
+++ b/www/tape/window/LabelMedia.js
@@ -13,6 +13,7 @@ Ext.define('PBS.TapeManagement.LabelMediaWindow', {
     cbindData: function(config) {
 	let me = this;
 	return {
+	    readOnly: !!config.label,
 	    driveid: config.driveid,
 	    label: config.label,
 	};
@@ -50,10 +51,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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [pbs-devel] [PATCH proxmox-backup] ui: tape: prevent mislabeling tapes in changers
  2023-04-17 11:00 [pbs-devel] [PATCH proxmox-backup] ui: tape: prevent mislabeling tapes in changers Dominik Csapak
@ 2023-04-17 11:59 ` Dominik Csapak
  0 siblings, 0 replies; 2+ messages in thread
From: Dominik Csapak @ 2023-04-17 11:59 UTC (permalink / raw)
  To: pbs-devel

disregard this, i sent a v2




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-17 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-17 11:00 [pbs-devel] [PATCH proxmox-backup] ui: tape: prevent mislabeling tapes in changers Dominik Csapak
2023-04-17 11:59 ` Dominik Csapak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal