From 7c117335ffa4847e0450e4ad2eccec22bde19212 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 18 Jan 2024 12:13:11 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=90=8C=E6=AD=A5=E6=B8=B8=E7=A6=BB?= =?UTF-8?q?=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/ResourceMonitorManage.java | 6 ++--- core/core-frontend/src/views/about/index.vue | 22 ++++++++++++------- de-xpack | 2 +- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/core/core-backend/src/main/java/io/dataease/rmonitor/manage/ResourceMonitorManage.java b/core/core-backend/src/main/java/io/dataease/rmonitor/manage/ResourceMonitorManage.java index 920e90cd3b..d234616ea9 100644 --- a/core/core-backend/src/main/java/io/dataease/rmonitor/manage/ResourceMonitorManage.java +++ b/core/core-backend/src/main/java/io/dataease/rmonitor/manage/ResourceMonitorManage.java @@ -44,7 +44,7 @@ public class ResourceMonitorManage { if (CollectionUtils.isNotEmpty(dsFreeResources)) { List 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 dsTree = TreeUtils.mergeTree(dsBos, PerMonitorNodeBO.class, false); @@ -55,7 +55,7 @@ public class ResourceMonitorManage { if (CollectionUtils.isNotEmpty(datasetFreeResources)) { List 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 datasetTree = TreeUtils.mergeTree(datasetBos, PerMonitorNodeBO.class, false); @@ -69,7 +69,7 @@ public class ResourceMonitorManage { List freeResource = entry.getValue(); List 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)); diff --git a/core/core-frontend/src/views/about/index.vue b/core/core-frontend/src/views/about/index.vue index 8c2f319fe6..b9390fa23b 100644 --- a/core/core-frontend/src/views/about/index.vue +++ b/core/core-frontend/src/views/about/index.vue @@ -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() - }) } }) } diff --git a/de-xpack b/de-xpack index e71e615287..2012e4fb3c 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit e71e6152874ed49933d3befeee6ea2c9310a94f4 +Subproject commit 2012e4fb3c3169330cc70b09e4e77d144b22031b