[pbs-devel] [PATCH proxmox-backup] ui: tape: rename erase to format

Dominik Csapak d.csapak at proxmox.com
Wed Apr 14 12:21:37 CEST 2021


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

Signed-off-by: Dominik Csapak <d.csapak at 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






More information about the pbs-devel mailing list