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/03/29 13:25:53 UTC

[incubator-dlab] branch DLAB-550 created (now f804563)

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

ankovalyshyn pushed a change to branch DLAB-550
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


      at f804563  [DLAB-550]: fixed Issues with merging of Health status and Environment Management pages

This branch includes the following new commits:

     new f804563  [DLAB-550]: fixed Issues with merging of Health status and Environment Management pages

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



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


[incubator-dlab] 01/01: [DLAB-550]: fixed Issues with merging of Health status and Environment Management pages

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f804563397648044e01280776efe2c37e0c4163c
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Fri Mar 29 15:25:41 2019 +0200

    [DLAB-550]: fixed Issues with merging of Health status and Environment Management pages
---
 .../app/management/management-grid/management-grid.component.html | 2 +-
 .../app/management/management-grid/management-grid.component.ts   | 8 ++++++--
 .../confirmation-dialog/confirmation-dialog.component.ts          | 7 +++++--
 .../modal-dialog/confirmation-dialog/confirmation-dialog.model.ts | 6 +++---
 4 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.html b/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.html
index 5cd939b..c129575 100644
--- a/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.html
@@ -155,7 +155,7 @@
   </table>
 </ng-template>
 
-<confirmation-dialog #confirmationDialog [manageAction]="true" (buildGrid)="buildGrid()"></confirmation-dialog>
+<confirmation-dialog #confirmationDialog [manageAction]="isAdmin" (buildGrid)="buildGrid()"></confirmation-dialog>
 <key-upload-dialog #keyReuploadDialog [primaryUploading]="false"
       (checkInfrastructureCreationProgress)="buildGrid()"
       (generateUserKey)="generateUserKey()">
diff --git a/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.ts b/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.ts
index eb3b116..bf7e257 100644
--- a/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.ts
@@ -81,8 +81,12 @@ export class ManagementGridComponent implements OnInit {
     } else {
       if (action === 'stop') {
         this.confirmationDialog.open(
-          { isFooter: false }, environment,
-          environment.name === 'edge node' ? ConfirmationDialogType.StopEdgeNode : ConfirmationDialogType.StopExploratory);
+          { isFooter: false },
+          environment,
+          (environment.name === 'edge node' || environment.type.toLowerCase() === 'edge node')
+            ? ConfirmationDialogType.StopEdgeNode
+            : ConfirmationDialogType.StopExploratory,
+          );
       } else if (action === 'terminate') {
         this.confirmationDialog.open({ isFooter: false }, environment, ConfirmationDialogType.TerminateExploratory);
       } else if (action === 'run') {
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.ts
index 775a684..c1fe712 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.ts
@@ -91,8 +91,11 @@ export class ConfirmationDialogComponent implements OnInit {
 
   private filterResourcesByType(resources) {
     resources
-    .filter(resource => (resource.status != 'failed' && resource.status != 'terminated' && resource.status != 'terminating' && resource.status != 'stopped'))
-    .forEach(resource => { (resource.image === 'docker.dlab-dataengine') ? this.dataengines.push(resource) : this.dataengineServices.push(resource); });
+    .filter(resource =>
+      (resource.status !== 'failed' && resource.status !== 'terminated'
+      && resource.status !== 'terminating' && resource.status !== 'stopped'))
+    .forEach(resource => {
+      (resource.image === 'docker.dlab-dataengine') ? this.dataengines.push(resource) : this.dataengineServices.push(resource); });
   }
 
   private resetDialog(): void {
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.model.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.model.ts
index ff4bb94..7a8e093 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.model.ts
@@ -70,19 +70,19 @@ export class ConfirmationDialogModel {
 
 
   private stopExploratory(): Observable<{}> {
-    return this.manageAction 
+    return this.manageAction
       ? this.manageEnvironmentsService.environmentManagement(this.notebook.user, 'stop', this.notebook.name)
       : this.userResourceService.suspendExploratoryEnvironment(this.notebook, 'stop');
   }
 
   private terminateExploratory(): Observable<{}> {
-    return this.manageAction 
+    return this.manageAction
       ? this.manageEnvironmentsService.environmentManagement(this.notebook.user, 'terminate', this.notebook.name)
       : this.userResourceService.suspendExploratoryEnvironment(this.notebook, 'terminate');
   }
 
   private stopEdgeNode(): Observable<{}> {
-    return this.manageAction 
+    return this.manageAction
       ? this.manageEnvironmentsService.environmentManagement(this.notebook.user, 'stop', 'edge')
       : this.healthStatusService.suspendEdgeNode();
   }


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