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/13 15:20:31 UTC
[incubator-dlab] 01/03: [DLAB-805]: adapt templates request with
project parameter
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 e7c6ffd43ee77764e95af9f508ecdf84f45032ec
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Thu Jun 13 16:39:37 2019 +0300
[DLAB-805]: adapt templates request with project parameter
---
.../app/core/services/applicationServiceFacade.service.ts | 14 ++++----------
.../webapp/src/app/core/services/userResource.service.ts | 7 ++++---
2 files changed, 8 insertions(+), 13 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 9af3093..4435324 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
@@ -40,7 +40,7 @@ export class ApplicationServiceFacade {
private static readonly EXPLORATORY_ENVIRONMENT = 'exploratory_environment';
private static readonly IMAGE = 'image';
private static readonly SCHEDULER = 'scheduler';
- private static readonly EXPLORATORY_ENVIRONMENT_TEMPLATES = 'exploratory_templates';
+ private static readonly TEMPLATES = 'templates';
private static readonly COMPUTATIONAL_RESOURCES_TEMLATES = 'computational_templates';
private static readonly COMPUTATIONAL_RESOURCES = 'computational_resources';
private static readonly COMPUTATIONAL_RESOURCES_DATAENGINE = 'computational_resources_dataengine';
@@ -152,15 +152,9 @@ export class ApplicationServiceFacade {
null);
}
- public buildGetExploratoryEnvironmentTemplatesRequest(params): Observable<any> {
+ public buildGetTemplatesRequest(params): Observable<any> {
return this.buildRequest(RequestMethod.Get,
- this.requestRegistry.Item(ApplicationServiceFacade.EXPLORATORY_ENVIRONMENT_TEMPLATES) + params,
- null);
- }
-
- public buildGetComputationalResourcesTemplatesRequest(): Observable<any> {
- return this.buildRequest(RequestMethod.Get,
- this.requestRegistry.Item(ApplicationServiceFacade.COMPUTATIONAL_RESOURCES_TEMLATES),
+ this.requestRegistry.Item(ApplicationServiceFacade.TEMPLATES) + params,
null);
}
@@ -577,7 +571,7 @@ export class ApplicationServiceFacade {
'/api/infrastructure/info');
this.requestRegistry.Add(ApplicationServiceFacade.EXPLORATORY_ENVIRONMENT,
'/api/infrastructure_provision/exploratory_environment');
- this.requestRegistry.Add(ApplicationServiceFacade.EXPLORATORY_ENVIRONMENT_TEMPLATES,
+ this.requestRegistry.Add(ApplicationServiceFacade.TEMPLATES,
'/api/infrastructure_templates');
this.requestRegistry.Add(ApplicationServiceFacade.IMAGE,
'/api/infrastructure_provision/exploratory_environment/image');
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 48739bd..b07c2f1 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
@@ -31,15 +31,16 @@ export class UserResourceService {
public getExploratoryTemplates(project): Observable<any> {
const url = `/${ project }/exploratory_templates`;
return this.applicationServiceFacade
- .buildGetExploratoryEnvironmentTemplatesRequest(url)
+ .buildGetTemplatesRequest(url)
.pipe(
map(response => response),
catchError(ErrorUtils.handleServiceError));
}
- public getComputationalResourcesTemplates(): Observable<any> {
+ public getComputationalTemplates(project): Observable<any> {
+ const url = `/${ project }/computational_templates`;
return this.applicationServiceFacade
- .buildGetComputationalResourcesTemplatesRequest()
+ .buildGetTemplatesRequest(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