public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] applied: [PATCH] ui: ceph fs: fix overriding renderer in controller
Date: Fri, 10 Dec 2021 13:26:10 +0100	[thread overview]
Message-ID: <20211210122610.3041008-1-t.lamprecht@proxmox.com> (raw)

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





                 reply	other threads:[~2021-12-10 12:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211210122610.3041008-1-t.lamprecht@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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