diff options
Diffstat (limited to 'catalog-ui/src/app/services')
-rw-r--r-- | catalog-ui/src/app/services/onboarding-service.ts | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/catalog-ui/src/app/services/onboarding-service.ts b/catalog-ui/src/app/services/onboarding-service.ts index db6c72699a..3dd7269326 100644 --- a/catalog-ui/src/app/services/onboarding-service.ts +++ b/catalog-ui/src/app/services/onboarding-service.ts @@ -44,11 +44,21 @@ export class OnboardingService implements IOnboardingService { this.api = sdcConfig.api; } - getOnboardingComponents = ():ng.IPromise<Array<IComponent>> => { - let defer = this.$q.defer<Array<IComponent>>(); + getOnboardingVSPs = ():ng.IPromise<Array<ICsarComponent>> =>{ + let defer = this.$q.defer<Array<ICsarComponent>>(); this.$http.get(this.api.GET_onboarding) .then((response:any) => { - let onboardingComponents:Array<ICsarComponent> = response.data.results; + defer.resolve(response.data.results); + },(response) => { + defer.reject(response); + }); + + return defer.promise; + }; + + getOnboardingComponents = ():ng.IPromise<Array<IComponent>> => { + let defer = this.$q.defer<Array<IComponent>>(); + this.getOnboardingVSPs().then((onboardingComponents:Array<ICsarComponent>) => { let componentsList:Array<IComponent> = new Array(); onboardingComponents.forEach((obc:ICsarComponent) => { |