Merge pull request #11945 from dataease/pr@dev-v2@perf_threshold_view

perf(X-Pack): 阈值告警-兼容流向地图、热力图
This commit is contained in:
fit2cloud-chenyw 2024-09-03 12:46:27 +08:00 committed by GitHub
commit dac355bd90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 60 additions and 4 deletions

View File

@ -40,4 +40,14 @@ public class ChartBasePO implements Serializable {
private String extBubble; private String extBubble;
private String flowMapStartName;
private String flowMapEndName;
private String extColor;
private String extLabel;
private String extTooltip;
} }

View File

@ -30,7 +30,12 @@ public interface ExtChartViewMapper {
ccv.y_axis, ccv.y_axis,
ccv.y_axis_ext, ccv.y_axis_ext,
ccv.ext_stack, ccv.ext_stack,
ccv.ext_bubble ccv.ext_bubble,
ccv.ext_label,
ccv.ext_tooltip,
ccv.flow_map_start_name,
ccv.flow_map_end_name,
ccv.ext_color
from core_chart_view ccv from core_chart_view ccv
left join data_visualization_info dvi on dvi.id = ccv.scene_id left join data_visualization_info dvi on dvi.id = ccv.scene_id
where ccv.id = #{id} where ccv.id = #{id}

View File

@ -100,7 +100,8 @@ public class ChartViewManege {
} }
@XpackInteract(value = "chartViewManage") @XpackInteract(value = "chartViewManage")
public void disuse(List<Long> chartIdList) {} public void disuse(List<Long> chartIdList) {
}
@Transactional @Transactional
public void deleteBySceneId(Long sceneId, List<Long> chartIds) { public void deleteBySceneId(Long sceneId, List<Long> chartIds) {
@ -258,13 +259,23 @@ public class ChartViewManege {
ChartBasePO po = extChartViewMapper.queryChart(id); ChartBasePO po = extChartViewMapper.queryChart(id);
if (ObjectUtils.isEmpty(po)) return null; if (ObjectUtils.isEmpty(po)) return null;
ChartBaseVO vo = BeanUtils.copyBean(new ChartBaseVO(), po); ChartBaseVO vo = BeanUtils.copyBean(new ChartBaseVO(), po);
TypeReference<List<ChartViewFieldDTO>> tokenType = new TypeReference<>() {}; TypeReference<List<ChartViewFieldDTO>> tokenType = new TypeReference<>() {
};
vo.setXAxis(JsonUtil.parseList(po.getXAxis(), tokenType)); vo.setXAxis(JsonUtil.parseList(po.getXAxis(), tokenType));
vo.setXAxisExt(JsonUtil.parseList(po.getXAxisExt(), tokenType)); vo.setXAxisExt(JsonUtil.parseList(po.getXAxisExt(), tokenType));
vo.setYAxis(JsonUtil.parseList(po.getYAxis(), tokenType)); vo.setYAxis(JsonUtil.parseList(po.getYAxis(), tokenType));
vo.setYAxisExt(JsonUtil.parseList(po.getYAxisExt(), tokenType)); vo.setYAxisExt(JsonUtil.parseList(po.getYAxisExt(), tokenType));
vo.setExtStack(JsonUtil.parseList(po.getExtStack(), tokenType)); vo.setExtStack(JsonUtil.parseList(po.getExtStack(), tokenType));
vo.setExtBubble(JsonUtil.parseList(po.getExtBubble(), tokenType)); vo.setExtBubble(JsonUtil.parseList(po.getExtBubble(), tokenType));
vo.setFlowMapStartName(JsonUtil.parseList(po.getFlowMapStartName(), tokenType));
vo.setFlowMapEndName(JsonUtil.parseList(po.getFlowMapEndName(), tokenType));
if (StringUtils.isBlank(po.getExtColor()) || StringUtils.equals("null", po.getExtColor())) {
vo.setExtColor(new ArrayList<>());
} else {
vo.setExtColor(JsonUtil.parseList(po.getExtColor(), tokenType));
}
vo.setExtLabel(JsonUtil.parseList(po.getExtLabel(), tokenType));
vo.setExtTooltip(JsonUtil.parseList(po.getExtTooltip(), tokenType));
return vo; return vo;
} }

View File

@ -67,6 +67,26 @@ public class ChartViewThresholdManage {
if (CollectionUtils.isNotEmpty(extBubble)) { if (CollectionUtils.isNotEmpty(extBubble)) {
result.addAll(extBubble); result.addAll(extBubble);
} }
List<ChartViewFieldDTO> extLabel = details.getExtLabel();
if (CollectionUtils.isNotEmpty(extLabel)) {
result.addAll(extLabel);
}
List<ChartViewFieldDTO> extTooltip = details.getExtTooltip();
if (CollectionUtils.isNotEmpty(extTooltip)) {
result.addAll(extTooltip);
}
List<ChartViewFieldDTO> extColor = details.getExtColor();
if (CollectionUtils.isNotEmpty(extColor)) {
result.addAll(extColor);
}
List<ChartViewFieldDTO> flowMapStartName = details.getFlowMapStartName();
if (CollectionUtils.isNotEmpty(flowMapStartName)) {
result.addAll(flowMapStartName);
}
List<ChartViewFieldDTO> flowMapEndName = details.getFlowMapEndName();
if (CollectionUtils.isNotEmpty(flowMapEndName)) {
result.addAll(flowMapEndName);
}
return result; return result;
} }

@ -1 +1 @@
Subproject commit 79f4a54d4c15b7eeabb8286793f9268ec29805ac Subproject commit 2e0b320c998bdb2ba7962de4c73d11f69b34735c

View File

@ -63,4 +63,14 @@ public class ChartBaseVO implements Serializable {
*/ */
private List<ChartViewFieldDTO> extBubble; private List<ChartViewFieldDTO> extBubble;
private List<ChartViewFieldDTO> flowMapStartName;
private List<ChartViewFieldDTO> flowMapEndName;
private List<ChartViewFieldDTO> extColor;
private List<ChartViewFieldDTO> extLabel;
private List<ChartViewFieldDTO> extTooltip;
} }