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 886dfe7..dce42df 100644 --- a/ogWebconsole/src/app/components/global-status/global-status.component.html +++ b/ogWebconsole/src/app/components/global-status/global-status.component.html @@ -13,7 +13,8 @@ [view]="view" [colorScheme]="colorScheme" [isDoughnut]="isDoughnut" - [showLabels]="showLabels"> + [showLabels]="showLabels" + [isDhcp]="isDhcp"> @@ -22,12 +23,13 @@ [loading]="loading" [diskUsage]="dhcpDiskUsage" [servicesStatus]="dhcpServicesStatus" - [installedOgLives]="installedOgLives" + [subnets]="subnets" [diskUsageChartData]="dhcpDiskUsageChartData" [view]="view" [colorScheme]="colorScheme" [isDoughnut]="isDoughnut" - [showLabels]="showLabels"> + [showLabels]="showLabels" + [isDhcp]="isDhcp"> 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 bc0812f..6272b4b 100644 --- a/ogWebconsole/src/app/components/global-status/global-status.component.ts +++ b/ogWebconsole/src/app/components/global-status/global-status.component.ts @@ -13,6 +13,7 @@ export class GlobalStatusComponent implements OnInit { baseUrl: string; loading: boolean = false; installedOgLives: any[] = []; + subnets: any[] = []; showLabels: boolean = true; isDoughnut: boolean = true; colorScheme: any = { @@ -29,6 +30,7 @@ export class GlobalStatusComponent implements OnInit { dhcpDiskUsage: any = {}; dhcpServicesStatus: any = {}; dhcpDiskUsageChartData: any[] = []; + isDhcp: boolean = false; constructor( private configService: ConfigService, @@ -44,7 +46,7 @@ export class GlobalStatusComponent implements OnInit { this.loadOgBootStatus(); } - loadStatus(apiUrl: string, diskUsage: any, servicesStatus: any, diskUsageChartData: any[], installedOgLives: any[]): void { + loadStatus(apiUrl: string, diskUsage: any, servicesStatus: any, diskUsageChartData: any[], installedOgLives: any[], isDhcp: boolean): void { this.loading = true; const timeoutId = setTimeout(() => { this.loading = false; @@ -58,9 +60,17 @@ export class GlobalStatusComponent implements OnInit { diskUsage.percentage = data.message.disk_usage.percentage; Object.assign(servicesStatus, data.message.services_status); - installedOgLives.length = 0; - if (data.message.installed_oglives) { - installedOgLives.push(...data.message.installed_oglives); + + if (isDhcp) { + this.subnets.length = 0; + if (data.message.subnets) { + this.subnets.push(...data.message.subnets); + } + } else { + installedOgLives.length = 0; + if (data.message.installed_oglives) { + installedOgLives.push(...data.message.installed_oglives); + } } diskUsageChartData.length = 0; @@ -82,11 +92,13 @@ export class GlobalStatusComponent implements OnInit { } loadOgBootStatus(): void { - this.loadStatus(this.ogBootApiUrl, this.ogBootDiskUsage, this.ogBootServicesStatus, this.ogBootDiskUsageChartData, this.installedOgLives); + this.isDhcp = false; + this.loadStatus(this.ogBootApiUrl, this.ogBootDiskUsage, this.ogBootServicesStatus, this.ogBootDiskUsageChartData, this.installedOgLives, this.isDhcp); } loadDhcpStatus(): void { - this.loadStatus(this.dhcpApiUrl, this.dhcpDiskUsage, this.dhcpServicesStatus, this.dhcpDiskUsageChartData, this.installedOgLives); + this.isDhcp = true; + this.loadStatus(this.dhcpApiUrl, this.dhcpDiskUsage, this.dhcpServicesStatus, this.dhcpDiskUsageChartData, this.installedOgLives, this.isDhcp); } onTabChange(event: MatTabChangeEvent): void { diff --git a/ogWebconsole/src/app/components/global-status/status-tab/status-tab.component.html b/ogWebconsole/src/app/components/global-status/status-tab/status-tab.component.html index c94d266..0893c75 100644 --- a/ogWebconsole/src/app/components/global-status/status-tab/status-tab.component.html +++ b/ogWebconsole/src/app/components/global-status/status-tab/status-tab.component.html @@ -31,24 +31,32 @@ - +
{{ 'idLabel' | translate }} | -{{ 'kernelLabel' | translate }} | -{{ 'architectureLabel' | translate }} | -{{ 'revisionLabel' | translate }} | +{{ 'kernelLabel' | translate }} | +{{ 'architectureLabel' | translate }} | +{{ 'revisionLabel' | translate }} | +{{ 'bootFileNameLabel' | translate }} | +{{ 'nextServerLabel' | translate }} | +{{ 'ipLabel' | translate }} | +{{ 'clientsLabel' | translate }} |
---|---|---|---|---|---|---|---|---|---|---|
{{ oglive.id }} | -{{ oglive.kernel }} | -{{ oglive.architecture }} | -{{ oglive.revision }} | +|||||||
{{ item.id }} | +{{ item.kernel }} | +{{ item.architecture }} | +{{ item.revision }} | +{{ item['boot-file-name'] }} | +{{ item['next-server'] }} | +{{ item.subnet }} | +{{ item.reservations.length }} |