refs #1902. Multi select checkbox logic
testing/ogGui-multibranch/pipeline/head There was a failure building this commit Details

pull/19/head
Manuel Aranda Rosales 2025-04-11 11:44:23 +02:00
parent dad3635f4f
commit 9e9d7b9873
2 changed files with 16 additions and 15 deletions

View File

@ -46,14 +46,14 @@
padding: 1rem !important;
box-sizing: border-box !important;
min-height: 250px !important;
overflow-y: auto !important;
overflow-y: auto !important;
}
.filters-panel,
.tree-container {
flex: 1 1 50% !important;
overflow-y: auto !important;
padding: 0.5rem !important;
overflow-y: auto !important;
padding: 0.5rem !important;
box-sizing: border-box !important;
margin-bottom: 0 !important;
}
@ -90,8 +90,8 @@
.clients-table {
max-height: unset !important;
overflow: unset !important;
display: table !important;
overflow: unset !important;
display: table !important;
flex-direction: unset !important;
}
@ -146,15 +146,15 @@
display: block;
padding: 1rem 1rem 1rem 13px;
margin-left: 0.6rem;
flex: 1 1 auto;
white-space: nowrap;
flex: 1 1 auto;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.view-type-container {
display: flex;
flex-wrap: wrap;
flex-wrap: wrap;
gap: 0.5rem;
align-items: center;
flex-shrink: 0;
@ -192,14 +192,14 @@
display: flex;
flex-direction: column;
width: 100%;
table-layout: auto;
table-layout: auto;
border-collapse: collapse;
}
.clients-table th,
.clients-table td {
text-align: left;
padding: 8px;
padding: 2px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@ -566,4 +566,4 @@ mat-button-toggle-group {
padding: 0.5rem 1rem 1rem 1rem;
width: 100%;
box-sizing: border-box;
}
}

View File

@ -245,7 +245,7 @@
<div *ngFor="let client of arrayClients" class="client-item">
<div class="client-card">
<mat-checkbox (click)="$event.stopPropagation()" (change)="toggleRow(client)"
[checked]="selection.isSelected(client)" [disabled]="client.status === 'busy'">
[checked]="selection.isSelected(client)" [disabled]="client.status === 'busy' || client.status === 'off' || client.status === 'disconnected'">
</mat-checkbox>
<img style="margin-top: 0.5em;" [src]="'assets/images/computer_' + client.status + '.svg'"
alt="Client Icon" class="client-image" />
@ -314,7 +314,7 @@
</th>
<td mat-cell *matCellDef="let row">
<mat-checkbox (click)="$event.stopPropagation()" (change)="toggleRow(row)"
[checked]="selection.isSelected(row)" [disabled]="row.status === 'busy'">
[checked]="selection.isSelected(row)" [disabled]="row.status === 'busy' || row.status === 'off' || row.status === 'disconnected'">
</mat-checkbox>
</td>
</ng-container>
@ -378,7 +378,8 @@
<mat-icon>more_vert</mat-icon>
</button>
<app-execute-command [clientData]="[client]" [buttonType]="'icon'" [icon]="'terminal'"
[disabled]="selection.selected.length > 1 || (selection.selected.length === 1 && !selection.isSelected(client))"></app-execute-command>
[disabled]="selection.selected.length > 1 || (selection.selected.length === 1 && !selection.isSelected(client))">
</app-execute-command>
<mat-menu #clientMenu="matMenu">
<button mat-menu-item (click)="onEditClick($event, client.type, client.uuid)">
<mat-icon>edit</mat-icon>
@ -423,4 +424,4 @@
</div>
</ng-template>
</div>
</div>