refs #1480. Fixed bug in deploy form
testing/ogGui-multibranch/pipeline/head There was a failure building this commit Details

pull/16/head
Manuel Aranda Rosales 2025-02-07 12:48:04 +01:00
parent 9401448d0c
commit e2056524cf
6 changed files with 21 additions and 9 deletions

View File

@ -138,6 +138,6 @@
<mat-form-field appearance="fill" class="input-field">
<mat-label>Semilla</mat-label>
<input matInput [(ngModel)]="p2pTime" name="p2pTime">
<input matInput [(ngModel)]="p2pTime" name="p2pTime" type="number">
</mat-form-field>
</div>

View File

@ -155,22 +155,24 @@ export class DeployImageComponent {
if (!this.selectedImage) {
this.toastService.error('Debe seleccionar una imagen');
this.loading = false;
return;
}
if (!this.selectedMethod) {
this.toastService.error('Debe seleccionar un método');
this.loading = false;
return;
}
if (!this.selectedPartition) {
this.toastService.error('Debe seleccionar una partición');
this.loading = false;
return;
}
this.toastService.info('Preparando petición de despliegue');
const payload = {
clients: this.clientData.map((client: any) => client['@id']),
method: this.selectedMethod,

View File

@ -1,3 +1,5 @@
<app-loading [isLoading]="loading"></app-loading>
<div class="dashboard">
<div class="header-container">
<h2 joyrideStep="titleStep" text="Esta sección muestra el estado general del servidor OgBoot.">

View File

@ -13,6 +13,7 @@ export class OgbootStatusComponent implements OnInit {
servicesStatus: any = {};
installedOglives: any[] = [];
diskUsageChartData: any[] = [];
loading: boolean = false;
view: [number, number] = [1100, 500];
@ -31,6 +32,7 @@ export class OgbootStatusComponent implements OnInit {
}
loadStatus(): void {
this.loading = true;
this.http.get<any>(`${this.baseUrl}/og-boot/status`).subscribe(data => {
this.diskUsage = data.message.disk_usage;
this.servicesStatus = data.message.services_status;
@ -49,6 +51,7 @@ export class OgbootStatusComponent implements OnInit {
}, error => {
console.error('Error fetching status', error);
});
this.loading = false;
}
getServices(): { name: string, status: string }[] {
@ -82,5 +85,5 @@ export class OgbootStatusComponent implements OnInit {
themeColor: '#3f51b5'
});
}
}

View File

@ -1,3 +1,5 @@
<app-loading [isLoading]="loading"></app-loading>
<div class="dashboard">
<div class="header-container" >

View File

@ -13,6 +13,7 @@ export class StatusComponent {
servicesStatus: any = {};
subnets: any[] = [];
diskUsageChartData: any[] = [];
loading: boolean = false;
view: [number, number] = [1100, 500];
@ -24,13 +25,14 @@ export class StatusComponent {
domain: ['#FF6384', '#3f51b5']
};
constructor(private http: HttpClient,
constructor(private http: HttpClient,
private joyrideService: JoyrideService) {}
ngOnInit(): void {
this.loadStatus();
}
loadStatus(): void {
this.loading = true;
this.http.get<any>(`${this.baseUrl}/og-dhcp/status`).subscribe(data => {
this.diskUsage = data.message.disk_usage;
this.servicesStatus = data.message.services_status;
@ -49,6 +51,7 @@ export class StatusComponent {
}, error => {
console.error('Error fetching status', error);
});
this.loading = false;
}
getServices(): { name: string, status: string }[] {
@ -61,14 +64,14 @@ export class StatusComponent {
iniciarTour(): void {
this.joyrideService.startTour({
steps: [
'titleStep',
'diskUsageStep',
'servicesStatusStep',
'subnetsStep'
'titleStep',
'diskUsageStep',
'servicesStatusStep',
'subnetsStep'
],
showPrevButton: true,
themeColor: '#3f51b5'
});
}
}