Muestra el contenido de la cache de un disco, nombre del fichero y tamaño
parent
978a1a98ff
commit
566d200455
|
|
@ -47,8 +47,17 @@
|
|||
|
||||
<ng-container *ngIf="column.columnDef === 'operativeSystem'">
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
<span>{{image.operativeSystem?.name }}</span>
|
||||
<span style="font-size: 0.75rem; color: gray;">{{ image.image?.name }}</span>
|
||||
<div *ngIf="image.filesystem === 'CACHE' && image.cacheContent">
|
||||
<span style="font-weight: bold; font-size: 0.8rem; color: #666;">Contenido:</span>
|
||||
<div *ngFor="let item of parseCacheContent(image.cacheContent)"
|
||||
style="font-size: 0.75rem; color: #666;">
|
||||
• {{ item.name }} ({{ item.size }})
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="image.filesystem !== 'CACHE' || !image.cacheContent">
|
||||
<span>{{image.operativeSystem?.name }}</span>
|
||||
<span style="font-size: 0.75rem; color: gray;">{{ image.image?.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</td>
|
||||
|
|
@ -80,4 +89,4 @@
|
|||
</mat-dialog-content>
|
||||
<mat-dialog-actions class="action-container">
|
||||
<button class="ordinary-button" (click)="onNoClick()">{{ 'closeButton' | translate }}</button>
|
||||
</mat-dialog-actions>
|
||||
</mat-dialog-actions>
|
||||
|
|
@ -194,6 +194,15 @@ export class ClientDetailsComponent {
|
|||
});
|
||||
}
|
||||
|
||||
parseCacheContent(content: string): { name: string, size: string }[] {
|
||||
if (!content) return [];
|
||||
return content.split(',').map(item => {
|
||||
const [name, bytes] = item.split(':');
|
||||
const sizeMB = (parseInt(bytes) / (1024 * 1024)).toFixed(2) + ' MB';
|
||||
return { name, size: sizeMB };
|
||||
});
|
||||
}
|
||||
|
||||
onNoClick(): void {
|
||||
this.dialog.closeAll();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue