Skip to content

Commit

Permalink
[#293] Overhaul the integration of the broker edition form within Ope…
Browse files Browse the repository at this point in the history
…nShift

Added integration of our custom broker-edition form within OpenShift. It allows users
to edit brokers from multiple locations, such as through the OpenShift search results
or from the Installed Operators section.
Users can now utilize our custom broker-edition form to edit brokers in both the instances.
and also updated redirect paths to points to the previous location.
  • Loading branch information
Msarawan authored and gaohoward committed Oct 25, 2024
1 parent 6fd1650 commit f13f127
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 4 additions & 2 deletions console-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
{
"type": "console.page/route",
"properties": {
"exact": true,
"exact": false,
"path": [
"/k8s/ns/:ns/edit-broker/:name",
"/k8s/all-namespaces/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"
],
"component": { "$codeRef": "UpdateBrokerContainer.UpdateBrokerPage" }
}
Expand Down
9 changes: 7 additions & 2 deletions src/brokers/update-broker/UpdateBroker.container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,15 @@ export const UpdateBrokerPage: FC = () => {
const [hasBrokerUpdated, setHasBrokerUpdated] = useState(false);
const [alert, setAlert] = useState('');
const params = new URLSearchParams(location.search);
const returnUrl = params.get('returnUrl') || '/k8s/all-namespaces/brokers';
const returnUrl = params.get('returnUrl');
const handleRedirect = () => {
navigate(returnUrl);
if (returnUrl) {
navigate(returnUrl);
} else {
navigate(-1);
}
};

const k8sUpdateBroker = (content: BrokerCR) => {
k8sUpdate({
model: AMQBrokerModel,
Expand Down

0 comments on commit f13f127

Please sign in to comment.