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,