From 566d200455979ece083b34cf3fc9fdfd66e2ac7f Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Mon, 30 Mar 2026 10:16:04 +0200 Subject: [PATCH 1/4] =?UTF-8?q?Muestra=20el=20contenido=20de=20la=20cache?= =?UTF-8?q?=20de=20un=20disco,=20nombre=20del=20fichero=20y=20tama=C3=B1o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client-details/client-details.component.html | 15 ++++++++++++--- .../client-details/client-details.component.ts | 9 +++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html index 1a8e3ae..f251552 100644 --- a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html +++ b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html @@ -47,8 +47,17 @@
- {{image.operativeSystem?.name }} - {{ image.image?.name }} +
+ Contenido: +
+ • {{ item.name }} ({{ item.size }}) +
+
+
+ {{image.operativeSystem?.name }} + {{ image.image?.name }} +
@@ -80,4 +89,4 @@ - + \ No newline at end of file diff --git a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.ts b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.ts index 401a40f..920f95a 100644 --- a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.ts @@ -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(); } From 00a6c6fa3fe0638b9df3aab163379533715e4aa5 Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Mon, 30 Mar 2026 10:20:04 +0200 Subject: [PATCH 2/4] Cambiada la plantilla client-details por la nueva sintaxis angular @if, @for... --- .../client-details.component.html | 53 +++++++++++++------ 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html index f251552..bfb7f28 100644 --- a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html +++ b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html @@ -1,7 +1,8 @@ -
+ @if (!loading) { +

{{ 'clientDetailsTitle' | translate }} {{ clientData.name }}

@@ -9,23 +10,29 @@
-
+ @for (data of generalData; track data) { +
{{ data?.property }}
{{ data?.value || '--' }}
+ }
-
+ @for (data of networkData; track data) { +
{{ data?.property }}
{{ data?.value || '--' }}
+ }

Discos/Particiones

- {{ clientData.firmwareType }} + @if (clientData.firmwareType) { + {{ clientData.firmwareType }} + }
@@ -33,35 +40,42 @@
- + @for (column of columns; track column.columnDef) { + + } @@ -73,19 +87,24 @@
- -
+ @if (diskUsageData && diskUsageData.length > 0) { + + @for (disk of chartDisk; track disk.diskNumber) { +

Disco {{ disk.diskNumber }}

Usado: {{ (disk.used).toFixed(2) }} GB ({{ disk.percentage }}%)

Total: {{ disk.total }} GB

+ }
+ }
+ } From 769969598b84859ce80b27edbbf883f4f956a9d0 Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Mon, 30 Mar 2026 11:54:30 +0200 Subject: [PATCH 3/4] =?UTF-8?q?Se=20muestra=20informaci=C3=B3n=20del=20con?= =?UTF-8?q?tenido=20de=20cach=C3=A9=20del=20disco,=20adem=C3=A1s=20se=20ha?= =?UTF-8?q?=20refactorizado=20la=20vista=20de=20detalles=20del=20equipo=20?= =?UTF-8?q?para=20separar=20la=20informaci=C3=B3n=20por=20discos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client-details.component.css | 111 ++++++++++++++++ .../client-details.component.html | 118 ++++++++++-------- .../client-details.component.ts | 15 +-- 3 files changed, 181 insertions(+), 63 deletions(-) diff --git a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.css b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.css index 0aa7a6d..ac4edb3 100644 --- a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.css +++ b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.css @@ -130,3 +130,114 @@ table { gap: 1em; margin-bottom: 40px; } + +/* ngx-charts custom wrapped legend */ +::ng-deep .charts-container .legend-labels { + display: flex !important; + flex-wrap: wrap !important; + justify-content: center !important; +} +::ng-deep .charts-container .legend-label { + width: auto !important; + margin-right: 16px !important; + margin-bottom: 8px !important; +} +::ng-deep .charts-container .legend-label-text { + max-width: none !important; + overflow: visible !important; + text-overflow: clip !important; +} +::ng-deep .charts-container .legend-wrap { + width: 100% !important; +} + +/* Extracted Card Redesign Classes */ +.disk-card-wrapper { + margin-bottom: 50px; +} +.disk-mat-card { + border-radius: 8px; + overflow: visible !important; + padding: 0; +} +.disk-card-header { + background-color: #f5f5f5; + padding: 16px 20px; + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: 1px solid #e0e0e0; + border-top-left-radius: 8px; + border-top-right-radius: 8px; +} +.disk-card-title { + margin: 0; + font-size: 1.2rem; + color: #3f51b5; + font-weight: bold; +} +.disk-card-metrics-wrapper { + display: flex; + align-items: center; +} +.disk-card-metrics-chip { + background-color: white !important; + border: 1px solid #ccc; + font-weight: bold; + color: #333; +} +.disk-card-layout { + display: flex; + align-items: stretch; + background: white; + gap: 0; + border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; +} +.disk-table-container { + flex: 1; + overflow-x: auto; +} +.disk-table { + width: 100%; + box-shadow: none !important; + border: none !important; +} +.disk-chart-container { + flex: 0 0 400px; + border-left: 1px solid #e0e0e0; + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-start; + padding: 30px 20px 50px 20px; + box-sizing: border-box; + background: #fafafa; + min-height: 350px; + border-bottom-right-radius: 8px; +} +.disk-chart-wrapper { + width: 100%; + height: auto; + display: flex; + justify-content: center; +} + +/* OS Column Classes */ +.os-col-wrapper { + display: flex; + flex-direction: column; +} +.cache-title { + font-weight: bold; + font-size: 0.8rem; + color: #666; +} +.cache-item { + font-size: 0.75rem; + color: #666; +} +.image-name { + font-size: 0.75rem; + color: gray; +} diff --git a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html index bfb7f28..6c9b378 100644 --- a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html +++ b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html @@ -37,71 +37,81 @@
-
-
-
{{ column.header }} - + @if (column.columnDef !== 'size' && column.columnDef !== 'operativeSystem') { {{ column.cell(image) }} - - + } + @if (column.columnDef === 'size') { {{ (image.size / 1024).toFixed(2) }} GB - + } - + @if (column.columnDef === 'operativeSystem') {
-
+ @if (image.filesystem === 'CACHE' && image.cacheContent) { +
Contenido: -
+ @for (item of parseCacheContent(image.cacheContent); track item.name) { +
• {{ item.name }} ({{ item.size }})
+ }
-
+ } + @if (image.filesystem !== 'CACHE' || !image.cacheContent) { +
{{image.operativeSystem?.name }} {{ image.image?.name }}
+ }
- + }
- @for (column of columns; track column.columnDef) { - - - + +
{{ column.header }} - @if (column.columnDef !== 'size' && column.columnDef !== 'operativeSystem') { - {{ column.cell(image) }} - } - @if (column.columnDef === 'size') { - - {{ (image.size / 1024).toFixed(2) }} GB - - } + @for (disk of diskUsageData; track disk.diskNumber) { +
+ +
+

Disco {{ disk.diskNumber }}

+
+ + Total: {{ disk.total.toFixed(2) }} GB  |  Usado: {{ (disk.used).toFixed(2) }} GB ({{ disk.percentage }}%) + +
+
+ +
+
+ + @for (column of columns; track column.columnDef) { + + + - - } + } + + + } - + - - - -
{{ column.header }} + @if (column.columnDef !== 'size' && column.columnDef !== 'operativeSystem') { + {{ column.cell(image) }} + } + @if (column.columnDef === 'size') { + + {{ (image.size / 1024).toFixed(2) }} GB + + } - @if (column.columnDef === 'operativeSystem') { -
- @if (image.filesystem === 'CACHE' && image.cacheContent) { -
- Contenido: - @for (item of parseCacheContent(image.cacheContent); track item.name) { -
- • {{ item.name }} ({{ item.size }}) -
+ @if (column.columnDef === 'operativeSystem') { +
+ @if (image.filesystem === 'CACHE' && image.cacheContent) { + Contenido: + @for (item of parseCacheContent(image.cacheContent); track item.name) { +
+ • {{ item.name }} ({{ item.size }}) +
+ } + } + @if (image.filesystem !== 'CACHE' || !image.cacheContent) { + {{image.operativeSystem?.name }} + {{ image.image?.name }} }
- } - @if (image.filesystem !== 'CACHE' || !image.cacheContent) { -
- {{image.operativeSystem?.name }} - {{ image.image?.name }} -
- } -
- } -
+ +
-
+
-
- @if (diskUsageData && diskUsageData.length > 0) { - - @for (disk of chartDisk; track disk.diskNumber) { -
- +
+
+ -

Disco {{ disk.diskNumber }}

-

Usado: {{ (disk.used).toFixed(2) }} GB ({{ disk.percentage }}%)

-

Total: {{ disk.total }} GB

- } - - } +
+
+ + }
} diff --git a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.ts b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.ts index 920f95a..57e8fe2 100644 --- a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.ts @@ -37,18 +37,14 @@ export class ClientDetailsComponent { chartDisk: any[] = []; view: [number, number] = [260, 160]; showLegend: boolean = true; + legendPosition: any = 'below'; datePipe: DatePipe = new DatePipe('es-ES'); columns = [ { - columnDef: 'diskNumber', - header: 'Disco', - cell: (partition: any) => partition.diskNumber, - }, - { - columnDef: 'partitionNumber', - header: 'Particion', - cell: (partition: any) => partition.partitionNumber + columnDef: 'partition', + header: 'Partición', + cell: (partition: any) => `${partition.partitionNumber}` }, { columnDef: 'partitionCode', @@ -168,7 +164,8 @@ export class ClientDetailsComponent { chartData: partitionData, total, used, - percentage: total > 0 ? Math.round((used / total) * 100) : 0 + percentage: total > 0 ? Math.round((used / total) * 100) : 0, + partitions }; }); From 4c9d10755f2746abec0071560a604cca31519e6c Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Mon, 30 Mar 2026 11:58:40 +0200 Subject: [PATCH 4/4] =?UTF-8?q?Redise=C3=B1o=20de=20la=20pantalla=20detall?= =?UTF-8?q?es=20de=20un=20equipo,=20en=20la=20partici=C3=B3n=20CACHE,=20se?= =?UTF-8?q?=20muestra=20el=20listado=20de=20ficheros=20que=20contiene=20co?= =?UTF-8?q?n=20el=20tama=C3=B1o=20de=20cada=20uno.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b9ed3b..289f745 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Changelog +## [1.2.6] - 2026-03-30 +### Added +- Rediseño de la pantalla detalles de un equipo, en la partición CACHE, se muestra el listado de ficheros que contiene con el tamaño de cada uno. + ## [1.2.5] - 2026-03-27 ### Fixed - Corregido error 401 Unauthorized en la edición de menús con nombres que contienen la palabra "login". Se ha refinado el interceptor para aplicar el prefijo "Bearer" de forma selectiva mediante validación exacta del path `/auth/login`.