forked from github/dataease
perf: 同步游离资源
This commit is contained in:
parent
2b18180dd9
commit
7c117335ff
@ -44,7 +44,7 @@ public class ResourceMonitorManage {
|
||||
if (CollectionUtils.isNotEmpty(dsFreeResources)) {
|
||||
List<PerMonitorNodeBO> dsBos = dsFreeResources.stream().map(node -> {
|
||||
PerMonitorNodeBO bo = BeanUtils.copyBean(new PerMonitorNodeBO(), node);
|
||||
bo.setLeaf(StringUtils.equals("folder", node.getType()));
|
||||
bo.setLeaf(!StringUtils.equals("folder", node.getType()));
|
||||
return bo;
|
||||
}).collect(Collectors.toList());
|
||||
List<PerMonitorNodeBO> dsTree = TreeUtils.mergeTree(dsBos, PerMonitorNodeBO.class, false);
|
||||
@ -55,7 +55,7 @@ public class ResourceMonitorManage {
|
||||
if (CollectionUtils.isNotEmpty(datasetFreeResources)) {
|
||||
List<PerMonitorNodeBO> datasetBos = datasetFreeResources.stream().map(node -> {
|
||||
PerMonitorNodeBO bo = BeanUtils.copyBean(new PerMonitorNodeBO(), node);
|
||||
bo.setLeaf(StringUtils.equals("folder", node.getNodeType()));
|
||||
bo.setLeaf(!StringUtils.equals("folder", node.getNodeType()));
|
||||
return bo;
|
||||
}).collect(Collectors.toList());
|
||||
List<PerMonitorNodeBO> datasetTree = TreeUtils.mergeTree(datasetBos, PerMonitorNodeBO.class, false);
|
||||
@ -69,7 +69,7 @@ public class ResourceMonitorManage {
|
||||
List<VisualFreeResource> freeResource = entry.getValue();
|
||||
List<PerMonitorNodeBO> visualBos = freeResource.stream().map(node -> {
|
||||
PerMonitorNodeBO bo = BeanUtils.copyBean(new PerMonitorNodeBO(), node);
|
||||
bo.setLeaf(StringUtils.equals("folder", node.getNodeType()));
|
||||
bo.setLeaf(!StringUtils.equals("folder", node.getNodeType()));
|
||||
return bo;
|
||||
}).collect(Collectors.toList());
|
||||
result.put(convertBusiFlag(entry.getKey()), TreeUtils.mergeTree(visualBos, PerMonitorNodeBO.class, false));
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
syncFreeApi,
|
||||
delFreeApi
|
||||
} from '@/api/about'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus-secondary'
|
||||
import { ElMessage, ElMessageBox, Action } from 'element-plus-secondary'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
const dialogVisible = ref(false)
|
||||
@ -141,14 +141,20 @@ const checkFree = () => {
|
||||
message: h('div', { class: 'free-sync-tip-box' }, childrenDomList),
|
||||
showClose: false,
|
||||
cancelButtonText: '删除',
|
||||
confirmButtonText: '同步'
|
||||
cancelButtonClass: 'free-cancel-bt',
|
||||
showCancelButton: false,
|
||||
preButtonType: 'danger',
|
||||
preButtonText: '删除',
|
||||
showPreButton: true,
|
||||
confirmButtonText: '同步',
|
||||
callback: (action: Action) => {
|
||||
if (action === 'confirm') {
|
||||
syncFree()
|
||||
} else {
|
||||
delFree
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
syncFree()
|
||||
})
|
||||
.catch(() => {
|
||||
delFree()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit e71e6152874ed49933d3befeee6ea2c9310a94f4
|
||||
Subproject commit 2012e4fb3c3169330cc70b09e4e77d144b22031b
|
Loading…
Reference in New Issue
Block a user