Fix installedOgLives in global status components
testing/ogGui-multibranch/pipeline/head This commit looks good
Details
testing/ogGui-multibranch/pipeline/head This commit looks good
Details
parent
07acbc5f87
commit
7e133f2b2b
|
@ -1,5 +1,5 @@
|
|||
<header>
|
||||
<h1 mat-dialog-title>Estado global de la aplicación</h1>
|
||||
<h1 mat-dialog-title>{{'GlobalStatus' | translate}}</h1>
|
||||
</header>
|
||||
<mat-dialog-content>
|
||||
<mat-tab-group (selectedTabChange)="onTabChange($event)">
|
||||
|
|
|
@ -44,7 +44,7 @@ export class GlobalStatusComponent implements OnInit {
|
|||
this.loadOgBootStatus();
|
||||
}
|
||||
|
||||
loadStatus(apiUrl: string, diskUsage: any, servicesStatus: any, diskUsageChartData: any[]): void {
|
||||
loadStatus(apiUrl: string, diskUsage: any, servicesStatus: any, diskUsageChartData: any[], installedOgLives: any[]): void {
|
||||
this.loading = true;
|
||||
const timeoutId = setTimeout(() => {
|
||||
this.loading = false;
|
||||
|
@ -57,8 +57,11 @@ export class GlobalStatusComponent implements OnInit {
|
|||
diskUsage.total = data.message.disk_usage.total;
|
||||
diskUsage.percentage = data.message.disk_usage.percentage;
|
||||
|
||||
servicesStatus = data.message.services_status;
|
||||
this.installedOgLives = data.message.installed_oglives;
|
||||
Object.assign(servicesStatus, data.message.services_status);
|
||||
installedOgLives.length = 0;
|
||||
if (data.message.installed_oglives) {
|
||||
installedOgLives.push(...data.message.installed_oglives);
|
||||
}
|
||||
|
||||
diskUsageChartData.length = 0;
|
||||
diskUsageChartData.push(
|
||||
|
@ -79,11 +82,11 @@ export class GlobalStatusComponent implements OnInit {
|
|||
}
|
||||
|
||||
loadOgBootStatus(): void {
|
||||
this.loadStatus(this.ogBootApiUrl, this.ogBootDiskUsage, this.ogBootServicesStatus, this.ogBootDiskUsageChartData)
|
||||
this.loadStatus(this.ogBootApiUrl, this.ogBootDiskUsage, this.ogBootServicesStatus, this.ogBootDiskUsageChartData, this.installedOgLives);
|
||||
}
|
||||
|
||||
loadDhcpStatus(): void {
|
||||
this.loadStatus(this.dhcpApiUrl, this.dhcpDiskUsage, this.dhcpServicesStatus, this.dhcpDiskUsageChartData)
|
||||
this.loadStatus(this.dhcpApiUrl, this.dhcpDiskUsage, this.dhcpServicesStatus, this.dhcpDiskUsageChartData, this.installedOgLives);
|
||||
}
|
||||
|
||||
onTabChange(event: MatTabChangeEvent): void {
|
||||
|
|
|
@ -26,6 +26,7 @@ export class StatusTabComponent {
|
|||
name: key,
|
||||
status: this.servicesStatus[key]
|
||||
}))
|
||||
console.log(services)
|
||||
return services;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue