[pve-devel] applied: [PATCH] ui: ceph fs: fix overriding renderer in controller

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Dec 10 13:26:10 CET 2021


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 <t.lamprecht at proxmox.com>
---
 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





More information about the pve-devel mailing list