Skip to content

Commit f9c4c7c

Browse files
authored
ensure amq online url points to the parent console instead of address space on os3 (#583)
1 parent 7bd203d commit f9c4c7c

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/common/serviceInstanceHelpers.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,13 @@ const getDashboardUrl = svc => {
123123
}
124124

125125
const { status, metadata } = svc;
126-
if (status.dashboardURL) {
126+
// Ensure AMQ online console link points to the 'parent' amq console and not to an address space. This should only be applied for OS3
127+
if (
128+
window.OPENSHIFT_CONFIG.openshiftVersion === 3 &&
129+
svc.spec.clusterServiceClassExternalName === DEFAULT_SERVICES.ENMASSE
130+
) {
131+
return window.OPENSHIFT_CONFIG.provisionedServices[DEFAULT_SERVICES.ENMASSE].Host;
132+
} else if (status.dashboardURL) {
127133
return status.dashboardURL;
128134
} else if (metadata.annotations && metadata.annotations['integreatly/dashboard-url']) {
129135
return metadata.annotations['integreatly/dashboard-url'];

src/components/installedAppsView/InstalledAppsView.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
import { ChartPieIcon, ErrorCircleOIcon, HelpIcon, OnRunningIcon, OffIcon } from '@patternfly/react-icons';
1717
import { getProductDetails, getServiceSortOrder } from '../../services/middlewareServices';
1818
import { SERVICE_STATUSES, SERVICE_TYPES } from '../../redux/constants/middlewareConstants';
19-
import { DEFAULT_SERVICES } from '../../common/serviceInstanceHelpers';
19+
import { DEFAULT_SERVICES, getDashboardUrl } from '../../common/serviceInstanceHelpers';
2020
import { getWorkshopUrl, isWorkshopInstallation } from '../../common/docsHelpers';
2121

2222
class InstalledAppsView extends React.Component {
@@ -121,6 +121,14 @@ class InstalledAppsView extends React.Component {
121121
if (app.type === SERVICE_TYPES.PROVISIONED_SERVICE) {
122122
return app.url;
123123
}
124+
// Ensure AMQ online console link points to the 'parent' amq console and not to an address space. This should only be applied for OS3
125+
if (
126+
window.OPENSHIFT_CONFIG.openshiftVersion === 3 &&
127+
app.spec &&
128+
app.spec.clusterServiceClassExternalName === DEFAULT_SERVICES.ENMASSE
129+
) {
130+
return getDashboardUrl(app);
131+
}
124132
if (app.status.dashboardURL) {
125133
return app.status.dashboardURL;
126134
}

0 commit comments

Comments
 (0)