From e8e68649cde00ba7df4e9bd95e92d25b19362525 Mon Sep 17 00:00:00 2001 From: Lucas Lara Date: Tue, 18 Mar 2025 10:13:30 +0100 Subject: [PATCH] refs #1705 Enhance Global Status component to reload OgBoot status on tab change --- .../global-status/global-status.component.html | 2 +- .../components/global-status/global-status.component.ts | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) 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 2b08c03..3a8df76 100644 --- a/ogWebconsole/src/app/components/global-status/global-status.component.html +++ b/ogWebconsole/src/app/components/global-status/global-status.component.html @@ -2,7 +2,7 @@

Estado global de la aplicación

- +
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 2efc1f4..9651a92 100644 --- a/ogWebconsole/src/app/components/global-status/global-status.component.ts +++ b/ogWebconsole/src/app/components/global-status/global-status.component.ts @@ -2,6 +2,7 @@ import { HttpClient } from '@angular/common/http'; import { Component, OnInit } from '@angular/core'; import { ConfigService } from '@services/config.service'; import { ToastrService } from 'ngx-toastr'; +import { MatTabChangeEvent } from '@angular/material/tabs'; @Component({ selector: 'app-global-status', @@ -35,7 +36,7 @@ export class GlobalStatusComponent implements OnInit { } ngOnInit(): void { - + this.loadOgBootStatus(); } loadOgBootStatus(): void { @@ -56,6 +57,12 @@ export class GlobalStatusComponent implements OnInit { }); } + onTabChange(event: MatTabChangeEvent): void { + if (event.tab.textLabel === 'OgBoot') { + this.loadOgBootStatus(); + } + } + getServices(): { name: string, status: string }[] { return Object.keys(this.ogBootServicesStatus).map(key => ({ name: key,