public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 09/11] ui: ceph/fs: allow creating multiple cephfs
Date: Tue, 19 Oct 2021 11:33:51 +0200	[thread overview]
Message-ID: <20211019093353.2451987-11-d.csapak@proxmox.com> (raw)
In-Reply-To: <20211019093353.2451987-1-d.csapak@proxmox.com>

but only if there are any standby mds

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/manager6/ceph/FS.js | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/www/manager6/ceph/FS.js b/www/manager6/ceph/FS.js
index c620ec6e..a3fa3672 100644
--- a/www/manager6/ceph/FS.js
+++ b/www/manager6/ceph/FS.js
@@ -86,12 +86,11 @@ Ext.define('PVE.NodeCephFSPanel', {
     viewModel: {
 	parent: null,
 	data: {
-	    cephfsConfigured: false,
 	    mdsCount: 0,
 	},
 	formulas: {
 	    canCreateFS: function(get) {
-		return !get('cephfsConfigured') && get('mdsCount') > 0;
+		return get('mdsCount') > 0;
 	    },
 	},
     },
@@ -125,7 +124,6 @@ Ext.define('PVE.NodeCephFSPanel', {
 		    }));
 		    // manages the "install ceph?" overlay
 		    PVE.Utils.monitor_ceph_installed(view, view.rstore, view.nodename, true);
-		    view.rstore.on('load', this.onLoad, this);
 		    view.on('destroy', () => view.rstore.stopUpdate());
 		},
 
@@ -141,14 +139,6 @@ Ext.define('PVE.NodeCephFSPanel', {
 		    });
 		},
 
-		onLoad: function(store, records, success) {
-		    var vm = this.getViewModel();
-		    if (!(success && records && records.length > 0)) {
-			vm.set('cephfsConfigured', false);
-			return;
-		    }
-		    vm.set('cephfsConfigured', true);
-		},
 	    },
 	    tbar: [
 		{
@@ -156,7 +146,6 @@ Ext.define('PVE.NodeCephFSPanel', {
 		    reference: 'createButton',
 		    handler: 'onCreate',
 		    bind: {
-			// only one CephFS per Ceph cluster makes sense for now
 			disabled: '{!canCreateFS}',
 		    },
 		},
@@ -193,7 +182,13 @@ Ext.define('PVE.NodeCephFSPanel', {
 		    vm.set('mdsCount', 0);
 		    return;
 		}
-		vm.set('mdsCount', records.length);
+		let count = 0;
+		for (const mds of records) {
+		    if (mds.data.state === 'up:standby') {
+			count++;
+		    }
+		}
+		vm.set('mdsCount', count);
 	    },
 	    cbind: {
 		nodename: '{nodename}',
-- 
2.30.2





  parent reply	other threads:[~2021-10-19  9:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19  9:33 [pve-devel] [PATCH storage/manager] fix #3616: support multiple ceph filesystems Dominik Csapak
2021-10-19  9:33 ` [pve-devel] [PATCH storage 1/1] cephfs: add support for " Dominik Csapak
2021-10-19  9:33 ` [pve-devel] [PATCH manager 01/11] api: ceph-mds: get mds state when multple ceph filesystems exist Dominik Csapak
2021-10-19  9:33 ` [pve-devel] [PATCH manager 02/11] ui: ceph: catch missing version for service list Dominik Csapak
2021-10-19  9:33 ` [pve-devel] [PATCH manager 03/11] api: cephfs: refactor {ls, create}_fs Dominik Csapak
2021-10-19  9:33 ` [pve-devel] [PATCH manager 04/11] api: cephfs: more checks on fs create Dominik Csapak
2021-10-19  9:33 ` [pve-devel] [PATCH manager 05/11] ui: ceph/ServiceList: refactor controller out Dominik Csapak
2021-10-19  9:33 ` [pve-devel] [PATCH manager 06/11] ui: ceph/fs: show fs for active mds Dominik Csapak
2021-10-19  9:33 ` [pve-devel] [PATCH manager 07/11] api: cephfs: add 'fs-name' for cephfs storage Dominik Csapak
2021-10-19  9:33 ` [pve-devel] [PATCH manager 08/11] ui: storage/cephfs: make ceph fs selectable Dominik Csapak
2021-10-19  9:33 ` Dominik Csapak [this message]
2021-10-19  9:33 ` [pve-devel] [PATCH manager 10/11] api: cephfs: add destroy cephfs api call Dominik Csapak
2021-10-19  9:33 ` [pve-devel] [PATCH manager 11/11] ui: ceph/fs: allow destroying cephfs Dominik Csapak
2021-10-20 14:40 ` [pve-devel] [PATCH storage/manager] fix #3616: support multiple ceph filesystems Aaron Lauterer

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=20211019093353.2451987-11-d.csapak@proxmox.com \
    --to=d.csapak@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