refs #1920 use all clients by default in execute command
testing/ogGui-multibranch/pipeline/head This commit looks good Details

pull/21/head^2
Lucas Lara García 2025-04-16 11:33:50 +02:00
parent 265b4888c3
commit de56a23a2b
2 changed files with 5 additions and 2 deletions

View File

@ -198,8 +198,8 @@
<mat-icon>delete</mat-icon>
<span>{{ 'delete' | translate }}</span>
</button>
<app-execute-command [clientData]="selection.selected" [buttonType]="'menu-item'"
[buttonText]="'Ejecutar comandos'" [icon]="'terminal'" [disabled]="selection.selected.length === 0">
<app-execute-command [clientData]="selectedNode?.clients || []" [buttonType]="'menu-item'"
[buttonText]="'Ejecutar comandos'" [icon]="'terminal'" [disabled]="!((selectedNode?.clients ?? []).length > 0)">
</app-execute-command>
</mat-menu>

View File

@ -388,6 +388,9 @@ export class GroupsComponent implements OnInit, OnDestroy {
this.http.get<any>(`${this.baseUrl}/clients?organizationalUnit.id=${node.id}&page=${this.page + 1}&itemsPerPage=${this.itemsPerPage}`, { params }).subscribe({
next: (response: any) => {
this.selectedClients.data = response['hydra:member'];
if (this.selectedNode) {
this.selectedNode.clients = response['hydra:member'];
}
this.length = response['hydra:totalItems'];
this.arrayClients = this.selectedClients.data;
this.hasClients = this.selectedClients.data.length > 0;