Skip to content

Commit c1e889a

Browse files
authored
INTLY-3286: Add os4 integreatly services links in the landing page (#512)
* display installed os4 integreatly services in the applications section on the landing page * bump webapp version to 2.18.9
1 parent 164b132 commit c1e889a

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "integreatly-web-app",
3-
"version": "2.18.8",
3+
"version": "2.18.9",
44
"private": true,
55
"proxy": "http://localhost:5001/",
66
"dependencies": {

server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,8 @@ function getConfigData(req) {
658658
clusterType: '${process.env.CLUSTER_TYPE || ''}',
659659
optionalWatchServices: ${JSON.stringify(arrayFromString(process.env.OPTIONAL_WATCH_SERVICES || '', ','))},
660660
optionalProvisionServices: ${JSON.stringify(arrayFromString(process.env.OPTIONAL_PROVISION_SERVICES || '', ','))},
661-
openshiftVersion: ${openshiftVersion}
661+
openshiftVersion: ${openshiftVersion},
662+
provisionedServices: ${process.env.INSTALLED_SERVICES}
662663
};`;
663664
}
664665

src/services/middlewareServices.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
} from '../common/openshiftResourceDefinitions';
2424

2525
import productDetails from '../product-info';
26-
import { SERVICE_TYPES } from '../redux/constants/middlewareConstants';
26+
import { SERVICE_TYPES, SERVICE_STATUSES } from '../redux/constants/middlewareConstants';
2727
import { watchAMQOnline } from './amqOnlineServices';
2828
import { provisionFuseOnlineV4 } from './fuseOnlineServices';
2929

@@ -124,6 +124,8 @@ const mockMiddlewareServices = (dispatch, mockData) => {
124124
*/
125125
const manageServicesV4 = (dispatch, user, manifest) => {
126126
const toProvision = manifest.servicesToProvision || getServicesToProvision();
127+
const { provisionedServices = {} } = window.OPENSHIFT_CONFIG || {};
128+
toProvision.push(...Object.keys(provisionedServices));
127129
// Ensure the app knows the current user if it doesn't already.
128130
dispatch({
129131
type: FULFILLED_ACTION(middlewareTypes.GET_PROVISIONING_USER),
@@ -147,6 +149,19 @@ const manageServicesV4 = (dispatch, user, manifest) => {
147149
if (svcName === DEFAULT_SERVICES.FUSE) {
148150
console.log(`Resolving fuse online with user ${user.username} in namespace ${nsName}`);
149151
acc.push(provisionFuseOnlineV4(dispatch, user.username, nsName));
152+
} else {
153+
const { Host } = provisionedServices[svcName];
154+
acc.push(
155+
Object.assign(
156+
{},
157+
{
158+
name: svcName,
159+
status: SERVICE_STATUSES.PROVISIONED,
160+
type: SERVICE_TYPES.PROVISIONED_SERVICE,
161+
url: Host
162+
}
163+
)
164+
);
150165
}
151166
return acc;
152167
}, []);

0 commit comments

Comments
 (0)