fix: 【数据源】-从社区版升级到企业版,历史Excel数据源同步保留后,图标错误

This commit is contained in:
taojinlong 2024-08-09 15:54:18 +08:00
parent 018ade48c1
commit 16353bb050

View File

@ -1,5 +1,6 @@
package io.dataease.rmonitor.manage;
import io.dataease.constant.DataSourceType;
import io.dataease.exception.DEException;
import io.dataease.rmonitor.bo.PerMonitorCheckBO;
import io.dataease.rmonitor.bo.PerMonitorNodeBO;
@ -45,6 +46,7 @@ public class ResourceMonitorManage {
List<PerMonitorNodeBO> dsBos = dsFreeResources.stream().map(node -> {
PerMonitorNodeBO bo = BeanUtils.copyBean(new PerMonitorNodeBO(), node);
bo.setLeaf(!StringUtils.equals("folder", node.getType()));
bo.setExtraFlag(DataSourceType.valueOf(node.getType()).getFlag());
return bo;
}).collect(Collectors.toList());
List<PerMonitorNodeBO> dsTree = TreeUtils.mergeTree(dsBos, PerMonitorNodeBO.class, false);