| <!-- |
| ~ Licensed to the Apache Software Foundation (ASF) under one |
| ~ or more contributor license agreements. See the NOTICE file |
| ~ distributed with this work for additional information |
| ~ regarding copyright ownership. The ASF licenses this file |
| ~ to you under the Apache License, Version 2.0 (the |
| ~ "License"); you may not use this file except in compliance |
| ~ with the License. You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, |
| ~ software distributed under the License is distributed on an |
| ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| ~ KIND, either express or implied. See the License for the |
| ~ specific language governing permissions and limitations |
| ~ under the License. |
| --> |
| |
| <modal-dialog #bindDialog modalClass="confirmation-dialog modal-md"> |
| <modal-header> |
| <h4 class="modal-title"> |
| <span *ngIf="model.notebook.name && model.notebook.name !== 'edge node'"> |
| <span>{{ confirmationType ? 'Terminate' : 'Stop' }} notebook: {{ model.notebook.name }}</span> |
| </span> |
| <span *ngIf="model.notebook.type === 'Edge Node' || model.notebook.name === 'edge node'"> |
| <i class="material-icons">priority_high</i>Warning |
| </span> |
| </h4> |
| </modal-header> |
| <modal-content> |
| <div class="content-box"> |
| <p class="info text-center">{{ model.title }}</p> |
| |
| <mat-list class="resources" [hidden]="model.notebook.type === 'Edge Node' || model.notebook.name === 'edge node' |
| || !model.notebook.resources || model.notebook.resources.length === 0 || (!isAliveResources && !confirmationType) || onlyKilled"> |
| <mat-list-item class="list-header"> |
| <div class="cluster">Cluster</div> |
| <div class="status">Further status</div> |
| <div class="size">Size</div> |
| </mat-list-item> |
| <div class="scrolling-content" id="scrolling"> |
| <mat-list-item *ngFor="let resource of model.notebook.resources" |
| [hidden]="resource.status === 'failed' || resource.status === 'terminated' || resource.status === 'terminating' || (resource.status === 'stopped' && !confirmationType)"> |
| <div class="cluster ellipsis">{{ resource.computational_name }}</div> |
| <div class="status" [ngClass]="{ 'stopped': !confirmationType && resource.image === 'docker.dlab-dataengine', |
| 'terminated': resource.image === 'docker.dlab-dataengine-service' || confirmationType }">{{ (!confirmationType && resource.image === 'docker.dlab-dataengine') ? 'Stopped' : 'Terminated' }}</div> |
| <div class="size">{{ resource[DICTIONARY[resource.image].master_node_shape] }}</div> |
| </mat-list-item> |
| </div> |
| </mat-list> |
| |
| <div class="text-center m-top-20"> |
| <p *ngIf="model.notebook.name">Do you want to proceed?</p> |
| <p *ngIf="model.notebook.type">Are you sure you want to continue?</p> |
| </div> |
| <div class="text-center m-top-20"> |
| <button mat-raised-button type="button" class="butt action" (click)="bindDialog.close()">No</button> |
| <button mat-raised-button type="button" class="butt butt-success action" (click)="confirm()">Yes</button> |
| </div> |
| </div> |
| </modal-content> |
| </modal-dialog> |