You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by an...@apache.org on 2019/06/03 10:52:06 UTC

[incubator-dlab] 03/11: [DLAB-631]: added endpoint fixes to templates list

This is an automated email from the ASF dual-hosted git repository.

ankovalyshyn pushed a commit to branch feature/projects
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 0a757c91fb2cb6060fbe8cd778735218afa47923
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Fri May 31 13:55:48 2019 +0300

    [DLAB-631]: added endpoint fixes to templates list
---
 .../src/app/core/services/applicationServiceFacade.service.ts       | 6 +++---
 .../resources/webapp/src/app/core/services/userResource.service.ts  | 5 +++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts
index 4f7330d..9af3093 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts
@@ -152,9 +152,9 @@ export class ApplicationServiceFacade {
       null);
   }
 
-  public buildGetExploratoryEnvironmentTemplatesRequest(): Observable<any> {
+  public buildGetExploratoryEnvironmentTemplatesRequest(params): Observable<any> {
     return this.buildRequest(RequestMethod.Get,
-      this.requestRegistry.Item(ApplicationServiceFacade.EXPLORATORY_ENVIRONMENT_TEMPLATES),
+      this.requestRegistry.Item(ApplicationServiceFacade.EXPLORATORY_ENVIRONMENT_TEMPLATES) + params,
       null);
   }
 
@@ -578,7 +578,7 @@ export class ApplicationServiceFacade {
     this.requestRegistry.Add(ApplicationServiceFacade.EXPLORATORY_ENVIRONMENT,
       '/api/infrastructure_provision/exploratory_environment');
     this.requestRegistry.Add(ApplicationServiceFacade.EXPLORATORY_ENVIRONMENT_TEMPLATES,
-      '/api/infrastructure_templates/exploratory_templates');
+      '/api/infrastructure_templates');
     this.requestRegistry.Add(ApplicationServiceFacade.IMAGE,
       '/api/infrastructure_provision/exploratory_environment/image');
     this.requestRegistry.Add(ApplicationServiceFacade.SCHEDULER,
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/userResource.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/userResource.service.ts
index 468ae5a..48739bd 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/userResource.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/userResource.service.ts
@@ -28,9 +28,10 @@ import { ApplicationServiceFacade } from './applicationServiceFacade.service';
 export class UserResourceService {
   constructor(private applicationServiceFacade: ApplicationServiceFacade) { }
 
-  public getExploratoryEnvironmentTemplates(): Observable<any> {
+  public getExploratoryTemplates(project): Observable<any> {
+    const url = `/${ project }/exploratory_templates`;
     return this.applicationServiceFacade
-      .buildGetExploratoryEnvironmentTemplatesRequest()
+      .buildGetExploratoryEnvironmentTemplatesRequest(url)
       .pipe(
         map(response => response),
         catchError(ErrorUtils.handleServiceError));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org