From bfdfc05c65cde7844a1f1bcec9d027e831afbc49 Mon Sep 17 00:00:00 2001 From: v-zhangjc9 Date: Fri, 26 Apr 2024 14:16:03 +0800 Subject: [PATCH] =?UTF-8?q?feat(web):=20=E5=A2=9E=E5=8A=A0=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E4=B8=AA=E6=95=B0=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/web/entity/CloudServiceVO.java | 13 ++++++++++--- .../src/main/resources/static/common/info.js | 1 + .../main/resources/static/components/cloud-tab.js | 6 +++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/service-web/src/main/java/com/lanyuanxiaoyao/service/web/entity/CloudServiceVO.java b/service-web/src/main/java/com/lanyuanxiaoyao/service/web/entity/CloudServiceVO.java index cc6af4e..00767a3 100644 --- a/service-web/src/main/java/com/lanyuanxiaoyao/service/web/entity/CloudServiceVO.java +++ b/service-web/src/main/java/com/lanyuanxiaoyao/service/web/entity/CloudServiceVO.java @@ -10,11 +10,13 @@ import org.eclipse.collections.api.map.ImmutableMap; */ public class CloudServiceVO { private final String name; + private final Integer size; @JsonProperty("children") private final ImmutableList services; public CloudServiceVO(String name, ImmutableList services) { this.name = name; + this.size = services.size(); this.services = services; } @@ -22,6 +24,10 @@ public class CloudServiceVO { return name; } + public Integer getSize() { + return size; + } + public ImmutableList getServices() { return services; } @@ -29,9 +35,10 @@ public class CloudServiceVO { @Override public String toString() { return "CloudServiceVO{" + - "name='" + name + '\'' + - ", services=" + services + - '}'; + "name='" + name + '\'' + + ", size=" + size + + ", services=" + services + + '}'; } public static final class Service { diff --git a/service-web/src/main/resources/static/common/info.js b/service-web/src/main/resources/static/common/info.js index 77b3bd5..9dd6d88 100644 --- a/service-web/src/main/resources/static/common/info.js +++ b/service-web/src/main/resources/static/common/info.js @@ -1,4 +1,5 @@ const commonInfo = { + // baseUrl: 'http://132.126.207.130:35690/hudi_services/service_web', baseUrl: '/hudi_services/service_web', clusters: { // hudi同步运行集群和yarn队列名称 diff --git a/service-web/src/main/resources/static/components/cloud-tab.js b/service-web/src/main/resources/static/components/cloud-tab.js index f5115e5..9f3087b 100644 --- a/service-web/src/main/resources/static/components/cloud-tab.js +++ b/service-web/src/main/resources/static/components/cloud-tab.js @@ -16,7 +16,11 @@ function cloudCrud(title, path) { loadDataOnce: true, perPage: 100, columns: [ - {name: 'name', label: '名称'}, + { + label: '名称', + type: 'tpl', + tpl: `\${name} \${IF(size === undefined, '', '' + size + '')}` + }, { name: 'status', label: '状态',