summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/services/config.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/ng2/services/config.service.ts')
-rw-r--r--catalog-ui/src/app/ng2/services/config.service.ts16
1 files changed, 10 insertions, 6 deletions
diff --git a/catalog-ui/src/app/ng2/services/config.service.ts b/catalog-ui/src/app/ng2/services/config.service.ts
index 3e6e667285..a9a4e86a55 100644
--- a/catalog-ui/src/app/ng2/services/config.service.ts
+++ b/catalog-ui/src/app/ng2/services/config.service.ts
@@ -72,15 +72,19 @@ export class ConfigService {
loadPluginsConfiguration(): Promise<PluginsConfiguration> {
let url:string = this.api.no_proxy_root + this.api.GET_plugins_configuration;
let promise: Promise<any> = this.http.get(url).map((res: Response) => res.json()).toPromise();
- promise.then((pluginsData: Plugins) => {
- PluginsConfiguration.plugins = pluginsData;
- }).catch((ex) => {
- console.error("Error loading plugins configuration from BE", ex);
+ return new Promise<PluginsConfiguration>((resolve) => {
+ promise.then((pluginsData: Plugins) => {
+ PluginsConfiguration.plugins = pluginsData;
+ console.log('RESOLVED PLUGINS!!!');
+ resolve();
+ }).catch((ex) => {
+ console.error("Error loading plugins configuration from BE", ex);
- PluginsConfiguration.plugins = [] as Plugins;
+ PluginsConfiguration.plugins = [] as Plugins;
+ });
});
- return promise;
+ // return promise;
}
}