Refactor partition type display: simplify client name presentation and improve table structure
testing/ogGui-multibranch/pipeline/head This commit looks good Details

pull/22/head
Lucas Lara García 2025-05-02 13:34:02 +02:00
parent f6dbd6dad9
commit 8cc1854d09
1 changed files with 34 additions and 34 deletions

View File

@ -1,47 +1,47 @@
<mat-dialog-content class="modal-content">
<div *ngFor="let group of groupedPartitions" class="client-section">
<h3 class="client-title">
{{ group.clientNames.length === 1 ? group.clientNames[0] : 'Clientes (' + group.clientNames.length + '): ' +
group.clientNames.join(', ') }}
{{ group.clientNames.length === 1 ? group.clientNames[0] : group.clientNames.join(', ') }}
</h3>
<table mat-table [dataSource]="group.partitions" class="mat-elevation-z2 partition-table">
<ng-container *ngIf="group.partitions.length > 0; else noPartitions">
<table mat-table [dataSource]="group.partitions" class="mat-elevation-z2 partition-table">
<!-- Columnas -->
<ng-container matColumnDef="diskNumber">
<th mat-header-cell *matHeaderCellDef>Disco</th>
<td mat-cell *matCellDef="let element">{{ element.diskNumber }}</td>
</ng-container>
<!-- Disco -->
<ng-container matColumnDef="diskNumber">
<th mat-header-cell *matHeaderCellDef>Disco</th>
<td mat-cell *matCellDef="let element">{{ element.diskNumber }}</td>
</ng-container>
<ng-container matColumnDef="partitionNumber">
<th mat-header-cell *matHeaderCellDef>Partición</th>
<td mat-cell *matCellDef="let element">{{ element.partitionNumber }}</td>
</ng-container>
<!-- Partición -->
<ng-container matColumnDef="partitionNumber">
<th mat-header-cell *matHeaderCellDef>Partición</th>
<td mat-cell *matCellDef="let element">{{ element.partitionNumber }}</td>
</ng-container>
<ng-container matColumnDef="partitionCode">
<th mat-header-cell *matHeaderCellDef>Tipo</th>
<td mat-cell *matCellDef="let element">{{ element.partitionCode }}</td>
</ng-container>
<!-- Tipo -->
<ng-container matColumnDef="partitionCode">
<th mat-header-cell *matHeaderCellDef>Tipo</th>
<td mat-cell *matCellDef="let element">{{ element.partitionCode }}</td>
</ng-container>
<ng-container matColumnDef="size">
<th mat-header-cell *matHeaderCellDef>Tamaño (MB)</th>
<td mat-cell *matCellDef="let element">{{ element.size | number }}</td>
</ng-container>
<!-- Tamaño -->
<ng-container matColumnDef="size">
<th mat-header-cell *matHeaderCellDef>Tamaño (MB)</th>
<td mat-cell *matCellDef="let element">{{ element.size | number }}</td>
</ng-container>
<ng-container matColumnDef="filesystem">
<th mat-header-cell *matHeaderCellDef>File System</th>
<td mat-cell *matCellDef="let element">
<span *ngIf="!element.isSummary; else summaryFs">{{ element.filesystem || '-' }}</span>
<ng-template #summaryFs><em class="summary-label">Resumen</em></ng-template>
</td>
</ng-container>
<!-- File System -->
<ng-container matColumnDef="filesystem">
<th mat-header-cell *matHeaderCellDef>File System</th>
<td mat-cell *matCellDef="let element">
<span *ngIf="!element.isSummary; else summaryFs">{{ element.filesystem || '-' }}</span>
<ng-template #summaryFs><em class="summary-label">Resumen</em></ng-template>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;" [ngClass]="{ 'summary-row': row.isSummary }"></tr>
</table>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;" [ngClass]="{ 'summary-row': row.isSummary }"></tr>
</table>
<ng-template #noPartitions>
<p class="no-partitions-message">Sin particiones disponibles.</p>
</ng-template>
</div>
</mat-dialog-content>