This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 0f462e3e1bf7ded0a81443f89ba51614b2963dd7 Author: Andriana Kovalyshyn <andriana_kovalys...@epam.com> AuthorDate: Wed Nov 13 14:18:08 2019 +0200 [DLAB-1213]: added endpoint for admin project management --- .../src/app/administration/management/management.component.ts | 2 +- .../resources/webapp/src/app/core/services/project.service.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/management/management.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/management/management.component.ts index 0cef57e..8e8b0b8 100644 --- a/services/self-service/src/main/resources/webapp/src/app/administration/management/management.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/administration/management/management.component.ts @@ -128,7 +128,7 @@ export class ManagementComponent implements OnInit { manageEnvironment(event: { action: string, project: any }) { if (event.action === 'stop') - this.projectService.toggleProjectStatus(event.project, event.action) + this.projectService.stopProjectAction(event.project.project_name) .subscribe(() => this.handleSuccessAction(event.action), error => this.toastr.error(error.message, 'Oops!')); if (event.action === 'terminate') diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts index bc06862..d623f52 100644 --- a/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts +++ b/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts @@ -78,6 +78,15 @@ export class ProjectService { catchError(ErrorUtils.handleServiceError)); } + public stopProjectAction(data): Observable<{}> { + const url = `/managing/stop/${data}`; + return this.applicationServiceFacade + .buildToggleProjectStatus(url, data) + .pipe( + map(response => response), + catchError(ErrorUtils.handleServiceError)); + } + public updateProjectsBudget(data): Observable<{}> { const url = '/budget'; return this.applicationServiceFacade --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org