[pve-devel] [PATCH manager 2/2] ui: ceph: adapt urls to new ceph/pool endpoint

Aaron Lauterer a.lauterer at proxmox.com
Fri Dec 9 13:58:44 CET 2022


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






More information about the pve-devel mailing list