From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 7B184840B6 for ; Fri, 10 Dec 2021 13:26:15 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 713412584D for ; Fri, 10 Dec 2021 13:26:15 +0100 (CET) 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 0612525844 for ; Fri, 10 Dec 2021 13:26:15 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id CC32745126 for ; Fri, 10 Dec 2021 13:26:14 +0100 (CET) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com Date: Fri, 10 Dec 2021 13:26:10 +0100 Message-Id: <20211210122610.3041008-1-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.084 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% 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: [pve-devel] applied: [PATCH] ui: ceph fs: fix overriding renderer in controller X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Dec 2021 12:26:15 -0000 Overriding the controller render_status must be done in an derived class, not as config for the instantiated object. While it worked it really isn't idiomatic and ExtJS complained with an error in debug mode, which broke the whole UI then. Signed-off-by: Thomas Lamprecht --- www/manager6/ceph/ServiceList.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/www/manager6/ceph/ServiceList.js b/www/manager6/ceph/ServiceList.js index f2b2cbbd..9298974e 100644 --- a/www/manager6/ceph/ServiceList.js +++ b/www/manager6/ceph/ServiceList.js @@ -360,13 +360,19 @@ Ext.define('PVE.node.CephServiceList', { }); }); +Ext.define('PVE.node.CephMDSServiceController', { + extend: 'PVE.node.CephServiceController', + alias: 'controller.CephServiceMDSList', + + render_status: (value, mD, rec) => rec.data.fs_name ? `${value} (${rec.data.fs_name})` : value, +}); + Ext.define('PVE.node.CephMDSList', { extend: 'PVE.node.CephServiceList', xtype: 'pveNodeCephMDSList', controller: { - type: 'CephServiceList', - render_status: (value, mD, rec) => rec.data.fs_name ? `${value} (${rec.data.fs_name})` : value, + type: 'CephServiceMDSList', }, }); -- 2.30.2