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/11/13 12:18:21 UTC
[incubator-dlab] 01/01: [DLAB-1213]: added endpoint for admin
project management
This is an automated email from the ASF dual-hosted git repository.
ankovalyshyn pushed a commit to branch DLAB-1213
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit f79861a2a04fe2616dc473a26f4a32658bf1e113
Author: Andriana Kovalyshyn <An...@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-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org