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 A6F4C72BDE
 for <pbs-devel@lists.proxmox.com>; Wed, 26 May 2021 11:13:08 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 380E9F234
 for <pbs-devel@lists.proxmox.com>; Wed, 26 May 2021 11:12:10 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (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 firstgate.proxmox.com (Proxmox) with ESMTPS id 78709F1D7
 for <pbs-devel@lists.proxmox.com>; Wed, 26 May 2021 11:12:08 +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 52B8446655
 for <pbs-devel@lists.proxmox.com>; Wed, 26 May 2021 11:12:08 +0200 (CEST)
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Date: Wed, 26 May 2021 11:12:05 +0200
Message-Id: <20210526091206.21979-9-d.csapak@proxmox.com>
X-Mailer: git-send-email 2.20.1
In-Reply-To: <20210526091206.21979-1-d.csapak@proxmox.com>
References: <20210526091206.21979-1-d.csapak@proxmox.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.036 Adjusted score from AWL reputation of From: address
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: [pbs-devel] [PATCH proxmox-backup 8/9] ui: use isActionDisabled
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, 26 May 2021 09:13:08 -0000

isDisabled is deprecated for actions in actioncolumns
(it produces a warning for now)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/datastore/Content.js   | 12 ++++++------
 www/tape/BackupOverview.js |  2 +-
 www/tape/ChangerStatus.js  | 18 +++++++++---------
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/www/datastore/Content.js b/www/datastore/Content.js
index 5be5bb93..101763aa 100644
--- a/www/datastore/Content.js
+++ b/www/datastore/Content.js
@@ -632,19 +632,19 @@ Ext.define('PBS.DataStoreContent', {
 		    handler: 'onVerify',
 		    getTip: (v, m, rec) => Ext.String.format(gettext("Verify '{0}'"), v),
 		    getClass: (v, m, rec) => rec.data.leaf ? 'pmx-hidden' : 'pve-icon-verify-lettering',
-		    isDisabled: (v, r, c, i, rec) => !!rec.data.leaf,
+		    isActionDisabled: (v, r, c, i, rec) => !!rec.data.leaf,
                 },
                 {
 		    handler: 'onChangeOwner',
 		    getClass: (v, m, rec) => rec.parentNode.id ==='root' ? 'fa fa-user' : 'pmx-hidden',
 		    getTip: (v, m, rec) => Ext.String.format(gettext("Change owner of '{0}'"), v),
-		    isDisabled: (v, r, c, i, rec) => rec.parentNode.id !=='root',
+		    isActionDisabled: (v, r, c, i, rec) => rec.parentNode.id !=='root',
                 },
 		{
 		    handler: 'onPrune',
 		    getTip: (v, m, rec) => Ext.String.format(gettext("Prune '{0}'"), v),
 		    getClass: (v, m, rec) => rec.parentNode.id ==='root' ? 'fa fa-scissors' : 'pmx-hidden',
-		    isDisabled: (v, r, c, i, rec) => rec.parentNode.id !=='root',
+		    isActionDisabled: (v, r, c, i, rec) => rec.parentNode.id !=='root',
 		},
 		{
 		    handler: 'onForget',
@@ -652,13 +652,13 @@ Ext.define('PBS.DataStoreContent', {
 			? Ext.String.format(gettext("Permanently forget snapshot '{0}'"), v)
 			: Ext.String.format(gettext("Permanently forget group '{0}'"), v),
 		    getClass: (v, m, rec) => !rec.data.leaf ? 'fa critical fa-trash-o' : 'pmx-hidden',
-		    isDisabled: (v, r, c, i, rec) => !!rec.data.leaf,
+		    isActionDisabled: (v, r, c, i, rec) => !!rec.data.leaf,
 		},
 		{
 		    handler: 'downloadFile',
 		    getTip: (v, m, rec) => Ext.String.format(gettext("Download '{0}'"), v),
 		    getClass: (v, m, rec) => rec.data.leaf && rec.data.filename ? 'fa fa-download' : 'pmx-hidden',
-		    isDisabled: (v, r, c, i, rec) => !rec.data.leaf || !rec.data.filename || rec.data['crypt-mode'] > 2,
+		    isActionDisabled: (v, r, c, i, rec) => !rec.data.leaf || !rec.data.filename || rec.data['crypt-mode'] > 2,
 		},
 		{
 		    handler: 'openPxarBrowser',
@@ -670,7 +670,7 @@ Ext.define('PBS.DataStoreContent', {
 			}
 			return 'pmx-hidden';
 		    },
-		    isDisabled: (v, r, c, i, rec) => {
+		    isActionDisabled: (v, r, c, i, rec) => {
 			let data = rec.data;
 			return !(data.leaf &&
 			    data.filename &&
diff --git a/www/tape/BackupOverview.js b/www/tape/BackupOverview.js
index 1ccbb7f4..92d5cea4 100644
--- a/www/tape/BackupOverview.js
+++ b/www/tape/BackupOverview.js
@@ -272,7 +272,7 @@ Ext.define('PBS.TapeManagement.BackupOverview', {
 		    handler: 'restoreBackups',
 		    tooltip: gettext('Restore'),
 		    getClass: (v, m, rec) => rec.data.restore ? 'fa fa-fw fa-undo' : 'pmx-hidden',
-		    isDisabled: (v, r, c, i, rec) => !rec.data.restore,
+		    isActionDisabled: (v, r, c, i, rec) => !rec.data.restore,
                 },
 	    ],
 	},
diff --git a/www/tape/ChangerStatus.js b/www/tape/ChangerStatus.js
index 0fad11b3..ef9f5732 100644
--- a/www/tape/ChangerStatus.js
+++ b/www/tape/ChangerStatus.js
@@ -747,19 +747,19 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
 				    iconCls: 'fa fa-rotate-90 fa-exchange',
 				    handler: 'slotTransfer',
 				    tooltip: gettext('Transfer'),
-				    isDisabled: (v, r, c, i, rec) => rec.data['is-empty'],
+				    isActionDisabled: (v, r, c, i, rec) => rec.data['is-empty'],
 				},
 				{
 				    iconCls: 'fa fa-trash-o',
 				    handler: 'format',
 				    tooltip: gettext('Format'),
-				    isDisabled: (v, r, c, i, rec) => rec.data['is-empty'],
+				    isActionDisabled: (v, r, c, i, rec) => rec.data['is-empty'],
 				},
 				{
 				    iconCls: 'fa fa-rotate-90 fa-upload',
 				    handler: 'load',
 				    tooltip: gettext('Load'),
-				    isDisabled: (v, r, c, i, rec) => rec.data['is-empty'],
+				    isActionDisabled: (v, r, c, i, rec) => rec.data['is-empty'],
 				},
 			    ],
 			},
@@ -885,31 +885,31 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
 					    iconCls: 'fa fa-rotate-270 fa-upload',
 					    handler: 'unload',
 					    tooltip: gettext('Unload'),
-					    isDisabled: (v, r, c, i, rec) => rec.data['is-empty'] || rec.data['is-blocked'],
+					    isActionDisabled: (v, r, c, i, rec) => rec.data['is-empty'] || rec.data['is-blocked'],
 					},
 					{
 					    iconCls: 'fa fa-hdd-o',
 					    handler: 'cartridgeMemory',
 					    tooltip: gettext('Cartridge Memory'),
-					    isDisabled: (v, r, c, i, rec) => rec.data['is-empty'] || rec.data['is-blocked'],
+					    isActionDisabled: (v, r, c, i, rec) => rec.data['is-empty'] || rec.data['is-blocked'],
 					},
 					{
 					    iconCls: 'fa fa-line-chart',
 					    handler: 'volumeStatistics',
 					    tooltip: gettext('Volume Statistics'),
-					    isDisabled: (v, r, c, i, rec) => rec.data['is-empty'] || rec.data['is-blocked'],
+					    isActionDisabled: (v, r, c, i, rec) => rec.data['is-empty'] || rec.data['is-blocked'],
 					},
 					{
 					    iconCls: 'fa fa-tag',
 					    handler: 'readLabel',
 					    tooltip: gettext('Read Label'),
-					    isDisabled: (v, r, c, i, rec) => rec.data['is-empty'] || rec.data['is-blocked'],
+					    isActionDisabled: (v, r, c, i, rec) => rec.data['is-empty'] || rec.data['is-blocked'],
 					},
 					{
 					    iconCls: 'fa fa-info-circle',
 					    tooltip: gettext('Status'),
 					    handler: 'status',
-					    isDisabled: (v, r, c, i, rec) => rec.data['is-blocked'],
+					    isActionDisabled: (v, r, c, i, rec) => rec.data['is-blocked'],
 					},
 				    ],
 				},
@@ -953,7 +953,7 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
 					    iconCls: 'fa fa-rotate-270 fa-upload',
 					    handler: 'importTape',
 					    tooltip: gettext('Import'),
-					    isDisabled: (v, r, c, i, rec) => rec.data['is-empty'],
+					    isActionDisabled: (v, r, c, i, rec) => rec.data['is-empty'],
 					},
 				    ],
 				    width: 80,
-- 
2.20.1