-
-
-
+
+
{{ clientData?.property }}
{{ clientData?.value }}
-
-
{{ clientData?.property }}
{{ clientData?.value }}
-
-
-
-
-
-
-
-
-
- {{ column.header | translate }} |
-
-
- {{ column.cell(image) }}
-
-
-
- {{ (image.size / 1024).toFixed(2) }} GB
-
-
- |
-
-
-
-
-
-
-
-
0">
-
-
-
{{ 'diskTitle' | translate }} {{ disk.diskNumber }}
-
-
-
-
{{ 'diskUsedLabel' | translate }}: {{ disk.used }} GB ({{ disk.percentage }}%)
-
{{ 'diskTotalLabel' | translate }}: {{ disk.total }} GB
-
-
-
+
+
+
+
-
+
+
+
+ {{ column.header }} |
+
+
+ {{ column.cell(image) }}
+
+
+
+ {{ (image.size / 1024).toFixed(2) }} GB
+
+
+ |
+
+
+
+
+
+
+
+
0">
+
+
+
+
+
+
Disco {{ disk.diskNumber }}
+
Usado: {{ (disk.used).toFixed(2) }} GB ({{ disk.percentage }}%)
+
Total: {{ disk.total }} GB
+
+
+
+
+
+
+
diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/client-main-view.component.ts b/ogWebconsole/src/app/components/groups/components/client-main-view/client-main-view.component.ts
index 3e4c70f..335f3cc 100644
--- a/ogWebconsole/src/app/components/groups/components/client-main-view/client-main-view.component.ts
+++ b/ogWebconsole/src/app/components/groups/components/client-main-view/client-main-view.component.ts
@@ -31,6 +31,24 @@ export class ClientMainViewComponent implements OnInit {
diskUsageData: any[] = [];
partitions: any[] = [];
commands: any[] = [];
+ chartDisk: any[] = [];
+ view: [number, number] = [600, 300];
+ showLegend: boolean = true;
+
+ arrayCommands: any[] = [
+ {name: 'Enceder', slug: 'power-on'},
+ {name: 'Apagar', slug: 'power-off'},
+ {name: 'Reiniciar', slug: 'reboot'},
+ {name: 'Iniciar Sesión', slug: 'login'},
+ {name: 'Crear Image', slug: 'create-image'},
+ {name: 'Deploy Image', slug: 'deploy-image'},
+ {name: 'Eliminar Imagen Cache', slug: 'delete-image-cache'},
+ {name: 'Particionar y Formatear', slug: 'partition'},
+ {name: 'Inventario Software', slug: 'software-inventory'},
+ {name: 'Inventario Hardware', slug: 'hardware-inventory'},
+ {name: 'Ejecutar script', slug: 'run-script'},
+ ];
+
datePipe: DatePipe = new DatePipe('es-ES');
columns = [
{
@@ -58,6 +76,11 @@ export class ClientMainViewComponent implements OnInit {
header: 'Uso',
cell: (partition: any) => `${partition.memoryUsage} %`
},
+ {
+ columnDef: 'operativeSystem',
+ header: 'SO',
+ cell: (partition: any) => `${partition.operativeSystem?.name}`
+ },
];
displayedColumns = [...this.columns.map(column => column.columnDef)];
isDiskUsageEmpty: boolean = true;
@@ -100,11 +123,11 @@ export class ClientMainViewComponent implements OnInit {
this.networkData = [
{ property: 'Remote Pc', value: this.clientData.remotePc || '' },
{ property: 'Subred', value: this.clientData?.subnet || '' },
- { property: 'OGlive', value: '' },
+ { property: 'OGlive', value: this.clientData?.ogLive?.name || '' },
{ property: 'Autoexec', value: '' },
- { property: 'Repositorio', value: '' },
+ { property: 'Repositorio', value: this.clientData?.repository?.name || '' },
{ property: 'Validación', value: this.clientData?.organizationalUnit?.networkSettings?.validation || '' },
- { property: 'Pxe', value: this.clientData?.template.name || '' },
+ { property: 'Pxe', value: this.clientData?.template?.name || '' },
{ property: 'Creado por', value: this.clientData?.createdBy || '' }
];
}
@@ -124,19 +147,39 @@ export class ClientMainViewComponent implements OnInit {
if (partition.partitionNumber === 0) {
diskData!.total = Number((partition.size / 1024).toFixed(2));
} else {
- diskData!.used += Number(((partition.size * (partition.memoryUsage / 100)) / 1024).toFixed(2));
+ diskData!.used += Number((partition.size / 1024).toFixed(2));
diskData!.partitions.push(partition);
}
});
- this.diskUsageData = Array.from(diskUsageMap.entries()).map(([diskNumber, { total, used, partitions }]) => {
- const percentage = total > 0 ? Math.round((used / total) * 100) : 0;
- return { diskNumber, total, used, percentage, partitions };
+ this.chartDisk = Array.from(diskUsageMap.entries()).map(([diskNumber, { total, used, partitions }]) => {
+ const partitionData = partitions.map(partition => ({
+ name: `Partición ${partition.partitionNumber}`,
+ value: Number((partition.size / 1024).toFixed(2))
+ }));
+
+ const freeSpace = total - used;
+ if (freeSpace > 0) {
+ partitionData.push({
+ name: 'Espacio libre',
+ value: Number(freeSpace.toFixed(2))
+ });
+ }
+
+ return {
+ diskNumber,
+ chartData: partitionData,
+ total,
+ used,
+ percentage: total > 0 ? Math.round((used / total) * 100) : 0
+ };
});
+ this.diskUsageData = this.chartDisk;
this.isDiskUsageEmpty = this.diskUsageData.length === 0;
}
+
getStrokeOffset(partitions: any[], index: number): number {
const totalSize = partitions.reduce((acc, part) => acc + (part.size / 1024), 0);
@@ -170,15 +213,34 @@ export class ClientMainViewComponent implements OnInit {
});
}
- onCommandSelect(command: any): void {
- if (command.name === 'Particionar y Formatear') {
+ onCommandSelect(action: any): void {
+ if (action === 'partition') {
this.openPartitionAssistant();
}
+
+ if (action === 'create-image') {
+ this.openCreateImageAssistant();
+ }
+
+ if (action === 'deploy-image') {
+ this.openDeployImageAssistant();
+ }
}
openPartitionAssistant(): void {
- console.log(this.clientData)
- this.router.navigate([`/client/${this.clientData.uuid}/partition-assistant`]).then(r => {
+ this.router.navigate([`/clients/${this.clientData.uuid}/partition-assistant`]).then(r => {
+ console.log('navigated', r);
+ });
+ }
+
+ openCreateImageAssistant(): void {
+ this.router.navigate([`/clients/${this.clientData.uuid}/create-image`]).then(r => {
+ console.log('navigated', r);
+ });
+ }
+
+ openDeployImageAssistant(): void {
+ this.router.navigate([`/clients/${this.clientData.uuid}/deploy-image`]).then(r => {
console.log('navigated', r);
});
}
diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.css b/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.css
new file mode 100644
index 0000000..fc11805
--- /dev/null
+++ b/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.css
@@ -0,0 +1,76 @@
+.title {
+ font-size: 24px;
+}
+
+.calendar-button-row {
+ display: flex;
+ justify-content: flex-start;
+ margin-top: 16px;
+}
+
+.divider {
+ margin: 20px 0;
+}
+
+.lists-container {
+ padding: 16px;
+}
+
+.card.unidad-card {
+ height: 100%;
+ box-sizing: border-box;
+}
+
+table {
+ width: 100%;
+ margin-top: 50px;
+}
+
+.search-container {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ width: 100%;
+ padding: 0 5px;
+ box-sizing: border-box;
+}
+
+.select-container {
+ margin-top: 20px;
+ align-items: center;
+ width: 100%;
+ padding: 0 5px;
+ box-sizing: border-box;
+}
+
+.full-width {
+ width: 100%;
+ margin-bottom: 16px;
+}
+
+.search-string {
+ flex: 2;
+ padding: 5px;
+}
+
+.search-boolean {
+ flex: 1;
+ padding: 5px;
+}
+
+.header-container {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 10px;
+}
+
+.mat-elevation-z8 {
+ box-shadow: 0px 0px 0px rgba(0,0,0,0.2);
+}
+
+.paginator-container {
+ display: flex;
+ justify-content: end;
+ margin-bottom: 30px;
+}
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
new file mode 100644
index 0000000..85216c9
--- /dev/null
+++ b/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+ Nombre canónico
+
+
+
+
+ Seleccione imagen
+
+ --
+ {{ image.name }}
+
+
+
+
+
+
+ Seleccionar partición |
+
+
+
+
+
+ |
+
+
+
+ {{ column.header }} |
+
+ {{ column.cell(image) }}
+ |
+
+
+
+
+
diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.spec.ts b/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.spec.ts
new file mode 100644
index 0000000..3949532
--- /dev/null
+++ b/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CreateImageComponent } from './create-image.component';
+
+describe('CreateImageComponent', () => {
+ let component: CreateImageComponent;
+ let fixture: ComponentFixture
;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [CreateImageComponent]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(CreateImageComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
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
new file mode 100644
index 0000000..d306be8
--- /dev/null
+++ b/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.ts
@@ -0,0 +1,168 @@
+import {Component, EventEmitter, Output} from '@angular/core';
+import {HttpClient} from "@angular/common/http";
+import {ToastrService} from "ngx-toastr";
+import {ActivatedRoute} from "@angular/router";
+import {MatButton} from "@angular/material/button";
+import {MatDivider} from "@angular/material/divider";
+import {NgForOf, NgIf} from "@angular/common";
+import {FormsModule, ReactiveFormsModule} from "@angular/forms";
+import {
+ MatCell, MatCellDef,
+ MatColumnDef,
+ MatHeaderCell,
+ MatHeaderCellDef, MatHeaderRow, MatHeaderRowDef, MatRow, MatRowDef,
+ MatTable,
+ MatTableDataSource
+} from "@angular/material/table";
+import {MatChip} from "@angular/material/chips";
+import {MatCheckbox} from "@angular/material/checkbox";
+import {SelectionModel} from "@angular/cdk/collections";
+import {MatRadioButton, MatRadioGroup} from "@angular/material/radio";
+import {MatFormField, MatLabel} from "@angular/material/form-field";
+import {MatOption} from "@angular/material/autocomplete";
+import {MatSelect} from "@angular/material/select";
+import {MatInput} from "@angular/material/input";
+
+@Component({
+ selector: 'app-create-image',
+ templateUrl: './create-image.component.html',
+ standalone: true,
+ imports: [
+ MatButton,
+ MatDivider,
+ NgForOf,
+ NgIf,
+ ReactiveFormsModule,
+ MatTable,
+ MatColumnDef,
+ MatHeaderCell,
+ MatHeaderCellDef,
+ MatCell,
+ MatCellDef,
+ MatChip,
+ MatHeaderRow,
+ MatRow,
+ MatHeaderRowDef,
+ MatRowDef,
+ MatCheckbox,
+ MatRadioGroup,
+ MatRadioButton,
+ MatFormField,
+ MatLabel,
+ MatOption,
+ MatSelect,
+ MatInput,
+ FormsModule
+ ],
+ styleUrl: './create-image.component.css'
+})
+export class CreateImageComponent {
+ baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
+ @Output() dataChange = new EventEmitter();
+
+ errorMessage = '';
+ clientId: string | null = null;
+ partitions: any[] = [];
+ images: any[] = [];
+ clientName: string = '';
+ selectedImage: string | null = null;
+ selectedPartition: any = null;
+ name: string = '';
+ dataSource = new MatTableDataSource();
+ columns = [
+ {
+ columnDef: 'diskNumber',
+ header: 'Disco',
+ cell: (partition: any) => `${partition.diskNumber}`
+ },
+ {
+ columnDef: 'partitionNumber',
+ header: 'Particion',
+ cell: (partition: any) => `${partition.partitionNumber}`
+ },
+ {
+ columnDef: 'size',
+ header: 'Tamaño',
+ cell: (partition: any) => `${partition.size} MB`
+ },
+ {
+ columnDef: 'filesystem',
+ header: 'Sistema de ficheros',
+ cell: (partition: any) => `${partition.filesystem}`
+ },
+ {
+ columnDef: 'operativeSystem',
+ header: 'SO',
+ cell: (partition: any) => `${partition.operativeSystem?.name}`
+ }
+ ];
+
+ displayedColumns = ['select', ...this.columns.map(column => column.columnDef)];
+ selection = new SelectionModel(true, []);
+
+ constructor(
+ private http: HttpClient,
+ private toastService: ToastrService,
+ private route: ActivatedRoute
+ ) {}
+
+ ngOnInit() {
+ this.clientId = this.route.snapshot.paramMap.get('id');
+
+ this.loadPartitions();
+ this.loadImages();
+ }
+
+ loadPartitions() {
+ const url = `${this.baseUrl}/clients/${this.clientId}`;
+ this.http.get(url).subscribe(
+ (response: any) => {
+ if (response.partitions) {
+ this.clientName = response.name;
+
+ this.dataSource.data = response.partitions.filter((partition: any) => {
+ return partition.partitionNumber !== 0;
+ });
+ }
+ },
+ (error) => {
+ console.error('Error al cargar los datos del cliente:', error);
+ }
+ );
+ }
+
+ loadImages() {
+ const url = `${this.baseUrl}/images?created=true&page=1&itemsPerPage=1000`;
+ this.http.get(url).subscribe(
+ (response: any) => {
+ this.images = response['hydra:member'];
+ },
+ (error) => {
+ console.error('Error al cargar las imágenes:', error);
+ }
+ );
+ }
+
+ save(): void {
+ const payload = {
+ client: `/clients/${this.clientId}`,
+ name: this.name,
+ image: this.selectedImage,
+ partition: this.selectedPartition['@id'],
+ source: 'assistant'
+ };
+
+
+ this.http.post(`${this.baseUrl}/images`, payload)
+ .subscribe({
+ next: (response) => {
+ this.toastService.success('Imagen creada exitosamente');
+ },
+ error: (error) => {
+ console.error('Error:', error);
+ this.toastService.error(error.error['hydra:description']);
+ }
+ }
+ );
+ }
+}
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
new file mode 100644
index 0000000..6f2e1d9
--- /dev/null
+++ b/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.css
@@ -0,0 +1,84 @@
+
+.divider {
+ margin: 20px 0;
+}
+
+table {
+ width: 100%;
+ margin-top: 50px;
+}
+
+.search-container {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ width: 100%;
+ padding: 0 5px;
+ box-sizing: border-box;
+}
+
+.option-container {
+ margin: 20px 0;
+ width: 100%;
+}
+
+.deploy-container {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ width: 100%;
+ padding: 5px;
+ gap: 10px;
+}
+
+.select-container {
+ margin-top: 20px;
+ align-items: center;
+ width: 100%;
+ padding: 0 5px;
+ box-sizing: border-box;
+}
+
+.input-group {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 16px;
+ margin-top: 20px;
+}
+
+.input-field {
+ flex: 1 1 calc(33.33% - 16px);
+ min-width: 250px;
+}
+
+.full-width {
+ width: 100%;
+ margin-bottom: 16px;
+}
+
+.search-string {
+ flex: 2;
+ padding: 5px;
+}
+
+.search-boolean {
+ flex: 1;
+ padding: 5px;
+}
+
+.header-container {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 10px;
+}
+
+.mat-elevation-z8 {
+ box-shadow: 0px 0px 0px rgba(0,0,0,0.2);
+}
+
+.paginator-container {
+ display: flex;
+ justify-content: end;
+ margin-bottom: 30px;
+}
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
new file mode 100644
index 0000000..347e2e2
--- /dev/null
+++ b/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.html
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+ Actualizar cache
+ Deploy imagen
+
+
+
+
+
+ Seleccione imagen
+
+ {{ image.name }}
+
+
+
+
+ Seleccione método de deploy
+
+ {{ method }}
+
+
+
+
+
+
+
+ Seleccionar partición |
+
+
+
+
+
+ |
+
+
+
+ {{ column.header }} |
+
+ {{ column.cell(image) }}
+ |
+
+
+
+
+
+
+
+
+
+
+
+ Puerto
+
+
+
+
+ Dirección
+
+
+
+
+ Modo Multicast
+
+
+ {{ option.name }}
+
+
+
+
+
+ Velocidad
+
+
+
+
+ Máximo Clientes
+
+
+
+
+ Tiempo Máximo de Espera
+
+
+
+
+
+
+ Modo P2P
+
+
+ {{ option.name }}
+
+
+
+
+
+ Semilla
+
+
+
diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.spec.ts b/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.spec.ts
new file mode 100644
index 0000000..b6b9991
--- /dev/null
+++ b/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DeployImageComponent } from './deploy-image.component';
+
+describe('DeployImageComponent', () => {
+ let component: DeployImageComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [DeployImageComponent]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(DeployImageComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
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
new file mode 100644
index 0000000..58623ea
--- /dev/null
+++ b/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.ts
@@ -0,0 +1,173 @@
+import {Component, EventEmitter, Output} from '@angular/core';
+import {MatTableDataSource} from "@angular/material/table";
+import {SelectionModel} from "@angular/cdk/collections";
+import {HttpClient} from "@angular/common/http";
+import {ToastrService} from "ngx-toastr";
+import {ActivatedRoute} from "@angular/router";
+
+@Component({
+ selector: 'app-deploy-image',
+ templateUrl: './deploy-image.component.html',
+ styleUrl: './deploy-image.component.css'
+})
+export class DeployImageComponent {
+ baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
+ @Output() dataChange = new EventEmitter();
+
+ errorMessage = '';
+ clientId: string | null = null;
+ partitions: any[] = [];
+ images: any[] = [];
+ clientName: string = '';
+ selectedImage: string | null = null;
+ selectedOption: string | null = null;
+ selectedMethod: string | null = null;
+ selectedPartition: any = null;
+ mcastIp: string = '';
+ mcastPort: string = '';
+ mcastMode: string = '';
+ mcastSpeed: Number = 0;
+ mcastMaxClients: Number = 0;
+ mcastMaxTime: Number = 0;
+ p2pMode: string = '';
+ p2pTime: Number = 0;
+ name: string = '';
+
+ protected p2pModeOptions = [
+ { name: 'Leecher', value: 'p2p-mode-leecher' },
+ { name: 'Peer', value: 'p2p-mode-peer' },
+ { name: 'Seeder', value: 'p2p-mode-seeder' },
+ ];
+ protected multicastModeOptions = [
+ {"name": 'Half duplex', "value": "half-duplex"},
+ {"name": 'Full duplex', "value": "full-duplex"},
+ ];
+
+ allMethods = [
+ 'multicast',
+ 'multicast-direct',
+ 'unicast',
+ 'unicast-direct',
+ 'torrent'
+ ];
+
+ updateCacheMethods = [
+ 'multicast',
+ 'unicast',
+ 'torrent'
+ ];
+
+ dataSource = new MatTableDataSource();
+ columns = [
+ {
+ columnDef: 'diskNumber',
+ header: 'Disco',
+ cell: (partition: any) => `${partition.diskNumber}`
+ },
+ {
+ columnDef: 'partitionNumber',
+ header: 'Particion',
+ cell: (partition: any) => `${partition.partitionNumber}`
+ },
+ {
+ columnDef: 'size',
+ header: 'Tamaño',
+ cell: (partition: any) => `${partition.size} MB`
+ },
+ {
+ columnDef: 'filesystem',
+ header: 'Sistema de ficheros',
+ cell: (partition: any) => `${partition.filesystem}`
+ },
+ {
+ columnDef: 'operativeSystem',
+ header: 'SO',
+ cell: (partition: any) => `${partition.operativeSystem?.name}`
+ }
+ ];
+
+ displayedColumns = ['select', ...this.columns.map(column => column.columnDef)];
+ selection = new SelectionModel(true, []);
+
+ constructor(
+ private http: HttpClient,
+ private toastService: ToastrService,
+ private route: ActivatedRoute
+ ) {}
+
+ ngOnInit() {
+ this.clientId = this.route.snapshot.paramMap.get('id');
+
+ this.loadPartitions();
+ this.loadImages();
+ }
+
+ get deployMethods() {
+ return this.selectedOption === 'update-cache' ? this.updateCacheMethods : this.allMethods;
+ }
+
+ isMethod(method: string): boolean {
+ return this.selectedMethod === method;
+ }
+
+ loadPartitions() {
+ const url = `${this.baseUrl}/clients/${this.clientId}`;
+ this.http.get(url).subscribe(
+ (response: any) => {
+ if (response.partitions) {
+ this.clientName = response.name;
+ this.dataSource.data = response.partitions.filter((partition: any) => {
+ return partition.partitionNumber !== 0;
+ });
+ this.p2pMode = response.organizationalUnit?.networkSettings?.p2pMode;
+ this.p2pTime = response.organizationalUnit?.networkSettings?.p2pTime;
+ this.mcastSpeed = response.organizationalUnit?.networkSettings?.mcastSpeed;
+ this.mcastMode = response.organizationalUnit?.networkSettings?.mcastMode;
+ this.mcastPort = response.organizationalUnit?.networkSettings?.mcastPort;
+ this.mcastIp = response.organizationalUnit?.networkSettings?.mcastIp;
+ }
+ },
+ (error) => {
+ console.error('Error al cargar los datos del cliente:', error);
+ }
+ );
+ }
+
+ loadImages() {
+ const url = `${this.baseUrl}/images?page=1&itemsPerPage=1000`;
+ this.http.get(url).subscribe(
+ (response: any) => {
+ this.images = response['hydra:member'];
+ },
+ (error) => {
+ console.error('Error al cargar las imágenes:', error);
+ }
+ );
+ }
+
+ save(): void {
+ const payload = {
+ client: `/clients/${this.clientId}`,
+ method: this.selectedMethod,
+ partition: this.selectedPartition['@id'],
+ p2pMode: this.p2pMode,
+ p2pTime: this.p2pTime,
+ mcastIp: this.mcastIp,
+ mcastPort: this.mcastPort,
+ mcastMode: this.mcastMode,
+ mcastSpeed: this.mcastSpeed,
+ };
+
+ this.http.post(`${this.baseUrl}${this.selectedImage}/deploy-image`, payload)
+ .subscribe({
+ next: (response) => {
+ this.toastService.success('Imagen creada exitosamente');
+ },
+ error: (error) => {
+ console.error('Error:', error);
+ this.toastService.error(error.error['hydra:description']);
+ }
+ }
+ );
+ }
+}
diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/partition-assistant/partition-assistant.component.html b/ogWebconsole/src/app/components/groups/components/client-main-view/partition-assistant/partition-assistant.component.html
index ad4b1e9..af3e4ca 100644
--- a/ogWebconsole/src/app/components/groups/components/client-main-view/partition-assistant/partition-assistant.component.html
+++ b/ogWebconsole/src/app/components/groups/components/client-main-view/partition-assistant/partition-assistant.component.html
@@ -1,22 +1,5 @@
-<<<<<<< Updated upstream
Asistente de particionado
-=======
-
-
-
-
-
-
- {{ 'diskSizeLabel' | translate }}: {{ (disk.totalDiskSize / 1024).toFixed(2) }} GB
-
->>>>>>> Stashed changes
-
-
-
-
-
-<<<<<<< Updated upstream
-
-=======
-
->>>>>>> Stashed changes