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

[incubator-dlab] 01/01: [DLAB-1192] Changed – info message while connecting/disconnecting endpoint

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

ofuks pushed a commit to branch DLAB-1192
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 30191da86a8c5d963a8c3c2492949c75733f7576
Author: ofuks <ol...@gmail.com>
AuthorDate: Wed Oct 9 15:22:24 2019 +0300

    [DLAB-1192] Changed – info message while connecting/disconnecting endpoint
---
 .../src/app/administration/project/project.component.ts      | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts
index b370d52..9c7dae6 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts
@@ -133,7 +133,7 @@ export class ProjectComponent implements OnInit, OnDestroy {
   private toggleStatusRequest(data, action) {
     this.projectService.toggleProjectStatus(data, action).subscribe(() => {
       this.refreshGrid();
-      this.toastr.success(`Endpoint ${action} is in progress!`, 'Processing!');
+      this.toastr.success(`Endpoint ${this.toEndpointAction(action)} is in progress!`, 'Processing!');
     }, error => this.toastr.error(error.message, 'Oops!'));
   }
 
@@ -141,6 +141,16 @@ export class ProjectComponent implements OnInit, OnDestroy {
     this.healthStatusService.getEnvironmentHealthStatus()
       .subscribe((result: any) => this.healthStatus = result);
   }
+
+  private toEndpointAction(action) {
+    if (action === 'start') {
+      return 'connect';
+    } else if (action === 'stop') {
+      return 'disconnect';
+    } else {
+      return action;
+    }
+  }
 }
 
 @Component({


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