Skip to content

Commit

Permalink
INTLY-3286: Add os4 integreatly services links in the landing page (#512
Browse files Browse the repository at this point in the history
)

* display installed os4 integreatly services in the applications section on the landing page

* bump webapp version to 2.18.9
  • Loading branch information
JameelB authored Oct 14, 2019
1 parent 164b132 commit c1e889a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "integreatly-web-app",
"version": "2.18.8",
"version": "2.18.9",
"private": true,
"proxy": "http://localhost:5001/",
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,8 @@ function getConfigData(req) {
clusterType: '${process.env.CLUSTER_TYPE || ''}',
optionalWatchServices: ${JSON.stringify(arrayFromString(process.env.OPTIONAL_WATCH_SERVICES || '', ','))},
optionalProvisionServices: ${JSON.stringify(arrayFromString(process.env.OPTIONAL_PROVISION_SERVICES || '', ','))},
openshiftVersion: ${openshiftVersion}
openshiftVersion: ${openshiftVersion},
provisionedServices: ${process.env.INSTALLED_SERVICES}
};`;
}

Expand Down
17 changes: 16 additions & 1 deletion src/services/middlewareServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
} from '../common/openshiftResourceDefinitions';

import productDetails from '../product-info';
import { SERVICE_TYPES } from '../redux/constants/middlewareConstants';
import { SERVICE_TYPES, SERVICE_STATUSES } from '../redux/constants/middlewareConstants';
import { watchAMQOnline } from './amqOnlineServices';
import { provisionFuseOnlineV4 } from './fuseOnlineServices';

Expand Down Expand Up @@ -124,6 +124,8 @@ const mockMiddlewareServices = (dispatch, mockData) => {
*/
const manageServicesV4 = (dispatch, user, manifest) => {
const toProvision = manifest.servicesToProvision || getServicesToProvision();
const { provisionedServices = {} } = window.OPENSHIFT_CONFIG || {};
toProvision.push(...Object.keys(provisionedServices));
// Ensure the app knows the current user if it doesn't already.
dispatch({
type: FULFILLED_ACTION(middlewareTypes.GET_PROVISIONING_USER),
Expand All @@ -147,6 +149,19 @@ const manageServicesV4 = (dispatch, user, manifest) => {
if (svcName === DEFAULT_SERVICES.FUSE) {
console.log(`Resolving fuse online with user ${user.username} in namespace ${nsName}`);
acc.push(provisionFuseOnlineV4(dispatch, user.username, nsName));
} else {
const { Host } = provisionedServices[svcName];
acc.push(
Object.assign(
{},
{
name: svcName,
status: SERVICE_STATUSES.PROVISIONED,
type: SERVICE_TYPES.PROVISIONED_SERVICE,
url: Host
}
)
);
}
return acc;
}, []);
Expand Down

0 comments on commit c1e889a

Please sign in to comment.