diff --git a/FUSION_CONFIG.sample.js b/FUSION_CONFIG.sample.js index 3df6aabf..f1f2d264 100644 --- a/FUSION_CONFIG.sample.js +++ b/FUSION_CONFIG.sample.js @@ -58,6 +58,11 @@ appConfig = { //eslint-disable-line // The name of your collection - defaults to Fusion 3.0 default collection collection: 'default', + // Please specify an app that you want to leverage with this UI (Fusion 4 only) + // query_app_id: '', for Fusion 3 + // query_app_id: 'appname', for Fusion 4 + query_app_id: 'default', + // Please specify a pipeline or profile that you want to leverage with this UI. query_pipeline_id: 'default', query_profile_id: 'default', diff --git a/client/assets/js/services/ConfigService.js b/client/assets/js/services/ConfigService.js index b668c155..aac3da46 100644 --- a/client/assets/js/services/ConfigService.js +++ b/client/assets/js/services/ConfigService.js @@ -17,6 +17,7 @@ collection: 'default', logo_location: 'assets/img/logo/lucidworks-white.svg', query_debug: false, + query_app_id: 'default', query_pipeline_id: 'default', query_profile_id: 'default', use_query_profile: false, @@ -85,6 +86,7 @@ getFusionUrl: getFusionUrl, getQueryProfile: getQueryProfile, getCollectionName: getCollectionName, + getAppName: getAppName, getQueryPipeline: getQueryPipeline, getLoginCredentials: getLoginCredentials, getIfQueryProfile: getIfQueryProfile, @@ -127,6 +129,10 @@ return appConfig.host + ':' + appConfig.port + '/'; } + function getAppName() { + return appConfig.query_app_id; + } + function getQueryPipeline() { return appConfig.query_pipeline_id; } diff --git a/client/assets/js/services/QueryDataService.js b/client/assets/js/services/QueryDataService.js index 910efd5f..174eaf8a 100644 --- a/client/assets/js/services/QueryDataService.js +++ b/client/assets/js/services/QueryDataService.js @@ -85,11 +85,18 @@ } function getPipelineEndpoint(pipeline, requestHandler){ - return ApiBase.getEndpoint() + 'api/apollo/query-pipelines/' + + return ApiBase.getEndpoint() + 'api/apollo/' + getApp() + 'query-pipelines/' + pipeline + '/collections/' + ConfigService.getCollectionName() + '/' + requestHandler; } + function getApp(){ + var FusionApp = ConfigService.getAppName() ; + if( FusionApp !== '') { + FusionApp = 'apps/' + FusionApp + '/' + } + return FusionApp; + } } } })();