You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by dg...@apache.org on 2020/09/02 14:32:14 UTC

[incubator-dlab] branch develop updated: [DLAB-2019]: Allowed to stop notebook if at least one instance is in running status during multiple choice (#886)

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

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


The following commit(s) were added to refs/heads/develop by this push:
     new 6d252f2  [DLAB-2019]: Allowed to stop notebook if at least one instance is in running status during multiple choice (#886)
6d252f2 is described below

commit 6d252f2f166ad9feedd8efcf97c1f6696c6a2ba6
Author: Dmytro Gnatyshyn <42...@users.noreply.github.com>
AuthorDate: Wed Sep 2 17:32:02 2020 +0300

    [DLAB-2019]: Allowed to stop notebook if at least one instance is in running status during multiple choice (#886)
    
    [DLAB-2019]: Allowed to stop notebook if at least one instance is in running status during multiple choice
---
 .../webapp/src/app/administration/management/management.component.html | 2 +-
 .../webapp/src/app/administration/management/management.component.ts   | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/management/management.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/management/management.component.html
index 187a3ee..3bd9aa8 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/management/management.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/management/management.component.html
@@ -38,7 +38,7 @@
            type="button" class="butt action-menu-item"
             [ngClass]="{'disabled': selectedRunning.length === 0  || selectedStopped.length !== 0 }"
             mat-raised-button
-            [disabled]="selectedRunning.length === 0  || selectedStopped.length !== 0"
+            [disabled]="selectedRunning.length === 0"
             (click)="resourseAction('stop');$event.stopPropagation()"
           >
             Stop
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 55ac108..8a54eea 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
@@ -226,8 +226,9 @@ export class ManagementComponent implements OnInit {
         result && this.manageEnvironmentAction({ action, environment, resource });
       });
     } else {
-      const notebooks = this.selected.length ? this.selected : [environment];
+      let notebooks = this.selected.length ? this.selected : [environment];
       if (action === 'stop') {
+        notebooks = notebooks.filter(note => note.status !== 'stopped');
         this.dialog.open(ReconfirmationDialogComponent, {
           data: { notebooks: notebooks, type: 'notebook', action },
           width: '550px', panelClass: 'error-modalbox'


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