public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] applied: [PATCH] ui: ceph fs: fix overriding renderer in controller
@ 2021-12-10 12:26 Thomas Lamprecht
  0 siblings, 0 replies; only message in thread
From: Thomas Lamprecht @ 2021-12-10 12:26 UTC (permalink / raw)
  To: pve-devel

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@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





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-10 12:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-10 12:26 [pve-devel] applied: [PATCH] ui: ceph fs: fix overriding renderer in controller Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal