blob: 9bb12e76b241ed86810cda043918be77e93709d6 [file] [log] [blame]
<!--
~ 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.
-->
<div id="dialog-box" class="confirmation-dialog">
<header class="dialog-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' || data.type === 4 && data.notebook.length">
<i class="material-icons">priority_high</i>Warning
</span>
<span *ngIf="data.type === 4 && !data.notebook.length">
Update group data
</span>
</h4>
<button type="button" class="close" (click)="dialogRef.close()">&times;</button>
</header>
<div class="dialog-content">
<div class="content-box">
<p *ngIf="data.type !== 4" class="info text-center">{{ model.title }}</p>
<div *ngIf="data.type === 4" class="text-center m-bot-20">
<h3 class="strong">Group data will be updated.</h3>
</div>
<p *ngIf="data.type === 4 && data.notebook.length" class="text-center delete-user">User<span *ngIf="data.notebook.length>1">s</span> <span class="strong"> {{data.notebook.join(', ')}} </span>will be deleted from this group. All <span *ngIf="data.notebook.length===1">his</span><span *ngIf="data.notebook.length>1">their</span> resources authorized within this group will be terminated.</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[notebook.cloud_provider.toLowerCase()][resource.image].master_node_shape] }} </div>
</mat-list-item>
</div>
</mat-list>
<div class="text-center m-top-20">
<p class="strong">Do you want to proceed?</p>
</div>
<div class="text-center m-top-20">
<button mat-raised-button type="button" class="butt action" (click)="dialogRef.close()">No</button>
<button *ngIf="data.type !== 4" mat-raised-button type="button" class="butt butt-success action" (click)="confirm()">Yes</button>
<button *ngIf="data.type === 4" mat-raised-button type="button" class="butt butt-success action" (click)="dialogRef.close(true)">Yes</button>
</div>
</div>
</div>
</div>