mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
fix(系统设置): 阈值告警-数值动态类型选择等于无效
This commit is contained in:
parent
3265bbd28d
commit
7177f8afa4
@ -413,7 +413,7 @@ public class ChartViewThresholdManage {
|
|||||||
DatasetTableFieldDTO field = item.getField();
|
DatasetTableFieldDTO field = item.getField();
|
||||||
String dataeaseName = field.getDataeaseName();
|
String dataeaseName = field.getDataeaseName();
|
||||||
String value = item.getValue();
|
String value = item.getValue();
|
||||||
float tempFVal = 0f;
|
Float tempFVal = StringUtils.equalsAny(value, "min", "max") ? null : 0f;
|
||||||
int validLen = 0;
|
int validLen = 0;
|
||||||
|
|
||||||
for (Map<String, Object> row : rows) {
|
for (Map<String, Object> row : rows) {
|
||||||
@ -421,9 +421,17 @@ public class ChartViewThresholdManage {
|
|||||||
if (ObjectUtils.isEmpty(o)) continue;
|
if (ObjectUtils.isEmpty(o)) continue;
|
||||||
float fvalue = Float.parseFloat(o.toString());
|
float fvalue = Float.parseFloat(o.toString());
|
||||||
if (StringUtils.equals("min", value)) {
|
if (StringUtils.equals("min", value)) {
|
||||||
tempFVal = Math.min(tempFVal, fvalue);
|
if (ObjectUtils.isEmpty(tempFVal)) {
|
||||||
|
tempFVal = fvalue;
|
||||||
|
} else {
|
||||||
|
tempFVal = Math.min(tempFVal, fvalue);
|
||||||
|
}
|
||||||
} else if (StringUtils.equals("max", value)) {
|
} else if (StringUtils.equals("max", value)) {
|
||||||
tempFVal = Math.max(tempFVal, fvalue);
|
if (ObjectUtils.isEmpty(tempFVal)) {
|
||||||
|
tempFVal = fvalue;
|
||||||
|
} else {
|
||||||
|
tempFVal = Math.max(tempFVal, fvalue);
|
||||||
|
}
|
||||||
} else if (StringUtils.equals("average", value)) {
|
} else if (StringUtils.equals("average", value)) {
|
||||||
tempFVal += fvalue;
|
tempFVal += fvalue;
|
||||||
validLen++;
|
validLen++;
|
||||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
|||||||
Subproject commit 7669a4307af32432eb22554f14b819d49c336695
|
Subproject commit d72300fcc522eb25360827914057298d5f95dfff
|
Loading…
Reference in New Issue
Block a user