@@ -97,19 +94,21 @@
image
Configuración de imagen
-
-
- Tipo de imagen
-
- Monolítica
- Git
-
-
+
+
+
+ Tipo de imagen
+
+ Monolítica
+ Git
+
+
+
-
-
- Método de deploy
+
+
+ Seleccione método de deploy
{{ method.name }}
@@ -118,7 +117,7 @@
Seleccione imagen
- {{ image.name }}
+ {{ image.name }}
{{ image.description }}
@@ -126,10 +125,11 @@
-
-
- Repositorio
-
+
+
+ Seleccionar Repositorio
+
{{ repo }}
@@ -137,9 +137,10 @@
hourglass_empty
-
- Rama
-
+
+ Seleccionar Rama
+
{{ branch }}
@@ -147,8 +148,8 @@
hourglass_empty
-
- Filtrar por tag
+
+ Tag
No
Sí
@@ -177,7 +178,7 @@
storage
Selección de partición
-
+
@@ -193,27 +194,12 @@
-
-
- Seleccionar
-
-
-
-
-
-
-
-
-
- {{ column.header }}
-
- {{ column.cell(image) }}
-
-
-
-
-
-
+
+
@@ -255,8 +241,8 @@
Tags
-
+
{{ tag }}
Sin tags
@@ -268,16 +254,8 @@
-
-
+
-
-
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 57f00bf..6f6d1e5 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
@@ -58,6 +58,7 @@ export class DeployImageComponent implements OnInit{
selectedClients: any[] = [];
selectedModelClient: any = null;
filteredPartitions: any[] = [];
+
selectedRepository: any = null;
imageType: string = 'monolithic';
@@ -71,14 +72,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/model/model.ts b/ogWebconsole/src/app/components/groups/model/model.ts
index d1dac81..f85cc05 100644
--- a/ogWebconsole/src/app/components/groups/model/model.ts
+++ b/ogWebconsole/src/app/components/groups/model/model.ts
@@ -47,6 +47,7 @@ export interface Client {
createdBy: string;
uuid: string;
parentName?: string;
+ notes?: string;
}
export interface ClientCollection {
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..abd568e 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
@@ -86,6 +86,21 @@ table {
box-shadow: none;
}
+.notes-card {
+ background-color: #f1f1f1;
+ padding: 24px;
+ border-radius: 12px;
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
+}
+
+.notes-value {
+ font-size: 1rem;
+ color: #222;
+ white-space: pre-wrap;
+ word-break: break-word;
+ margin-top: 8px;
+}
+
.table-header-container {
display: flex;
align-items: center;
@@ -130,3 +145,120 @@ 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;
+}
+.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 1a8e3ae..c8d9c15 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) {
+
@@ -9,75 +10,120 @@
-
+ @for (data of generalData; track data) {
+
{{ data?.property }}
{{ data?.value || '--' }}
+ }
-
+ @for (data of networkData; track data) {
+
{{ data?.property }}
{{ data?.value || '--' }}
+ }
+
+
{{ 'notesLabel' | translate }}
+
{{ clientNotes || '--' }}
+
+
-
-
-
-
- {{ column.header }}
-
-
- {{ column.cell(image) }}
-
-
-
- {{ (image.size / 1024).toFixed(2) }} GB
-
-
-
-
-
- {{image.operativeSystem?.name }}
- {{ image.image?.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
0">
-
-
-
-
Disco {{ disk.diskNumber }}
-
Usado: {{ (disk.used).toFixed(2) }} GB ({{ disk.percentage }}%)
-
Total: {{ disk.total }} GB
+ @for (disk of diskUsageData; track disk.diskNumber) {
+
+
+
+
+
+
+
+ @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 (image.filesystem !== 'CACHE' || !image.cacheContent) {
+
{{image.operativeSystem?.name }}
+
{{ image.image?.name }}
+ @if (image.deployDate) {
+
Instalada el {{ image.deployDate | date:'dd/MM/yyyy HH:mm' }}
+ }
+ }
+
+ }
+
+
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ }
{{ 'closeButton' | translate }}
-
+
\ 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..055ec00 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',
@@ -129,6 +125,10 @@ export class ClientDetailsComponent {
];
}
+ get clientNotes(): string {
+ return this.clientData?.notes || '';
+ }
+
calculateDiskUsage() {
const diskUsageMap = new Map
();
@@ -168,7 +168,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
};
});
@@ -194,6 +195,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();
}
diff --git a/ogWebconsole/src/app/components/groups/shared/clients/manage-client/manage-client.component.css b/ogWebconsole/src/app/components/groups/shared/clients/manage-client/manage-client.component.css
index e67f4b7..3ae50b9 100644
--- a/ogWebconsole/src/app/components/groups/shared/clients/manage-client/manage-client.component.css
+++ b/ogWebconsole/src/app/components/groups/shared/clients/manage-client/manage-client.component.css
@@ -44,6 +44,10 @@ mat-option .unit-path {
row-gap: 20px;
}
+.full-width {
+ grid-column: 1 / -1;
+}
+
.action-container {
display: flex;
justify-content: flex-end;
diff --git a/ogWebconsole/src/app/components/groups/shared/clients/manage-client/manage-client.component.html b/ogWebconsole/src/app/components/groups/shared/clients/manage-client/manage-client.component.html
index 7257e6b..75febb5 100644
--- a/ogWebconsole/src/app/components/groups/shared/clients/manage-client/manage-client.component.html
+++ b/ogWebconsole/src/app/components/groups/shared/clients/manage-client/manage-client.component.html
@@ -106,6 +106,12 @@
{{ 'maintenance' | translate }}
+
+
+ {{ 'notesLabel' | translate }}
+
+
diff --git a/ogWebconsole/src/app/components/groups/shared/clients/manage-client/manage-client.component.ts b/ogWebconsole/src/app/components/groups/shared/clients/manage-client/manage-client.component.ts
index 69b13d9..7254741 100644
--- a/ogWebconsole/src/app/components/groups/shared/clients/manage-client/manage-client.component.ts
+++ b/ogWebconsole/src/app/components/groups/shared/clients/manage-client/manage-client.component.ts
@@ -88,7 +88,8 @@ export class ManageClientComponent implements OnInit {
repository: [null],
menu: [null],
maintenance: [false],
- resolution: [null]
+ resolution: [null],
+ notes: ['']
});
}
@@ -250,7 +251,8 @@ export class ManageClientComponent implements OnInit {
pxeTemplate: data.pxeTemplate ? data.pxeTemplate['@id'] : null,
menu: data.menu ? data.menu['@id'] : null,
maintenance: data.maintenance,
- resolution: data.resolution
+ resolution: data.resolution,
+ notes: data.notes || ''
});
resolve();
},
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) {
+
+
+
+
+
+
+
+
+
+ Seleccionar
+
+
+
+
+
+
+
+ @for (column of columns; track column.columnDef) {
+
+ {{ 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);
+ }
+ }
+}
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 6761d0f..bfdceb5 100644
--- a/ogWebconsole/src/locale/en.json
+++ b/ogWebconsole/src/locale/en.json
@@ -589,7 +589,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 dab2251..ebb45ec 100644
--- a/ogWebconsole/src/locale/es.json
+++ b/ogWebconsole/src/locale/es.json
@@ -590,7 +590,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",