Skip to content

Commit

Permalink
fix: 修改告警策略指标时,如果指标单位变了,没有同步到检测算法的配置中 --bug=134335359 (#4054)
Browse files Browse the repository at this point in the history
  • Loading branch information
yzygyin authored Nov 29, 2024
1 parent 38f4c9e commit f002f68
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1520,6 +1520,10 @@ export default class StrategyConfigSet extends tsc<IStrategyConfigSetProps, IStr
const targetMetricItem = new MetricDetail(list[0]);
targetMetricItem.setMetricType(this.metricSelector.type);
this.$set(this.metricData, targetMetricIndex, targetMetricItem);
// 切换指标且单位不同时 清空检测算法单位
if (this.detectionConfig.unit && this.metricData[0].unit !== this.detectionConfig.unitType) {
this.detectionConfig.unit = '';
}
if (this.metricData.length >= 1 && !!this.metricData[0].metric_id) {
this.baseConfig.scenario = this.metricData[0].result_table_label;
}
Expand Down

0 comments on commit f002f68

Please sign in to comment.