From 67cfc4fa08fea4c77f6536b4d535245c2eaaec84 Mon Sep 17 00:00:00 2001 From: lhpqaq <657407891@qq.com> Date: Fri, 20 Dec 2024 22:57:06 +0800 Subject: [PATCH] set content to null --- .../server/tools/functions/StackInfoFunctions.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/tools/functions/StackInfoFunctions.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/tools/functions/StackInfoFunctions.java index 82d39086..c243a12d 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/tools/functions/StackInfoFunctions.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/tools/functions/StackInfoFunctions.java @@ -19,6 +19,8 @@ package org.apache.bigtop.manager.server.tools.functions; import org.apache.bigtop.manager.common.utils.JsonUtils; +import org.apache.bigtop.manager.server.model.vo.PropertyVO; +import org.apache.bigtop.manager.server.model.vo.ServiceConfigVO; import org.apache.bigtop.manager.server.model.vo.ServiceVO; import org.apache.bigtop.manager.server.model.vo.StackVO; import org.apache.bigtop.manager.server.service.StackService; @@ -76,6 +78,14 @@ public Map getServiceByName() { for (StackVO stackVO : stackService.list()) { for (ServiceVO serviceVO : stackVO.getServices()) { if (serviceVO.getName().equals(serviceName)) { + for (ServiceConfigVO serviceConfigVO : serviceVO.getConfigs()) { + for (PropertyVO propertyVO : serviceConfigVO.getProperties()) { + if (propertyVO.getName().equals("content")) { + propertyVO.setValue(null); + } + } + } + return serviceVO.toString(); } }