TRIX-29 deleting last VM has indefinite spinner

This commit is contained in:
Dragos 2021-06-03 17:20:59 +03:00
parent 4fa77a0932
commit ec15cc7c9d
4 changed files with 13 additions and 14 deletions

View File

@ -109,10 +109,12 @@
<div class="select-list" formArrayName="networks" tabindex="0"> <div class="select-list" formArrayName="networks" tabindex="0">
<div class="form-check" *ngFor="let network of editorForm.get('networks')['controls']; let index = index" [formGroupName]="index"> <div class="form-check" *ngFor="let network of editorForm.get('networks')['controls']; let index = index" [formGroupName]="index">
<input class="form-check-input" type="checkbox" [value]="network.get('id')" id="network-{{ network.get('id').value }}" formControlName="selected"> <input class="form-check-input" type="checkbox" [value]="network.get('id')" id="network-{{ network.get('id').value }}" formControlName="selected">
<label class="form-check-label text-truncate" for="network-{{ network.get('id').value }}"> <label class="form-check-label text-truncate d-flex align-items-center justify-content-between" for="network-{{ network.get('id').value }}">
<small class="badge badge-discreet float-end" *ngIf="network.get('public').value">public</small> <span>
{{ network.get('name').value }} {{ network.get('name').value }}
<small class="text-faded">{{ network.get('description').value }}</small> <small class="text-faded">{{ network.get('description').value }}</small>
</span>
<small class="badge badge-discreet" *ngIf="network.get('public').value">public</small>
</label> </label>
</div> </div>
@ -141,7 +143,7 @@
</div> </div>
<!-- Volumes and disks --> <!-- Volumes and disks -->
<div class="mt-3 d-flex flex-column"> <div *ngIf="!kvmRequired" class="mt-3 d-flex flex-column">
<button class="btn text-start mb-2" [class.btn-outline-info]="!showVolumes" [class.btn-info]="showVolumes" <button class="btn text-start mb-2" [class.btn-outline-info]="!showVolumes" [class.btn-info]="showVolumes"
(click)="showVolumes = !showVolumes"> (click)="showVolumes = !showVolumes">
Volumes Volumes
@ -183,16 +185,11 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<p class="alert alert-info mt-3" *ngIf="kvmRequired">
<fa-icon icon="info-circle" class="align-middle"></fa-icon>
Volumes are disabled for KVM packages
</p>
</div> </div>
</div> </div>
<!-- Affinity settings --> <!-- Affinity settings -->
<div class="mt-3 d-flex flex-column" *ngIf="machines && machines.length"> <div class="mt-3 d-flex flex-column">
<button class="btn text-start w-100 mb-2" [class.btn-outline-info]="!showAffinity" [class.btn-info]="showAffinity" <button class="btn text-start w-100 mb-2" [class.btn-outline-info]="!showAffinity" [class.btn-info]="showAffinity"
(click)="showAffinity = !showAffinity"> (click)="showAffinity = !showAffinity">
Affinity rules Affinity rules

View File

@ -88,7 +88,7 @@ export class MachineWizardComponent implements OnInit, OnDestroy
{ {
id: 3, id: 3,
title: 'Settings', title: 'Settings',
description: 'Name your machine, configure networks and setup volumes' description: 'Name your machine and configure networks'
}, },
{ {
id: 4, id: 4,
@ -606,7 +606,7 @@ export class MachineWizardComponent implements OnInit, OnDestroy
this.currentStep = 2; this.currentStep = 2;
setTimeout(() => this.currentStep = 3, 300); setTimeout(() => this.currentStep = 3, 0);
} }
if (this.imageType <= 2) if (this.imageType <= 2)

View File

@ -9,7 +9,7 @@
<span class="d-none d-lg-block flex-grow-1"></span> <span class="d-none d-lg-block flex-grow-1"></span>
<ng-container *ngIf="machines && machines.length"> <ng-container *ngIf="machines && machines.length > 1">
<div class="input-group input-group-pill me-lg-3 mb-3 mb-lg-0 w-lg-auto w-100"> <div class="input-group input-group-pill me-lg-3 mb-3 mb-lg-0 w-lg-auto w-100">
<input type="text" class="form-control" placeholder="Search..." formControlName="searchTerm" <input type="text" class="form-control" placeholder="Search..." formControlName="searchTerm"
appAlphaOnly="^[A-Za-z0-9_-]+$" tooltip="Search by name, tag, metadata, operating system or brand" appAlphaOnly="^[A-Za-z0-9_-]+$" tooltip="Search by name, tag, metadata, operating system or brand"

View File

@ -383,6 +383,8 @@ export class MachinesComponent implements OnInit, OnDestroy
this.diskFilterOptions.stepsArray[0].value, this.diskFilterOptions.stepsArray[0].value,
this.diskFilterOptions.stepsArray[this.diskFilterOptions.stepsArray.length - 1].value this.diskFilterOptions.stepsArray[this.diskFilterOptions.stepsArray.length - 1].value
]); ]);
this.applyFiltersAndSort();
} }
// ---------------------------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------------------------