Skip to content

Commit f989304

Browse files
committed
don't show docker control actions if the dockerId is not set
1 parent 15cebcf commit f989304

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

client/src/app/dashboard/table-all/table-all.component.html

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,29 @@
5151

5252
<ng-container matColumnDef="action">
5353
<mat-header-cell [ngClass]="'customWidthClass'" *matHeaderCellDef> Action </mat-header-cell>
54-
<mat-cell [ngClass]="'customWidthClass'" *matCellDef="let element; let i=index; let row;" >
55-
<button mat-icon-button (click)= startInstance(element.id) matTooltip="Start">
56-
<mat-icon aria-label="play_circle_filled_white">play_circle_filled_white</mat-icon>
57-
</button>
58-
<button mat-icon-button (click)= stopInstance(element.id) matTooltip="Stop">
59-
<mat-icon aria-label="stop">stop</mat-icon>
60-
</button>
61-
<button mat-icon-button (click)= pauseInstance(element.id) matTooltip="Pause">
62-
<mat-icon aria-label="pause_circle_outline">pause_circle_outline</mat-icon>
63-
</button>
64-
<button mat-icon-button (click)= resumeInstance(element.id) matTooltip="Resume">
65-
<mat-icon aria-label="play_circle_outline">play_circle_outline</mat-icon>
66-
</button>
67-
<button id="deleteButton" (click)="openDeleteDialog(i,row, element.id)" mat-icon-button matTooltip="Delete">
68-
<mat-icon aria-label="delete" id="deleteButton" >delete</mat-icon>
69-
</button>
70-
</mat-cell>
54+
<mat-cell [ngClass]="'customWidthClass'" *matCellDef="let element; let i=index; let row;" >
55+
<div *ngIf="!element.dockerId; else actions">
56+
Instance not hosted with docker.
57+
</div>
58+
<ng-template #actions>
59+
<button mat-icon-button (click)= startInstance(element.id) matTooltip="Start">
60+
<mat-icon aria-label="play_circle_filled_white">play_circle_filled_white</mat-icon>
61+
</button>
62+
<button mat-icon-button (click)= stopInstance(element.id) matTooltip="Stop">
63+
<mat-icon aria-label="stop">stop</mat-icon>
64+
</button>
65+
<button mat-icon-button (click)= pauseInstance(element.id) matTooltip="Pause">
66+
<mat-icon aria-label="pause_circle_outline">pause_circle_outline</mat-icon>
67+
</button>
68+
<button mat-icon-button (click)= resumeInstance(element.id) matTooltip="Resume">
69+
<mat-icon aria-label="play_circle_outline">play_circle_outline</mat-icon>
70+
</button>
71+
<button id="deleteButton" (click)="openDeleteDialog(i,row, element.id)" mat-icon-button matTooltip="Delete">
72+
<mat-icon aria-label="delete" id="deleteButton" >delete</mat-icon>
73+
</button>
74+
</ng-template>
75+
</mat-cell>
76+
7177
</ng-container>
7278

7379
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>

0 commit comments

Comments
 (0)