This is an automated email from the ASF dual-hosted git repository.
liuhongyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
The following commit(s) were added to refs/heads/master by this push:
new b174c8622c [bugfix]: fix for the collector tab click effect error
(#3932)
b174c8622c is described below
commit b174c8622ceba40161466d1ec6ef702921b277e5
Author: Sahil Shadwal <[email protected]>
AuthorDate: Sun Dec 28 16:12:04 2025 +0530
[bugfix]: fix for the collector tab click effect error (#3932)
---
web-app/src/app/routes/dashboard/dashboard.component.html | 12 ++++++------
web-app/src/app/routes/dashboard/dashboard.component.ts | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/web-app/src/app/routes/dashboard/dashboard.component.html
b/web-app/src/app/routes/dashboard/dashboard.component.html
index deca2ba1f9..fd5276d0c6 100644
--- a/web-app/src/app/routes/dashboard/dashboard.component.html
+++ b/web-app/src/app/routes/dashboard/dashboard.component.html
@@ -402,7 +402,7 @@
</span>
</ng-template>
<nz-card-tab>
- <nz-tabset nzSize="small"
[(nzSelectedIndex)]="collectorsTabSelectedIndex">
+ <nz-tabset nzSize="small"
[(nzSelectedIndex)]="collectorsTabSelectedIndexes[i]">
<nz-tab [nzTitle]="'collector.status' | i18n" />
<nz-tab [nzTitle]="'collector.task' | i18n" />
<nz-tab [nzTitle]="'collector.start-time' | i18n" />
@@ -410,7 +410,7 @@
<nz-tab [nzTitle]="'collector.node' | i18n" />
</nz-tabset>
</nz-card-tab>
- <ng-container *ngIf="collectorsTabSelectedIndex === 0">
+ <ng-container *ngIf="collectorsTabSelectedIndexes[i] === 0">
<div class="rounded-lg" style="text-align: center; width: 100%;
background-color: transparent; padding: 2%">
<span [style]="'font-size: x-large; font-weight: bolder;' +
(item.collector.status == 0 ? 'color: green' : 'color: red')">
{{
@@ -419,7 +419,7 @@
</span>
</div>
</ng-container>
- <ng-container *ngIf="collectorsTabSelectedIndex === 1">
+ <ng-container *ngIf="collectorsTabSelectedIndexes[i] === 1">
<div class="rounded-lg" style="text-align: center; width: 100%;
background-color: transparent; padding: 2%">
<span style="font-size: xxx-large; font-weight: bolder">
{{ item.pinMonitorNum + item.dispatchMonitorNum }}
@@ -431,19 +431,19 @@
>
</div>
</ng-container>
- <ng-container *ngIf="collectorsTabSelectedIndex === 2">
+ <ng-container *ngIf="collectorsTabSelectedIndexes[i] === 2">
<div class="rounded-lg" style="text-align: center; width: 100%;
background-color: transparent; padding: 2%">
<span style="font-size: x-large; font-weight: bolder">{{
(item.collector.gmtUpdate | date : 'YYYY-MM-dd
HH:mm:ss')?.trim()
}}</span>
</div>
</ng-container>
- <ng-container *ngIf="collectorsTabSelectedIndex === 3">
+ <ng-container *ngIf="collectorsTabSelectedIndexes[i] === 3">
<div class="rounded-lg" style="text-align: center; width: 100%;
background-color: transparent; padding: 2%">
<span style="font-size: x-large; font-weight: bolder">{{
item.collector.ip }}</span>
</div>
</ng-container>
- <ng-container *ngIf="collectorsTabSelectedIndex === 4">
+ <ng-container *ngIf="collectorsTabSelectedIndexes[i] === 4">
<div class="rounded-lg" style="text-align: center; width: 100%;
background-color: transparent; padding: 2%">
<span style="font-size: x-large; font-weight: bolder">{{
item.collector.name }}</span>
</div>
diff --git a/web-app/src/app/routes/dashboard/dashboard.component.ts
b/web-app/src/app/routes/dashboard/dashboard.component.ts
index 4df99747e5..b4b20fc400 100644
--- a/web-app/src/app/routes/dashboard/dashboard.component.ts
+++ b/web-app/src/app/routes/dashboard/dashboard.component.ts
@@ -174,7 +174,7 @@ export class DashboardComponent implements OnInit,
OnDestroy {
// collector list
collectorsLoading: boolean = false;
collectors!: CollectorSummary[];
- collectorsTabSelectedIndex = 0;
+ collectorsTabSelectedIndexes: { [key: number]: number } = {};
// alert list
alerts!: SingleAlert[];
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]