Merge pull request #11992 from dataease/pr@dev-v2@perf_threshold_chart_exclude

fix(X-Pack): 阈值告警-混合类型图表禁用
This commit is contained in:
fit2cloud-chenyw 2024-09-04 11:49:48 +08:00 committed by GitHub
commit 8e1e9d6f6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -199,6 +199,9 @@ public class ChartViewThresholdManage {
thresholdTemplate = convertStyle(thresholdTemplate.replace("[触发告警]", s));
List<Map<String, Object>> tableRow = (List<Map<String, Object>>) data.get("tableRow");
List<DatasetTableFieldDTO> fields = (List<DatasetTableFieldDTO>) data.get("fields");
if (CollectionUtils.isEmpty(fields)) {
return new ThresholdCheckVO(false, null, String.format("当前图表类型[%s]暂不支持阈值告警!", chart.getType()), null);
}
Map<Long, DatasetTableFieldDTO> fieldMap = fields.stream().collect(Collectors.toMap(DatasetTableFieldDTO::getId, item -> item));
FilterTreeObj filterTreeObj = JsonUtil.parseObject(thresholdRules, FilterTreeObj.class);
List<Map<String, Object>> rows = filterRows(tableRow, filterTreeObj, fieldMap);

@ -1 +1 @@
Subproject commit f13cef680d79dcc02bd6ef7aa08d65765a749eb9
Subproject commit 321bac2953ac01b12ae69a4e9beb050e0895f965