This is an automated email from the ASF dual-hosted git repository.

gongchao 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 dfa6895a7 [bugfix] fixed the bug of the status filter in the alert 
center. (#2125)
dfa6895a7 is described below

commit dfa6895a7ece63bcc1deda7535d29b0de933b6b0
Author: Kerwin Bryant <[email protected]>
AuthorDate: Mon Jun 24 11:18:03 2024 +0800

    [bugfix] fixed the bug of the status filter in the alert center. (#2125)
    
    Co-authored-by: tomsun28 <[email protected]>
---
 .../alert/alert-center/alert-center.component.html     | 18 ++++++++++--------
 .../alert/alert-center/alert-center.component.ts       |  4 ++--
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git 
a/web-app/src/app/routes/alert/alert-center/alert-center.component.html 
b/web-app/src/app/routes/alert/alert-center/alert-center.component.html
index ca1e11456..31d3418a6 100644
--- a/web-app/src/app/routes/alert/alert-center/alert-center.component.html
+++ b/web-app/src/app/routes/alert/alert-center/alert-center.component.html
@@ -65,24 +65,26 @@
     style="margin-right: 10px; float: right"
     nzAllowClear
     [nzPlaceHolder]="'alert.center.filter-status' | i18n"
+    (ngModelChange)="loadAlertsTable()"
     [(ngModel)]="filterStatus"
   >
-    <nz-option [nzLabel]="'alert.status.all' | i18n" nzValue="9"></nz-option>
-    <nz-option [nzLabel]="'alert.status.0' | i18n" nzValue="0"></nz-option>
-    <nz-option [nzLabel]="'alert.status.2' | i18n" nzValue="2"></nz-option>
-    <nz-option [nzLabel]="'alert.status.3' | i18n" nzValue="3"></nz-option>
+    <nz-option [nzLabel]="'alert.status.all' | i18n" [nzValue]="9"></nz-option>
+    <nz-option [nzLabel]="'alert.status.0' | i18n" [nzValue]="0"></nz-option>
+    <nz-option [nzLabel]="'alert.status.2' | i18n" [nzValue]="2"></nz-option>
+    <nz-option [nzLabel]="'alert.status.3' | i18n" [nzValue]="3"></nz-option>
   </nz-select>
   <nz-select
     class="mobile-hide"
     style="margin-right: 10px; float: right"
     nzAllowClear
     [nzPlaceHolder]="'alert.center.filter-priority' | i18n"
+    (ngModelChange)="loadAlertsTable()"
     [(ngModel)]="filterPriority"
   >
-    <nz-option [nzLabel]="'alert.priority.all' | i18n" nzValue="9"></nz-option>
-    <nz-option [nzLabel]="'alert.priority.2' | i18n" nzValue="2"></nz-option>
-    <nz-option [nzLabel]="'alert.priority.1' | i18n" nzValue="1"></nz-option>
-    <nz-option [nzLabel]="'alert.priority.0' | i18n" nzValue="0"></nz-option>
+    <nz-option [nzLabel]="'alert.priority.all' | i18n" 
[nzValue]="9"></nz-option>
+    <nz-option [nzLabel]="'alert.priority.2' | i18n" [nzValue]="2"></nz-option>
+    <nz-option [nzLabel]="'alert.priority.1' | i18n" [nzValue]="1"></nz-option>
+    <nz-option [nzLabel]="'alert.priority.0' | i18n" [nzValue]="0"></nz-option>
   </nz-select>
 </div>
 
diff --git 
a/web-app/src/app/routes/alert/alert-center/alert-center.component.ts 
b/web-app/src/app/routes/alert/alert-center/alert-center.component.ts
index 46021a40c..18ddd785c 100644
--- a/web-app/src/app/routes/alert/alert-center/alert-center.component.ts
+++ b/web-app/src/app/routes/alert/alert-center/alert-center.component.ts
@@ -48,8 +48,8 @@ export class AlertCenterComponent implements OnInit {
   tableLoading: boolean = false;
   checkedAlertIds = new Set<number>();
   // 搜索过滤相关属性
-  filterStatus: number | undefined;
-  filterPriority: number | undefined;
+  filterStatus: number = 9;
+  filterPriority: number = 9;
   filterContent: string | undefined;
 
   ngOnInit(): void {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to