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 5fdfa71 [DLAB-1877]: Fixed set of tasks on "Environment management" (#792) 5fdfa71 is described below commit 5fdfa71e4e1cd9101568cd5f022c256c74f5d960 Author: Dmytro Gnatyshyn <42860905+dg1...@users.noreply.github.com> AuthorDate: Thu Jun 18 09:33:05 2020 +0300 [DLAB-1877]: Fixed set of tasks on "Environment management" (#792) [DLAB-1877]: Fixed set of tasks on Environment management --- .../management-grid/management-grid.component.html | 25 ++++++++++++---------- .../management-grid/management-grid.component.ts | 7 +++++- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.html index 02d9012..64b6e91 100644 --- a/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.html +++ b/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.html @@ -37,7 +37,7 @@ </th> <td mat-cell *matCellDef="let element"> <div - *ngIf="element.type !== 'edge node' && (element.status==='running' || element.status==='stopped')" + *ngIf="element.type !== 'edge node' && (element.status==='running' || element.status==='stopped') && !clustersInProgress(element.resources)" class="empty-checkbox" [ngClass]="{'checked': element.isSelected}" (click)="toggleActionForAll(element);$event.stopPropagation()" @@ -144,21 +144,24 @@ <div *ngIf="element.resources?.length"> <div *ngFor="let resource of element.resources" class="resource-wrap"> <div class="resource-name"> - <a class="detailed-link"> + <a> {{ resource.computational_name }} </a> </div> <span ngClass="{{resource.status || ''}}" class="resource-status">{{ resource.status }}</span> <div class="resource-actions"> - <a class="start-stop-action" *ngIf="resource.image === 'docker.dlab-dataengine'"> - <i class="material-icons" (click)="toggleResourceAction(element, 'stop', resource)" - [ngClass]="{'not-allowed' : resource.status !== 'running' }">pause_circle_outline</i> - </a> - - <a class="remove_butt" (click)="toggleResourceAction(element, 'terminate', resource)" - [ngClass]="{ 'disabled' : element.status !== 'running' || resource.status !== 'running' && resource.status !== 'stopped' }"> - <i class="material-icons">highlight_off</i> - </a> + <span class="not-allow"> + <a class="start-stop-action" *ngIf="resource.image === 'docker.dlab-dataengine'"> + <i class="material-icons" (click)="toggleResourceAction(element, 'stop', resource)" + [ngClass]="{'not-allowed' : resource.status !== 'running' || selected?.length }">pause_circle_outline</i> + </a> + </span> + <span class="not-allow"> + <a class="remove_butt" (click)="toggleResourceAction(element, 'terminate', resource)" + [ngClass]="{ 'disabled' : element.status !== 'running' || (resource.status !== 'running' && resource.status !== 'stopped') || selected?.length }"> + <i class="material-icons">highlight_off</i> + </a> + </span> </div> </div> </div> diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.ts index cb1c283..adfee55 100644 --- a/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.ts @@ -228,6 +228,11 @@ export class ManagementGridComponent implements OnInit { this.selected = this.allFilteredEnvironmentData.filter(item => !!item.isSelected); this.emitSelectedList.emit(this.selected); } + + public clustersInProgress(resources: any) { + const statuses = ['terminating', 'stopping', 'starting', 'creating', 'configuring', 'reconfiguring']; + return resources.filter(resource => statuses.includes(resource.status)).length; + } } @@ -332,7 +337,7 @@ export class ReconfirmationDialogComponent { if (data.notebooks && data.notebooks.length) { this.notebooks = JSON.parse(JSON.stringify(data.notebooks)); this.notebooks = this.notebooks.map(notebook => { - notebook.resources = notebook.resources.filter(res => res.status !== 'terminated' && res.status.slice(0, 4) !== data.action); + notebook.resources = notebook.resources.filter(res => res.status !== 'failed' && res.status !== 'terminated' && res.status.slice(0, 4) !== data.action); if (notebook.resources.length) { this.isClusterLength = true; } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org