From 388a704f8b1f504432e10a1358b6af335285757b Mon Sep 17 00:00:00 2001 From: Zhiguo Wu Date: Fri, 26 Jul 2024 10:10:14 +0800 Subject: [PATCH] BIGTOP-4167: Add longtext attr to config property and use textarea for UI display (#24) --- .../manager/server/model/dto/AttrsDTO.java | 29 +++++++++++++++++ .../manager/server/model/dto/PropertyDTO.java | 2 ++ .../server/model/mapper/ComponentMapper.java | 2 +- .../server/model/mapper/ServiceMapper.java | 2 +- .../server/model/mapper/StackMapper.java | 2 +- .../manager/server/model/req/AttrsReq.java | 27 ++++++++++++++++ .../manager/server/model/req/PropertyReq.java | 2 ++ .../manager/server/model/vo/AttrsVO.java | 27 ++++++++++++++++ .../manager/server/model/vo/PropertyVO.java | 2 ++ .../server/stack/model/AttrsModel.java | 31 +++++++++++++++++++ .../stack/{pojo => model}/ComponentModel.java | 2 +- .../{pojo => model}/CustomCommandModel.java | 2 +- .../{pojo => model}/OSSpecificModel.java | 2 +- .../stack/{pojo => model}/PropertyModel.java | 5 ++- .../stack/{pojo => model}/QuickLinkModel.java | 2 +- .../stack/{pojo => model}/RepoModel.java | 2 +- .../stack/{pojo => model}/ScriptModel.java | 2 +- .../stack/{pojo => model}/ServiceModel.java | 2 +- .../stack/{pojo => model}/StackModel.java | 2 +- .../server/stack/xml/ConfigurationXml.java | 2 +- .../server/stack/xml/ServiceMetainfoXml.java | 2 +- .../server/stack/xml/StackMetainfoXml.java | 2 +- .../server/utils/StackConfigUtils.java | 26 ++++++++++++---- .../manager/server/utils/StackUtils.java | 4 +-- .../hdfs/configuration/hadoop-env.xml | 3 ++ .../hdfs/configuration/hdfs-log4j.xml | 3 ++ .../services/hdfs/configuration/hdfs.conf.xml | 3 ++ .../services/hdfs/configuration/workers.xml | 3 ++ .../kafka/configuration/kafka-env.xml | 3 ++ .../kafka/configuration/kafka-log4j.xml | 3 ++ .../kafka/configuration/kafka.conf.xml | 3 ++ .../yarn/configuration/exclude-nodes.xml | 3 ++ .../services/yarn/configuration/yarn-env.xml | 3 ++ .../yarn/configuration/yarn-log4j.xml | 3 ++ .../services/yarn/configuration/yarn.conf.xml | 3 ++ .../zookeeper/configuration/zoo.cfg.xml | 3 ++ .../zookeeper/configuration/zookeeper-env.xml | 3 ++ .../kafka/configuration/kafka-env.xml | 9 ++++-- .../kafka/configuration/kafka-log4j.xml | 3 ++ .../kafka/configuration/kafka.conf.xml | 3 ++ .../zookeeper/configuration/zoo.cfg.xml | 3 ++ .../zookeeper/configuration/zookeeper-env.xml | 3 ++ bigtop-manager-ui/src/api/config/types.ts | 5 +++ .../service-add/configure-services.vue | 20 +++++------- bigtop-manager-ui/src/pages/service/index.vue | 25 ++++++--------- 45 files changed, 239 insertions(+), 54 deletions(-) create mode 100644 bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/dto/AttrsDTO.java create mode 100644 bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/req/AttrsReq.java create mode 100644 bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/vo/AttrsVO.java create mode 100644 bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/AttrsModel.java rename bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/{pojo => model}/ComponentModel.java (96%) rename bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/{pojo => model}/CustomCommandModel.java (95%) rename bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/{pojo => model}/OSSpecificModel.java (96%) rename bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/{pojo => model}/PropertyModel.java (91%) rename bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/{pojo => model}/QuickLinkModel.java (96%) rename bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/{pojo => model}/RepoModel.java (96%) rename bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/{pojo => model}/ScriptModel.java (95%) rename bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/{pojo => model}/ServiceModel.java (97%) rename bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/{pojo => model}/StackModel.java (96%) diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/dto/AttrsDTO.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/dto/AttrsDTO.java new file mode 100644 index 00000000..422846b0 --- /dev/null +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/dto/AttrsDTO.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.bigtop.manager.server.model.dto; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class AttrsDTO implements Serializable { + + private String type; +} diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/dto/PropertyDTO.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/dto/PropertyDTO.java index bab0ae2d..f4845c4e 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/dto/PropertyDTO.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/dto/PropertyDTO.java @@ -32,4 +32,6 @@ public class PropertyDTO implements Serializable { private String displayName; private String desc; + + private AttrsDTO attrs; } diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/mapper/ComponentMapper.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/mapper/ComponentMapper.java index 961967fd..66a93e1f 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/mapper/ComponentMapper.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/mapper/ComponentMapper.java @@ -23,7 +23,7 @@ import org.apache.bigtop.manager.dao.entity.Service; import org.apache.bigtop.manager.server.model.dto.ComponentDTO; import org.apache.bigtop.manager.server.model.vo.ComponentVO; -import org.apache.bigtop.manager.server.stack.pojo.ComponentModel; +import org.apache.bigtop.manager.server.stack.model.ComponentModel; import org.mapstruct.Context; import org.mapstruct.Mapper; diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/mapper/ServiceMapper.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/mapper/ServiceMapper.java index 82d6b9f3..1ebfab90 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/mapper/ServiceMapper.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/mapper/ServiceMapper.java @@ -22,7 +22,7 @@ import org.apache.bigtop.manager.dao.entity.Service; import org.apache.bigtop.manager.server.model.dto.ServiceDTO; import org.apache.bigtop.manager.server.model.vo.ServiceVO; -import org.apache.bigtop.manager.server.stack.pojo.ServiceModel; +import org.apache.bigtop.manager.server.stack.model.ServiceModel; import org.mapstruct.Context; import org.mapstruct.Mapper; diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/mapper/StackMapper.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/mapper/StackMapper.java index 95e4649a..76066c5b 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/mapper/StackMapper.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/mapper/StackMapper.java @@ -21,7 +21,7 @@ import org.apache.bigtop.manager.dao.entity.Stack; import org.apache.bigtop.manager.server.model.dto.StackDTO; import org.apache.bigtop.manager.server.model.vo.StackVO; -import org.apache.bigtop.manager.server.stack.pojo.StackModel; +import org.apache.bigtop.manager.server.stack.model.StackModel; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/req/AttrsReq.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/req/AttrsReq.java new file mode 100644 index 00000000..71e26bc9 --- /dev/null +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/req/AttrsReq.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.bigtop.manager.server.model.req; + +import lombok.Data; + +@Data +public class AttrsReq { + + private String type; +} diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/req/PropertyReq.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/req/PropertyReq.java index c6655515..e3e961a5 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/req/PropertyReq.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/req/PropertyReq.java @@ -33,4 +33,6 @@ public class PropertyReq { private String displayName; private String desc; + + private AttrsReq attrs; } diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/vo/AttrsVO.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/vo/AttrsVO.java new file mode 100644 index 00000000..ec52426d --- /dev/null +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/vo/AttrsVO.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.bigtop.manager.server.model.vo; + +import lombok.Data; + +@Data +public class AttrsVO { + + private String type; +} diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/vo/PropertyVO.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/vo/PropertyVO.java index 8442d84c..23fd72ee 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/vo/PropertyVO.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/vo/PropertyVO.java @@ -30,4 +30,6 @@ public class PropertyVO { private String displayName; private String desc; + + private AttrsVO attrs; } diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/AttrsModel.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/AttrsModel.java new file mode 100644 index 00000000..e765bde9 --- /dev/null +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/AttrsModel.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.bigtop.manager.server.stack.model; + +import lombok.Data; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; + +@Data +@XmlAccessorType(XmlAccessType.FIELD) +public class AttrsModel { + + private String type; +} diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/ComponentModel.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/ComponentModel.java similarity index 96% rename from bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/ComponentModel.java rename to bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/ComponentModel.java index 10c5416a..21c8dd79 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/ComponentModel.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/ComponentModel.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.bigtop.manager.server.stack.pojo; +package org.apache.bigtop.manager.server.stack.model; import lombok.Data; diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/CustomCommandModel.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/CustomCommandModel.java similarity index 95% rename from bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/CustomCommandModel.java rename to bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/CustomCommandModel.java index b23d4cfc..1517c95a 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/CustomCommandModel.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/CustomCommandModel.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.bigtop.manager.server.stack.pojo; +package org.apache.bigtop.manager.server.stack.model; import lombok.Data; diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/OSSpecificModel.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/OSSpecificModel.java similarity index 96% rename from bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/OSSpecificModel.java rename to bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/OSSpecificModel.java index b38882c2..b2dc4230 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/OSSpecificModel.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/OSSpecificModel.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.bigtop.manager.server.stack.pojo; +package org.apache.bigtop.manager.server.stack.model; import lombok.Data; diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/PropertyModel.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/PropertyModel.java similarity index 91% rename from bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/PropertyModel.java rename to bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/PropertyModel.java index 657f32ae..e8fd9bdb 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/PropertyModel.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/PropertyModel.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.bigtop.manager.server.stack.pojo; +package org.apache.bigtop.manager.server.stack.model; import lombok.Data; @@ -37,4 +37,7 @@ public class PropertyModel { @XmlElement(name = "description") private String desc; + + @XmlElement(name = "attrs") + private AttrsModel attrs; } diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/QuickLinkModel.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/QuickLinkModel.java similarity index 96% rename from bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/QuickLinkModel.java rename to bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/QuickLinkModel.java index f6003335..b54059d0 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/QuickLinkModel.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/QuickLinkModel.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.bigtop.manager.server.stack.pojo; +package org.apache.bigtop.manager.server.stack.model; import lombok.Data; diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/RepoModel.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/RepoModel.java similarity index 96% rename from bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/RepoModel.java rename to bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/RepoModel.java index fc7883ee..3ea48876 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/RepoModel.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/RepoModel.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.bigtop.manager.server.stack.pojo; +package org.apache.bigtop.manager.server.stack.model; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/ScriptModel.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/ScriptModel.java similarity index 95% rename from bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/ScriptModel.java rename to bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/ScriptModel.java index bc1d04c7..6b71ac25 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/ScriptModel.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/ScriptModel.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.bigtop.manager.server.stack.pojo; +package org.apache.bigtop.manager.server.stack.model; import lombok.Data; diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/ServiceModel.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/ServiceModel.java similarity index 97% rename from bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/ServiceModel.java rename to bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/ServiceModel.java index abdeb0fa..b665ee03 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/ServiceModel.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/ServiceModel.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.bigtop.manager.server.stack.pojo; +package org.apache.bigtop.manager.server.stack.model; import lombok.Data; diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/StackModel.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/StackModel.java similarity index 96% rename from bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/StackModel.java rename to bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/StackModel.java index e00c48e8..45aeb40e 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/pojo/StackModel.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/model/StackModel.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.bigtop.manager.server.stack.pojo; +package org.apache.bigtop.manager.server.stack.model; import lombok.Data; diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/xml/ConfigurationXml.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/xml/ConfigurationXml.java index 5187be1a..07f6a106 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/xml/ConfigurationXml.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/xml/ConfigurationXml.java @@ -18,7 +18,7 @@ */ package org.apache.bigtop.manager.server.stack.xml; -import org.apache.bigtop.manager.server.stack.pojo.PropertyModel; +import org.apache.bigtop.manager.server.stack.model.PropertyModel; import lombok.Data; diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/xml/ServiceMetainfoXml.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/xml/ServiceMetainfoXml.java index 97ee57b0..cd8fb560 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/xml/ServiceMetainfoXml.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/xml/ServiceMetainfoXml.java @@ -18,7 +18,7 @@ */ package org.apache.bigtop.manager.server.stack.xml; -import org.apache.bigtop.manager.server.stack.pojo.ServiceModel; +import org.apache.bigtop.manager.server.stack.model.ServiceModel; import lombok.Data; diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/xml/StackMetainfoXml.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/xml/StackMetainfoXml.java index 72baabf3..341589b7 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/xml/StackMetainfoXml.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/stack/xml/StackMetainfoXml.java @@ -18,7 +18,7 @@ */ package org.apache.bigtop.manager.server.stack.xml; -import org.apache.bigtop.manager.server.stack.pojo.StackModel; +import org.apache.bigtop.manager.server.stack.model.StackModel; import lombok.Data; diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/utils/StackConfigUtils.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/utils/StackConfigUtils.java index 637bcf3e..18ffc383 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/utils/StackConfigUtils.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/utils/StackConfigUtils.java @@ -18,8 +18,10 @@ */ package org.apache.bigtop.manager.server.utils; +import org.apache.bigtop.manager.server.model.dto.AttrsDTO; import org.apache.bigtop.manager.server.model.dto.PropertyDTO; -import org.apache.bigtop.manager.server.stack.pojo.PropertyModel; +import org.apache.bigtop.manager.server.stack.model.AttrsModel; +import org.apache.bigtop.manager.server.stack.model.PropertyModel; import org.apache.bigtop.manager.server.stack.xml.ConfigurationXml; import java.util.ArrayList; @@ -41,17 +43,29 @@ public static List loadConfig(String fileName) { List propertyDTOList = new ArrayList<>(); for (PropertyModel propertyModel : propertyModels) { - PropertyDTO propertyDTO = new PropertyDTO(); - propertyDTO.setDisplayName(propertyModel.getDisplayName()); - propertyDTO.setDesc(propertyModel.getDesc()); - propertyDTO.setName(propertyModel.getName()); - propertyDTO.setValue(propertyModel.getValue()); + PropertyDTO propertyDTO = getPropertyDTO(propertyModel); propertyDTOList.add(propertyDTO); } return propertyDTOList; } + private static PropertyDTO getPropertyDTO(PropertyModel propertyModel) { + PropertyDTO propertyDTO = new PropertyDTO(); + propertyDTO.setDisplayName(propertyModel.getDisplayName()); + propertyDTO.setDesc(propertyModel.getDesc()); + propertyDTO.setName(propertyModel.getName()); + propertyDTO.setValue(propertyModel.getValue()); + if (propertyModel.getAttrs() != null) { + AttrsModel attrsModel = propertyModel.getAttrs(); + AttrsDTO attrsDTO = new AttrsDTO(); + attrsDTO.setType(attrsModel.getType()); + propertyDTO.setAttrs(attrsDTO); + } + + return propertyDTO; + } + /** * extract config from List> to Map * diff --git a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/utils/StackUtils.java b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/utils/StackUtils.java index 59bf63ca..043b3a6b 100644 --- a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/utils/StackUtils.java +++ b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/utils/StackUtils.java @@ -33,8 +33,8 @@ import org.apache.bigtop.manager.server.stack.dag.ComponentCommandWrapper; import org.apache.bigtop.manager.server.stack.dag.DAG; import org.apache.bigtop.manager.server.stack.dag.DagGraphEdge; -import org.apache.bigtop.manager.server.stack.pojo.ServiceModel; -import org.apache.bigtop.manager.server.stack.pojo.StackModel; +import org.apache.bigtop.manager.server.stack.model.ServiceModel; +import org.apache.bigtop.manager.server.stack.model.StackModel; import org.apache.bigtop.manager.server.stack.xml.ServiceMetainfoXml; import org.apache.bigtop.manager.server.stack.xml.StackMetainfoXml; diff --git a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/hdfs/configuration/hadoop-env.xml b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/hdfs/configuration/hadoop-env.xml index ba707835..b0852040 100644 --- a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/hdfs/configuration/hadoop-env.xml +++ b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/hdfs/configuration/hadoop-env.xml @@ -117,5 +117,8 @@ export HADOOP_LIBEXEC_DIR=${hadoop_libexec_dir} ]]> + + longtext + diff --git a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/hdfs/configuration/hdfs-log4j.xml b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/hdfs/configuration/hdfs-log4j.xml index 57ee7387..7a0fd049 100644 --- a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/hdfs/configuration/hdfs-log4j.xml +++ b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/hdfs/configuration/hdfs-log4j.xml @@ -376,5 +376,8 @@ log4j.logger.org.apache.commons.beanutils=WARN ]]> + + longtext + diff --git a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/hdfs/configuration/hdfs.conf.xml b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/hdfs/configuration/hdfs.conf.xml index 748488c7..72b7868c 100644 --- a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/hdfs/configuration/hdfs.conf.xml +++ b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/hdfs/configuration/hdfs.conf.xml @@ -47,5 +47,8 @@ ${hdfs_group} - nproc ${hdfs_user_nproc_limit} ]]> + + longtext + \ No newline at end of file diff --git a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/hdfs/configuration/workers.xml b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/hdfs/configuration/workers.xml index 00360895..4d5da3ef 100644 --- a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/hdfs/configuration/workers.xml +++ b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/hdfs/configuration/workers.xml @@ -50,5 +50,8 @@ ${host} ]]> + + longtext + \ No newline at end of file diff --git a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/kafka/configuration/kafka-env.xml b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/kafka/configuration/kafka-env.xml index 525d2bf9..e51666ce 100644 --- a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/kafka/configuration/kafka-env.xml +++ b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/kafka/configuration/kafka-env.xml @@ -64,5 +64,8 @@ export KAFKA_OPTS={{kafka_kerberos_params}} export CLASSPATH=$CLASSPATH:${kafka_conf_dir} ]]> + + longtext + \ No newline at end of file diff --git a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/kafka/configuration/kafka-log4j.xml b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/kafka/configuration/kafka-log4j.xml index 2c1a7fea..f6f76a09 100644 --- a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/kafka/configuration/kafka-log4j.xml +++ b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/kafka/configuration/kafka-log4j.xml @@ -136,5 +136,8 @@ log4j.logger.state.change.logger=TRACE, stateChangeAppender log4j.additivity.state.change.logger=false ]]> + + longtext + \ No newline at end of file diff --git a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/kafka/configuration/kafka.conf.xml b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/kafka/configuration/kafka.conf.xml index d6101872..48076cd6 100644 --- a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/kafka/configuration/kafka.conf.xml +++ b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/kafka/configuration/kafka.conf.xml @@ -47,5 +47,8 @@ ${kafka_group} - nproc ${kafka_user_nproc_limit} ]]> + + longtext + \ No newline at end of file diff --git a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/yarn/configuration/exclude-nodes.xml b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/yarn/configuration/exclude-nodes.xml index 3f63b79f..aaf80358 100644 --- a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/yarn/configuration/exclude-nodes.xml +++ b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/yarn/configuration/exclude-nodes.xml @@ -50,5 +50,8 @@ ${host} ]]> + + longtext + \ No newline at end of file diff --git a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/yarn/configuration/yarn-env.xml b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/yarn/configuration/yarn-env.xml index ccf4fba7..2b7679d3 100644 --- a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/yarn/configuration/yarn-env.xml +++ b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/yarn/configuration/yarn-env.xml @@ -204,6 +204,9 @@ HADOOP_OPTS="$HADOOP_OPTS -Djava.io.tmpdir=${hadoop_java_io_tmpdir}" HADOOP_OPTS="$HADOOP_OPTS --add-opens java.base/java.lang=ALL-UNNAMED" ]]> + + longtext + service_check.queue.name diff --git a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/yarn/configuration/yarn-log4j.xml b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/yarn/configuration/yarn-log4j.xml index 55f1f2cd..413e27fc 100644 --- a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/yarn/configuration/yarn-log4j.xml +++ b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/yarn/configuration/yarn-log4j.xml @@ -96,6 +96,9 @@ log4j.appender.NMAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n log4j.appender.NMAUDIT.DatePattern=.yyyy-MM-dd ]]> + + longtext + diff --git a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/yarn/configuration/yarn.conf.xml b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/yarn/configuration/yarn.conf.xml index 84f2d3fa..79438b71 100644 --- a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/yarn/configuration/yarn.conf.xml +++ b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/yarn/configuration/yarn.conf.xml @@ -47,5 +47,8 @@ ${yarn_group} - nproc ${yarn_user_nproc_limit} ]]> + + longtext + \ No newline at end of file diff --git a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/zookeeper/configuration/zoo.cfg.xml b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/zookeeper/configuration/zoo.cfg.xml index 608f6333..bd09086c 100644 --- a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/zookeeper/configuration/zoo.cfg.xml +++ b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/zookeeper/configuration/zoo.cfg.xml @@ -121,5 +121,8 @@ kerberos.removeRealmFromPrincipal=true ]]> + + longtext + diff --git a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/zookeeper/configuration/zookeeper-env.xml b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/zookeeper/configuration/zookeeper-env.xml index 84c8e778..c9638338 100644 --- a/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/zookeeper/configuration/zookeeper-env.xml +++ b/bigtop-manager-server/src/main/resources/stacks/bigtop/3.3.0/services/zookeeper/configuration/zookeeper-env.xml @@ -51,5 +51,8 @@ export CLIENT_JVMFLAGS="$CLIENT_JVMFLAGS -Djava.security.auth.login.config=${zk_ ]]> + + longtext + diff --git a/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/kafka/configuration/kafka-env.xml b/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/kafka/configuration/kafka-env.xml index 01b51ace..794129d9 100644 --- a/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/kafka/configuration/kafka-env.xml +++ b/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/kafka/configuration/kafka-env.xml @@ -23,13 +23,13 @@ logDir Kafka Log directory /var/log/kafka - + pidDir /var/run/kafka Kafka PID dir - + kafkaUserNofileLimit @@ -63,6 +63,9 @@ export KAFKA_OPTS={{kafka_kerberos_params}} export CLASSPATH=$CLASSPATH:${CONF_DIR} ]]> - + + + longtext + \ No newline at end of file diff --git a/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/kafka/configuration/kafka-log4j.xml b/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/kafka/configuration/kafka-log4j.xml index 2c1a7fea..f6f76a09 100644 --- a/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/kafka/configuration/kafka-log4j.xml +++ b/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/kafka/configuration/kafka-log4j.xml @@ -136,5 +136,8 @@ log4j.logger.state.change.logger=TRACE, stateChangeAppender log4j.additivity.state.change.logger=false ]]> + + longtext + \ No newline at end of file diff --git a/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/kafka/configuration/kafka.conf.xml b/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/kafka/configuration/kafka.conf.xml index b302bc32..3b9a1518 100644 --- a/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/kafka/configuration/kafka.conf.xml +++ b/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/kafka/configuration/kafka.conf.xml @@ -46,5 +46,8 @@ ${kafkaUser} - nofile ${kafkaUserNofileLimit} ${kafkaGroup} - nproc ${kafkaUserNprocLimit} ]]> + + longtext + \ No newline at end of file diff --git a/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/zookeeper/configuration/zoo.cfg.xml b/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/zookeeper/configuration/zoo.cfg.xml index 8a9b9893..26139101 100644 --- a/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/zookeeper/configuration/zoo.cfg.xml +++ b/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/zookeeper/configuration/zoo.cfg.xml @@ -121,5 +121,8 @@ kerberos.removeRealmFromPrincipal=true ]]> + + longtext + diff --git a/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/zookeeper/configuration/zookeeper-env.xml b/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/zookeeper/configuration/zookeeper-env.xml index 76f647b8..44bdc245 100644 --- a/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/zookeeper/configuration/zookeeper-env.xml +++ b/bigtop-manager-server/src/main/resources/stacks/nop/1.0.0/services/zookeeper/configuration/zookeeper-env.xml @@ -51,5 +51,8 @@ export CLIENT_JVMFLAGS="$CLIENT_JVMFLAGS -Djava.security.auth.login.config=${zk_ ]]> + + longtext + diff --git a/bigtop-manager-ui/src/api/config/types.ts b/bigtop-manager-ui/src/api/config/types.ts index db23f39d..294eefcb 100644 --- a/bigtop-manager-ui/src/api/config/types.ts +++ b/bigtop-manager-ui/src/api/config/types.ts @@ -17,11 +17,16 @@ * under the License. */ +export interface AttrsVO { + type: string +} + export interface PropertyVO { name: string value: string displayName: string desc: string + attrs: AttrsVO } export interface TypeConfigVO { diff --git a/bigtop-manager-ui/src/components/service-add/configure-services.vue b/bigtop-manager-ui/src/components/service-add/configure-services.vue index 88e8855c..cca1aa83 100644 --- a/bigtop-manager-ui/src/components/service-add/configure-services.vue +++ b/bigtop-manager-ui/src/components/service-add/configure-services.vue @@ -22,7 +22,6 @@ import { storeToRefs } from 'pinia' import { useStackStore } from '@/store/stack' import { execCommand } from '@/api/command' - import { QuestionCircleOutlined } from '@ant-design/icons-vue' import _ from 'lodash' const serviceInfo = defineModel('serviceInfo') @@ -99,14 +98,16 @@
{{ property.displayName ?? property.name }}
-
- -
- + - + + @@ -153,12 +154,7 @@ } .config-item-value { - width: 60%; - } - - .config-item-desc { - cursor: pointer; - margin-left: 1rem; + width: 75%; } } } diff --git a/bigtop-manager-ui/src/pages/service/index.vue b/bigtop-manager-ui/src/pages/service/index.vue index c05f8214..a1e843d1 100644 --- a/bigtop-manager-ui/src/pages/service/index.vue +++ b/bigtop-manager-ui/src/pages/service/index.vue @@ -21,11 +21,7 @@ import { computed, onMounted, ref, watch } from 'vue' import { useRoute } from 'vue-router' import type { SelectProps, MenuProps } from 'ant-design-vue' - import { - QuestionCircleOutlined, - DownOutlined, - UserOutlined - } from '@ant-design/icons-vue' + import { DownOutlined, UserOutlined } from '@ant-design/icons-vue' import { useConfigStore } from '@/store/config' import { storeToRefs } from 'pinia' import { ServiceConfigVO, TypeConfigVO } from '@/api/config/types.ts' @@ -265,14 +261,16 @@
{{ property.displayName ?? property.name }}
-
- -
- + - + + @@ -408,12 +406,7 @@ } .config-item-value { - width: 60%; - } - - .config-item-desc { - cursor: pointer; - margin-left: 1rem; + width: 75%; } } }