public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 2/2] ui: ceph: adapt urls to new ceph/pool endpoint
Date: Fri,  9 Dec 2022 13:58:44 +0100	[thread overview]
Message-ID: <20221209125844.1490407-2-a.lauterer@proxmox.com> (raw)
In-Reply-To: <20221209125844.1490407-1-a.lauterer@proxmox.com>

ceph/pools (plural) is deprecated, use the new one.
Since the details / status of a pool has been moved from previously
ceph/pools/{name} to now ceph/pool/{name}/status, we need to pass the
'loadUrl' to the edit window.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
 www/manager6/ceph/Pool.js             | 9 +++++----
 www/manager6/form/CephPoolSelector.js | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/www/manager6/ceph/Pool.js b/www/manager6/ceph/Pool.js
index a1f008d1..21fb171c 100644
--- a/www/manager6/ceph/Pool.js
+++ b/www/manager6/ceph/Pool.js
@@ -200,8 +200,9 @@ Ext.define('PVE.Ceph.PoolEdit', {
     cbind: {
 	autoLoad: get => !get('isCreate'),
 	url: get => get('isCreate')
-	    ? `/nodes/${get('nodename')}/ceph/pools`
-	    : `/nodes/${get('nodename')}/ceph/pools/${get('pool_name')}`,
+	    ? `/nodes/${get('nodename')}/ceph/pool`
+	    : `/nodes/${get('nodename')}/ceph/pool/${get('pool_name')}`,
+	loadUrl: get => `/nodes/${get('nodename')}/ceph/pool/${get('pool_name')}/status`,
 	method: get => get('isCreate') ? 'POST' : 'PUT',
     },
 
@@ -356,7 +357,7 @@ Ext.define('PVE.node.Ceph.PoolList', {
 	    model: 'ceph-pool-list',
 	    proxy: {
 		type: 'proxmox',
-		url: `/api2/json/nodes/${nodename}/ceph/pools`,
+		url: `/api2/json/nodes/${nodename}/ceph/pool`,
 	    },
 	});
 	let store = Ext.create('Proxmox.data.DiffStore', { rstore: rstore });
@@ -420,7 +421,7 @@ Ext.define('PVE.node.Ceph.PoolList', {
 			let poolName = rec.data.pool_name;
 			Ext.create('Proxmox.window.SafeDestroy', {
 			    showProgress: true,
-			    url: `/nodes/${nodename}/ceph/pools/${poolName}`,
+			    url: `/nodes/${nodename}/ceph/pool/${poolName}`,
 			    params: {
 				remove_storages: 1,
 			    },
diff --git a/www/manager6/form/CephPoolSelector.js b/www/manager6/form/CephPoolSelector.js
index e8197077..471739a9 100644
--- a/www/manager6/form/CephPoolSelector.js
+++ b/www/manager6/form/CephPoolSelector.js
@@ -26,7 +26,7 @@ Ext.define('PVE.form.CephPoolSelector', {
 	    ],
 	    proxy: {
 		type: 'proxmox',
-		url: '/api2/json/nodes/' + me.nodename + '/ceph/pools',
+		url: '/api2/json/nodes/' + me.nodename + '/ceph/pool',
 	    },
 	});
 
-- 
2.30.2





  reply	other threads:[~2022-12-09 12:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09 12:58 [pve-devel] [PATCH manager 1/2] api: ceph: deprecate pools in favor or pool Aaron Lauterer
2022-12-09 12:58 ` Aaron Lauterer [this message]
2022-12-12 10:34 ` Aaron Lauterer
2023-03-13  8:35 ` Aaron Lauterer
2023-03-20  8:31 ` Fabian Grünbichler

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=20221209125844.1490407-2-a.lauterer@proxmox.com \
    --to=a.lauterer@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