TRIX-27 no reload required after removing image

This commit is contained in:
Dragos 2021-06-01 11:26:17 +03:00
parent b28fc6f955
commit 87da8fc49d
2 changed files with 4 additions and 4 deletions

View File

@ -186,14 +186,14 @@ export class ImagesComponent implements OnInit, OnDestroy
modalRef.content.confirm.pipe(first()).subscribe(() => modalRef.content.confirm.pipe(first()).subscribe(() =>
{ {
this.toastr.info(`Removing machine "${image.name}"...`); this.toastr.info(`Removing image "${image.name}"...`);
this.catalogService.deleteImage(image.id) this.catalogService.deleteImage(image.id)
.subscribe(() => .subscribe(() =>
{ {
const index = this.images.findIndex(i => i.id === image.id); const index = this.myImages.findIndex(i => i.id === image.id);
if (index >= 0) if (index >= 0)
this.images.splice(index, 1); this.myImages.splice(index, 1);
this.applyFiltersAndSort(); this.applyFiltersAndSort();

View File

@ -11,7 +11,7 @@
<ng-container *ngIf="firewallRules && firewallRules.length"> <ng-container *ngIf="firewallRules && firewallRules.length">
<div class="input-group input-group-pill flex-grow-1 flex-grow-sm-0 me-sm-3 w-sm-auto w-100"> <div class="input-group input-group-pill flex-grow-1 flex-grow-sm-0 me-sm-3 w-sm-auto w-100">
<input type="text" class="form-control" placeholder="Search by name..." formControlName="searchTerm" appAlphaOnly="^[A-Za-z0-9_-]+$"> <input type="text" class="form-control" placeholder="Search by description..." formControlName="searchTerm" appAlphaOnly="^[A-Za-z0-9_-]+$">
<button class="btn btn-outline-info" type="button" (click)="clearSearch()" [disabled]="!editorForm.get('searchTerm').value" <button class="btn btn-outline-info" type="button" (click)="clearSearch()" [disabled]="!editorForm.get('searchTerm').value"
tooltip="Clear search" container="body" placement="top" [adaptivePosition]="false"> tooltip="Clear search" container="body" placement="top" [adaptivePosition]="false">
<fa-icon icon="times" size="sm" [fixedWidth]="true"></fa-icon> <fa-icon icon="times" size="sm" [fixedWidth]="true"></fa-icon>