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:30:09 UTC
[incubator-dlab] 02/02: [DLAB-2019]: Allowed to stop notebook if at
least one instance is in running status during multiple choice
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch DLAB-2019
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 95318f590c055a6ad04961a4a5d5b77176a7cdb7
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Wed Sep 2 17:29:31 2020 +0300
[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