refs #1705 Enhance Global Status component to reload OgBoot status on tab change
testing/ogGui-multibranch/pipeline/head This commit looks good Details

pull/18/head
Lucas Lara García 2025-03-18 10:13:30 +01:00
parent 984e4fe4db
commit e8e68649cd
2 changed files with 9 additions and 2 deletions

View File

@ -2,7 +2,7 @@
<h1 mat-dialog-title>Estado global de la aplicación</h1>
</header>
<mat-dialog-content>
<mat-tab-group>
<mat-tab-group (selectedTabChange)="onTabChange($event)">
<mat-tab label="OgBoot">
<app-loading [isLoading]="loading"></app-loading>
<div class="dashboard">

View File

@ -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,