From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <d.csapak@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id DA9BC72EB5
 for <pbs-devel@lists.proxmox.com>; Wed, 14 Apr 2021 12:21:38 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id CD979D1BF
 for <pbs-devel@lists.proxmox.com>; Wed, 14 Apr 2021 12:21:38 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [212.186.127.180])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id 4631CD1B7
 for <pbs-devel@lists.proxmox.com>; Wed, 14 Apr 2021 12:21:38 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 0D7F345A72
 for <pbs-devel@lists.proxmox.com>; Wed, 14 Apr 2021 12:21:38 +0200 (CEST)
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Date: Wed, 14 Apr 2021 12:21:37 +0200
Message-Id: <20210414102137.27818-1-d.csapak@proxmox.com>
X-Mailer: git-send-email 2.20.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.164 Adjusted score from AWL reputation of From: address
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 RCVD_IN_DNSWL_MED        -2.3 Sender listed at https://www.dnswl.org/,
 medium trust
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [record.data, rec.data]
Subject: [pbs-devel] [PATCH proxmox-backup] ui: tape: rename erase to format
X-BeenThere: pbs-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Backup Server development discussion
 <pbs-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pbs-devel/>
List-Post: <mailto:pbs-devel@lists.proxmox.com>
List-Help: <mailto:pbs-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Wed, 14 Apr 2021 10:21:38 -0000

erase is a different action, so correctly call it 'format'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/tape/ChangerStatus.js | 6 +++---
 www/tape/DriveStatus.js   | 2 +-
 www/tape/TapeInventory.js | 6 +++---
 www/tape/window/Erase.js  | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/www/tape/ChangerStatus.js b/www/tape/ChangerStatus.js
index 2f6e29df..8983c2aa 100644
--- a/www/tape/ChangerStatus.js
+++ b/www/tape/ChangerStatus.js
@@ -138,7 +138,7 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
 	    });
 	},
 
-	erase: function(v, rI, cI, button, el, record) {
+	format: function(v, rI, cI, button, el, record) {
 	    let me = this;
 	    let view = me.getView();
 	    let label = record.data['label-text'];
@@ -703,8 +703,8 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
 				},
 				{
 				    iconCls: 'fa fa-trash-o',
-				    handler: 'erase',
-				    tooltip: gettext('Erase'),
+				    handler: 'format',
+				    tooltip: gettext('Format'),
 				    isDisabled: (v, r, c, i, rec) => !rec.data['label-text'],
 				},
 				{
diff --git a/www/tape/DriveStatus.js b/www/tape/DriveStatus.js
index feca6ede..acc77680 100644
--- a/www/tape/DriveStatus.js
+++ b/www/tape/DriveStatus.js
@@ -215,7 +215,7 @@ Ext.define('PBS.TapeManagement.DriveStatus', {
 	    handler: 'format',
 	    iconCls: 'fa fa-trash-o',
 	    dangerous: true,
-	    confirmMsg: gettext('Are you sure you want to erase the inserted tape?'),
+	    confirmMsg: gettext('Are you sure you want to format the inserted tape?'),
 	    disabled: true,
 	    bind: {
 		disabled: '{!online}',
diff --git a/www/tape/TapeInventory.js b/www/tape/TapeInventory.js
index 555445ff..749a16c2 100644
--- a/www/tape/TapeInventory.js
+++ b/www/tape/TapeInventory.js
@@ -36,7 +36,7 @@ Ext.define('PBS.TapeManagement.TapeInventory', {
 	    Ext.create('PBS.TapeManagement.LabelMediaWindow').show();
 	},
 
-	erase: function() {
+	format: function() {
 	    let me = this;
 	    let view = me.getView();
 	    let selection = view.getSelection();
@@ -202,9 +202,9 @@ Ext.define('PBS.TapeManagement.TapeInventory', {
 	},
 	{
 	    xtype: 'proxmoxButton',
-	    text: gettext('Erase'),
+	    text: gettext('Format'),
 	    disabled: true,
-	    handler: 'erase',
+	    handler: 'format',
 	},
     ],
 
diff --git a/www/tape/window/Erase.js b/www/tape/window/Erase.js
index 8b166d30..b15b297d 100644
--- a/www/tape/window/Erase.js
+++ b/www/tape/window/Erase.js
@@ -11,7 +11,7 @@ Ext.define('PBS.TapeManagement.EraseWindow', {
 	return {
 	    singleDrive: me.singleDrive,
 	    hasSingleDrive: !!me.singleDrive,
-	    warning: Ext.String.format(gettext("Are you sure you want to erase tape '{0}' ?"), me.label),
+	    warning: Ext.String.format(gettext("Are you sure you want to format tape '{0}' ?"), me.label),
 	};
     },
 
-- 
2.20.1