From 566d200455979ece083b34cf3fc9fdfd66e2ac7f Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Mon, 30 Mar 2026 10:16:04 +0200 Subject: [PATCH 1/9] =?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/9] 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/9] =?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/9] =?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`. From 629a00dedf050db8ebbd5183d0fba0e0e901ab3a Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Tue, 31 Mar 2026 09:25:49 +0200 Subject: [PATCH 5/9] =?UTF-8?q?Creado=20componente=20compartido=20para=20m?= =?UTF-8?q?ostrar=20la=20selecci=C3=B3n=20de=20particiones=20en=20los=20co?= =?UTF-8?q?mandos=20crear=20imagen=20y=20deploy=20de=20imagenes=20con=20un?= =?UTF-8?q?=20dise=C3=B1o=20separado=20por=20disco?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ogWebconsole/src/app/app.module.ts | 3 +- .../create-image/create-image.component.html | 40 +--- .../create-image/create-image.component.ts | 9 +- .../deploy-image/deploy-image.component.css | 5 + .../deploy-image/deploy-image.component.html | 223 ++++++++---------- .../deploy-image/deploy-image.component.ts | 8 +- .../disk-partition-selector.component.css | 51 ++++ .../disk-partition-selector.component.html | 53 +++++ .../disk-partition-selector.component.ts | 58 +++++ 9 files changed, 278 insertions(+), 172 deletions(-) create mode 100644 ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.css create mode 100644 ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.html create mode 100644 ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.ts diff --git a/ogWebconsole/src/app/app.module.ts b/ogWebconsole/src/app/app.module.ts index 7f5df2f..db56824 100644 --- a/ogWebconsole/src/app/app.module.ts +++ b/ogWebconsole/src/app/app.module.ts @@ -172,6 +172,7 @@ import { HardwareProfileComponent } from './components/hardware-profile/hardware import { HardwareCollectionModalComponent } from './components/hardware-profile/hardware-collection-modal/hardware-collection-modal.component'; import { HardwareTypeComponent } from './components/hardware-type/hardware-type.component'; import { ShowDetailsComponent } from './components/hardware-type/show-details/show-details.component'; +import { DiskPartitionSelectorComponent } from './components/groups/shared/disk-partition-selector/disk-partition-selector.component'; export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader(http, './locale/', '.json'); } @@ -348,7 +349,7 @@ registerLocaleData(localeEs, 'es-ES'); progressAnimation: 'increasing', closeButton: true } - ), MatGridList, MatTree, MatTreeNode, MatNestedTreeNode, MatTreeNodeToggle, MatTreeNodeDef, MatTreeNodePadding, MatTreeNodeOutlet, MatPaginator, MatGridTile, MatExpansionPanel, MatExpansionPanelTitle, MatExpansionPanelDescription, MatRadioGroup, MatRadioButton, MatAutocompleteTrigger, NgOptimizedImage + ), MatGridList, MatTree, MatTreeNode, MatNestedTreeNode, MatTreeNodeToggle, MatTreeNodeDef, MatTreeNodePadding, MatTreeNodeOutlet, MatPaginator, MatGridTile, MatExpansionPanel, MatExpansionPanelTitle, MatExpansionPanelDescription, MatRadioGroup, MatRadioButton, MatAutocompleteTrigger, NgOptimizedImage, DiskPartitionSelectorComponent ], schemas: [ CUSTOM_ELEMENTS_SCHEMA, diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.html b/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.html index e2e79a6..d28e1b6 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.html +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.html @@ -224,39 +224,13 @@
- - - - - - - - - - - - - -
Seleccionar partición - - - - - {{ column.header }} - - {{ column.cell(image) }} - - - -
- {{ image.size }} MB - {{ image.size / 1024 }} GB -
-
-
+ +
diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.ts b/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.ts index eb8cc5e..a9ce00f 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.ts +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.ts @@ -62,12 +62,11 @@ export class CreateClientImageComponent implements OnInit{ return this.gitData && this.gitData.repo && this.gitData.branch; } + isPartitionDisabled = (row: any): boolean => { + return !row.operativeSystem; + }; + columns = [ - { - columnDef: 'diskNumber', - header: 'Disco', - cell: (partition: any) => partition.diskNumber - }, { columnDef: 'partitionNumber', header: 'Particion', diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.css b/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.css index 1d6cb4e..6a2a8a6 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.css +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.css @@ -590,6 +590,11 @@ table { } } +.partition-table-container { + overflow-x: auto; + margin-top: 10px; +} + .commits-table-container { margin-top: 20px; } diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.html b/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.html index 4dbb9f9..1b10903 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.html +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.html @@ -16,9 +16,7 @@
- +
@@ -28,9 +26,7 @@
-
@@ -49,7 +45,8 @@
info - Puedes marcar o desmarcar un cliente haciendo clic en el área del ordenador. Además, selecciona con "Modelo" el equipo que actuará como modelo. + Puedes marcar o desmarcar un cliente haciendo clic en el área del ordenador. Además, selecciona con "Modelo" el + equipo que actuará como modelo.
@@ -61,17 +58,11 @@
-
+
- Client Icon + Client Icon
{{ client.name | slice:0:20 }} @@ -82,9 +73,7 @@
- + Modelo @@ -104,7 +93,7 @@ image Configuración de imagen
- +
Tipo de imagen @@ -119,7 +108,8 @@
Seleccionar Repositorio - + {{ repo }} @@ -129,7 +119,8 @@ Seleccionar Rama - + {{ branch }} @@ -176,8 +167,8 @@ Tags - + {{ tag }} Sin tags @@ -198,7 +189,7 @@ Seleccione imagen - +
{{ image.name }}
{{ image.description }}
@@ -212,13 +203,82 @@
+ +
+
+ settings + Opciones multicast + Opciones torrent +
+ +
+ + Puerto + + + + + Dirección + + + + + Modo Multicast + + + {{ option.name }} + + + + + + Velocidad + + + + + Máximo Clientes + + + + + Tiempo Máximo de Espera + + +
+ +
+ + Modo P2P + + + {{ option.name }} + + + + + + Semilla (minutos) + + +
+
+
storage Selección de partición
- +
@@ -234,107 +294,16 @@
- - - - - - - - - - - - - -
Seleccionar partición - - - - - {{ column.header }} - {{ column.cell(image) }} -
-
-
- - -
-
- settings - Opciones multicast - Opciones torrent -
- -
- - Puerto - - - - - Dirección - - - - - Modo Multicast - - - {{ option.name }} - - - - - - Velocidad - - - - - Máximo Clientes - - - - - Tiempo Máximo de Espera - - -
- -
- - Modo P2P - - - {{ option.name }} - - - - - - Semilla (minutos) - - + +
- - - - + + \ No newline at end of file diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.ts b/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.ts index 0396eae..dae7062 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.ts +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.ts @@ -57,6 +57,7 @@ export class DeployImageComponent implements OnInit{ selectedClients: any[] = []; selectedModelClient: any = null; filteredPartitions: any[] = []; + selectedRepository: any = null; imageType: string = 'monolithic'; @@ -70,14 +71,9 @@ export class DeployImageComponent implements OnInit{ dataSource = new MatTableDataSource(); columns = [ - { - columnDef: 'diskNumber', - header: 'Disco', - cell: (partition: any) => `${partition.diskNumber}` - }, { columnDef: 'partitionNumber', - header: 'Particion', + header: 'Partición', cell: (partition: any) => `${partition.partitionNumber}` }, { diff --git a/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.css b/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.css new file mode 100644 index 0000000..aa3c38d --- /dev/null +++ b/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.css @@ -0,0 +1,51 @@ +/* Formatting specific to grouped partition selector */ +.disk-container { + display: flex; + flex-direction: column; + gap: 32px; + padding-top: 16px; +} + +.disk-card-wrapper { + margin-bottom: 20px; +} + +.disk-mat-card { + border-radius: 8px; + overflow: hidden; + 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; +} + +.disk-card-title { + margin: 0; + font-size: 1.2rem; + color: #3f51b5; + font-weight: bold; +} + +.disk-card-layout { + display: flex; + align-items: stretch; + background: white; + gap: 0; +} + +.disk-table-container { + flex: 1; + overflow-x: auto; +} + +.disk-table { + width: 100%; + box-shadow: none !important; + border: none !important; +} diff --git a/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.html b/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.html new file mode 100644 index 0000000..899e6c7 --- /dev/null +++ b/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.html @@ -0,0 +1,53 @@ +
+ @for (disk of diskUsageData; track disk.diskNumber) { +
+ +
+

Disco {{ disk.diskNumber }}

+
+ +
+
+ + + + + + + + @for (column of columns; track column.columnDef) { + + + + + } + + + + +
Seleccionar + + + + {{ column.header }} + @if (column.columnDef === 'size') { +
+ {{ partition.size }} MB + {{ partition.size / 1024 | number:'1.0-2' }} GB +
+ } @else { + {{ column.cell ? column.cell(partition) : partition[column.columnDef] }} + } +
+
+
+
+
+ } +
diff --git a/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.ts b/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.ts new file mode 100644 index 0000000..a3bb8ad --- /dev/null +++ b/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.ts @@ -0,0 +1,58 @@ +import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { MatCardModule } from '@angular/material/card'; +import { MatTableModule } from '@angular/material/table'; +import { MatRadioModule } from '@angular/material/radio'; +import { FormsModule } from '@angular/forms'; + +@Component({ + selector: 'app-disk-partition-selector', + standalone: true, + imports: [CommonModule, MatCardModule, MatTableModule, MatRadioModule, FormsModule], + templateUrl: './disk-partition-selector.component.html', + styleUrl: './disk-partition-selector.component.css' +}) +export class DiskPartitionSelectorComponent implements OnChanges { + @Input() partitions: any[] = []; + @Input() columns: any[] = []; + @Input() displayedColumns: string[] = []; + @Input() selectedPartition: any; + @Input() disableCondition: (row: any) => boolean = () => false; + + @Output() selectedPartitionChange = new EventEmitter(); + + diskUsageData: any[] = []; + + ngOnChanges(changes: SimpleChanges): void { + if (changes['partitions']) { + this.calculateDiskUsage(this.partitions || []); + } + } + + calculateDiskUsage(partitions: any[]) { + this.diskUsageData = []; + const grouped = partitions.reduce((acc: any, curr: any) => { + if (!acc[curr.diskNumber]) { + acc[curr.diskNumber] = []; + } + acc[curr.diskNumber].push(curr); + return acc; + }, {}); + + for (const diskNum in grouped) { + if (grouped.hasOwnProperty(diskNum)) { + this.diskUsageData.push({ + diskNumber: diskNum, + partitions: grouped[diskNum] + }); + } + } + } + + onPartitionSelected(row: any) { + if (!this.disableCondition(row)) { + this.selectedPartition = row; + this.selectedPartitionChange.emit(this.selectedPartition); + } + } +} From a3bf83f5d4cc27919e4864529ee967f7036d882b Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Tue, 31 Mar 2026 09:27:19 +0200 Subject: [PATCH 6/9] =?UTF-8?q?Creado=20componente=20compartido=20para=20m?= =?UTF-8?q?ostrar=20la=20selecci=C3=B3n=20de=20particiones=20en=20los=20co?= =?UTF-8?q?mandos=20crear=20imagen=20y=20deploy=20de=20imagenes=20con=20un?= =?UTF-8?q?=20dise=C3=B1o=20separado=20por=20disco?= 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 289f745..311e0a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Changelog +## [1.2.7] - 2026-03-31 +### Added +- Rediseño de la plantilla para seleccion de particiones, se ha creado un componente compartido por la vista de crear imagen y deploy de imagenes. + ## [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. From 9d0bc03400c4329d927fa61228135299182caf31 Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Tue, 31 Mar 2026 13:05:02 +0200 Subject: [PATCH 7/9] =?UTF-8?q?A=C3=B1adido=20comando=20Refrescar=20tanto?= =?UTF-8?q?=20en=20un=20cliente=20como=20en=20un=20grupo=20de=20clientes,?= =?UTF-8?q?=20de=20forma=20que=20se=20ejecuta=20el=20comando=20Actualizar?= =?UTF-8?q?=20en=20el=20ogAgent=20y=20se=20actualiza=20la=20informaci?= =?UTF-8?q?=C3=B3n=20de=20las=20particiones=20del=20cliente=20y=20se=20rec?= =?UTF-8?q?arga=20el=20men=C3=BA=20del=20ogbrowser.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 +++ .../execute-command.component.ts | 28 +++++++++++++++++-- .../src/app/shared/constants/command-types.ts | 5 ++++ ogWebconsole/src/locale/en.json | 3 +- ogWebconsole/src/locale/es.json | 3 +- 5 files changed, 39 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 311e0a5..f8a7de9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Changelog +## [1.3.0] - 2026-03-31 +### Added +- Añadido comando "Refrescar" tanto en un cliente como en un grupo de clientes, de forma que se ejecuta el comando Actualizar en el ogAgent y se actualiza la información de las particiones del cliente y se recarga el menú del ogbrowser. + ## [1.2.7] - 2026-03-31 ### Added - Rediseño de la plantilla para seleccion de particiones, se ha creado un componente compartido por la vista de crear imagen y deploy de imagenes. diff --git a/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.ts b/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.ts index e8bf0bf..11505fd 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.ts +++ b/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.ts @@ -37,6 +37,7 @@ export class ExecuteCommandComponent implements OnInit { { translationKey: 'executeCommands.softwareInventory', slug: 'software-inventory', disabled: false }, { translationKey: 'executeCommands.hardwareInventory', slug: 'hardware-inventory', disabled: false }, { translationKey: 'executeCommands.runScript', slug: 'run-script', disabled: false }, + { translationKey: 'executeCommands.refresh', slug: 'refresh', disabled: false }, ]; client: any = {}; @@ -79,7 +80,8 @@ export class ExecuteCommandComponent implements OnInit { 'software-inventory', 'hardware-inventory', 'remove-cache-image', - 'partition' + 'partition', + 'refresh' ], 'ou-minimal': [ 'power-on', @@ -112,7 +114,7 @@ export class ExecuteCommandComponent implements OnInit { if (states[0] === 'off' || states[0] === 'disconnected') { command.disabled = !['power-on', 'create-image'].includes(command.slug); } else { - command.disabled = !['power-off', 'reboot', 'login', 'create-image', 'deploy-image', 'remove-cache-image', 'partition', 'run-script', 'software-inventory', 'hardware-inventory'].includes(command.slug); + command.disabled = !['power-off', 'reboot', 'login', 'create-image', 'deploy-image', 'remove-cache-image', 'partition', 'run-script', 'software-inventory', 'hardware-inventory', 'refresh'].includes(command.slug); } } else { if (command.slug === 'software-inventory') { @@ -125,6 +127,11 @@ export class ExecuteCommandComponent implements OnInit { command.disabled = true; } } + + if (command.slug === 'refresh') { + command.disabled = !states.every(state => state === 'og-live'); + } + return command; }); } @@ -173,6 +180,10 @@ export class ExecuteCommandComponent implements OnInit { if (action === 'software-inventory') { this.softwareInventory(); } + + if (action === 'refresh') { + this.refreshClient(); + } } rebootClient(): void { @@ -188,6 +199,19 @@ export class ExecuteCommandComponent implements OnInit { ); } + refreshClient(): void { + this.http.post(`${this.baseUrl}/clients/server/refresh`, { + clients: this.clientData.map((client: any) => client['@id']) + }).subscribe( + response => { + this.toastService.success('Petición de refresco enviada correctamente'); + }, + error => { + this.toastService.error(error.error['hydra:description'] || 'Error de conexión con el cliente'); + } + ); + } + loginClient(): void { const clientDataToSend = this.clientData.map(client => ({ name: client.name, diff --git a/ogWebconsole/src/app/shared/constants/command-types.ts b/ogWebconsole/src/app/shared/constants/command-types.ts index 1d52dbe..7e4c0a9 100644 --- a/ogWebconsole/src/app/shared/constants/command-types.ts +++ b/ogWebconsole/src/app/shared/constants/command-types.ts @@ -72,5 +72,10 @@ export const COMMAND_TYPES: any = { 'kill-job': { en: 'Cancel Task', es: 'Cancelar Tarea' + }, + + refresh: { + en: 'Refresh', + es: 'Refrescar' } }; diff --git a/ogWebconsole/src/locale/en.json b/ogWebconsole/src/locale/en.json index 98298f3..c8efa4e 100644 --- a/ogWebconsole/src/locale/en.json +++ b/ogWebconsole/src/locale/en.json @@ -517,7 +517,8 @@ "partition": "Partition and Format", "softwareInventory": "Software Inventory", "hardwareInventory": "Hardware Inventory", - "runScript": "Run Script" + "runScript": "Run Script", + "refresh": "Refresh" }, "changeOU": "Change Organizational Unit", "moveClientsTooltip": "Move clients to another organizational unit", diff --git a/ogWebconsole/src/locale/es.json b/ogWebconsole/src/locale/es.json index 0ed3206..b991651 100644 --- a/ogWebconsole/src/locale/es.json +++ b/ogWebconsole/src/locale/es.json @@ -518,7 +518,8 @@ "partition": "Particionar y Formatear", "softwareInventory": "Inventario Software", "hardwareInventory": "Inventario Hardware", - "runScript": "Ejecutar script" + "runScript": "Ejecutar script", + "refresh": "Refrescar" }, "changeOU": "Mover", "moveClientsTooltip": "Mover clientes a otra unidad organizativa", From 93d034868fc2d88498b4e206b26394c168c580da Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Thu, 9 Apr 2026 08:53:00 +0200 Subject: [PATCH 8/9] Muestra la fecha de despliegue de una imagen en una particion en la ficha detalles --- .../shared/client-details/client-details.component.css | 6 ++++++ .../shared/client-details/client-details.component.html | 3 +++ 2 files changed, 9 insertions(+) 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 ac4edb3..ffbf8b8 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 @@ -241,3 +241,9 @@ table { font-size: 0.75rem; color: gray; } +.image-date { + font-size: 0.75rem; + color: #555; + font-style: italic; + margin-top: 2px; +} 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 6c9b378..6cf601f 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 @@ -78,6 +78,9 @@ @if (image.filesystem !== 'CACHE' || !image.cacheContent) { {{image.operativeSystem?.name }} {{ image.image?.name }} + @if (image.deployDate) { + Instalada el {{ image.deployDate | date:'dd/MM/yyyy HH:mm' }} + } }
} From d6487c4624faf1c14d1a5b49484f5927c2e82319 Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Thu, 9 Apr 2026 08:53:00 +0200 Subject: [PATCH 9/9] Muestra la fecha de despliegue de una imagen en una particion en la ficha detalles --- CHANGELOG.md | 4 ++++ .../shared/client-details/client-details.component.css | 6 ++++++ .../shared/client-details/client-details.component.html | 3 +++ 3 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8a7de9..d1a2277 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Changelog +## [1.3.1] - 2026-04-09 +### Added +- Añadida información de la fecha de despliegue de una imagen en una particion. + ## [1.3.0] - 2026-03-31 ### Added - Añadido comando "Refrescar" tanto en un cliente como en un grupo de clientes, de forma que se ejecuta el comando Actualizar en el ogAgent y se actualiza la información de las particiones del cliente y se recarga el menú del ogbrowser. 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 ac4edb3..ffbf8b8 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 @@ -241,3 +241,9 @@ table { font-size: 0.75rem; color: gray; } +.image-date { + font-size: 0.75rem; + color: #555; + font-style: italic; + margin-top: 2px; +} 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 6c9b378..6cf601f 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 @@ -78,6 +78,9 @@ @if (image.filesystem !== 'CACHE' || !image.cacheContent) { {{image.operativeSystem?.name }} {{ image.image?.name }} + @if (image.deployDate) { + Instalada el {{ image.deployDate | date:'dd/MM/yyyy HH:mm' }} + } }
}