@@ -23,7 +23,7 @@ import {
2323} from '../common/openshiftResourceDefinitions' ;
2424
2525import productDetails from '../product-info' ;
26- import { SERVICE_TYPES } from '../redux/constants/middlewareConstants' ;
26+ import { SERVICE_TYPES , SERVICE_STATUSES } from '../redux/constants/middlewareConstants' ;
2727import { watchAMQOnline } from './amqOnlineServices' ;
2828import { provisionFuseOnlineV4 } from './fuseOnlineServices' ;
2929
@@ -124,6 +124,8 @@ const mockMiddlewareServices = (dispatch, mockData) => {
124124 */
125125const 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