diff --git a/ogWebconsole/src/app/components/global-status/global-status.component.html b/ogWebconsole/src/app/components/global-status/global-status.component.html
index de2145e..886dfe7 100644
--- a/ogWebconsole/src/app/components/global-status/global-status.component.html
+++ b/ogWebconsole/src/app/components/global-status/global-status.component.html
@@ -1,5 +1,5 @@
- Estado global de la aplicación
+ {{'GlobalStatus' | translate}}
diff --git a/ogWebconsole/src/app/components/global-status/global-status.component.ts b/ogWebconsole/src/app/components/global-status/global-status.component.ts
index 32e92db..bc0812f 100644
--- a/ogWebconsole/src/app/components/global-status/global-status.component.ts
+++ b/ogWebconsole/src/app/components/global-status/global-status.component.ts
@@ -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 {
diff --git a/ogWebconsole/src/app/components/global-status/status-tab/status-tab.component.ts b/ogWebconsole/src/app/components/global-status/status-tab/status-tab.component.ts
index 970cfa1..00efd4d 100644
--- a/ogWebconsole/src/app/components/global-status/status-tab/status-tab.component.ts
+++ b/ogWebconsole/src/app/components/global-status/status-tab/status-tab.component.ts
@@ -26,6 +26,7 @@ export class StatusTabComponent {
name: key,
status: this.servicesStatus[key]
}))
+ console.log(services)
return services;
}