From b8294e7879d7b1037ab82cb923ef28c2014aab9f Mon Sep 17 00:00:00 2001 From: Thomas Lavocat Date: Wed, 30 Oct 2024 11:09:42 +0100 Subject: [PATCH] Revert "[#293] Overhaul the integration of the broker edition form within OpenShift" This reverts commit f13f127617a621a24b908dbc1c6a1a25fd517be5. --- console-extensions.json | 6 ++---- src/brokers/update-broker/UpdateBroker.container.tsx | 9 ++------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/console-extensions.json b/console-extensions.json index a7703220..caf9125a 100644 --- a/console-extensions.json +++ b/console-extensions.json @@ -18,12 +18,10 @@ { "type": "console.page/route", "properties": { - "exact": false, + "exact": true, "path": [ "/k8s/ns/:ns/edit-broker/:name", - "/k8s/all-namespaces/edit-broker/:name", - "/k8s/ns/:ns/broker.amq.io~v1beta1~ActiveMQArtemis/:name", - "/k8s/ns/:ns/clusterserviceversions/:operator/broker.amq.io~v1beta1~ActiveMQArtemis/:name" + "/k8s/all-namespaces/edit-broker/:name" ], "component": { "$codeRef": "UpdateBrokerContainer.UpdateBrokerPage" } } diff --git a/src/brokers/update-broker/UpdateBroker.container.tsx b/src/brokers/update-broker/UpdateBroker.container.tsx index 813c1ac3..03ffadb7 100644 --- a/src/brokers/update-broker/UpdateBroker.container.tsx +++ b/src/brokers/update-broker/UpdateBroker.container.tsx @@ -29,15 +29,10 @@ export const UpdateBrokerPage: FC = () => { const [hasBrokerUpdated, setHasBrokerUpdated] = useState(false); const [alert, setAlert] = useState(''); const params = new URLSearchParams(location.search); - const returnUrl = params.get('returnUrl'); + const returnUrl = params.get('returnUrl') || '/k8s/all-namespaces/brokers'; const handleRedirect = () => { - if (returnUrl) { - navigate(returnUrl); - } else { - navigate(-1); - } + navigate(returnUrl); }; - const k8sUpdateBroker = (content: BrokerCR) => { k8sUpdate({ model: AMQBrokerModel,