From 25ee822c5f3f4c93eb4e08cb90e68f623ae81aa1 Mon Sep 17 00:00:00 2001 From: aias00 Date: Wed, 4 Sep 2024 16:44:37 +0800 Subject: [PATCH] [bugfix] filter dashboard metrics (#2673) Co-authored-by: Logic --- .../hertzbeat/manager/service/impl/BulletinServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manager/src/main/java/org/apache/hertzbeat/manager/service/impl/BulletinServiceImpl.java b/manager/src/main/java/org/apache/hertzbeat/manager/service/impl/BulletinServiceImpl.java index a631923c799..9738bd4fd88 100644 --- a/manager/src/main/java/org/apache/hertzbeat/manager/service/impl/BulletinServiceImpl.java +++ b/manager/src/main/java/org/apache/hertzbeat/manager/service/impl/BulletinServiceImpl.java @@ -211,7 +211,7 @@ public BulletinMetricsData buildBulletinMetricsData(BulletinMetricsData.Bulletin for (int i = 0; i < fieldList.size(); i++) { fieldList.get(i).setValue(valueRow.getColumns(i)); } - return fieldList; + return fieldList.stream().filter(field -> fields.contains(field.getKey())).toList(); }) .toList(); } else {