This is an automated email from the ASF dual-hosted git repository.
liuhaopeng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/bigtop-manager.git
The following commit(s) were added to refs/heads/main by this push:
new b9663a96 BIGTOP-4396: Adjust APIs related to host/service for UI needs
(#196)
b9663a96 is described below
commit b9663a961215b871704bc8b65d5d5d652c620047
Author: Zhiguo Wu <[email protected]>
AuthorDate: Fri Mar 28 19:56:31 2025 +0800
BIGTOP-4396: Adjust APIs related to host/service for UI needs (#196)
---
.../bigtop/manager/common/utils/InstanceUtils.java | 57 ++++++++++++++++++++++
.../bigtop/manager/dao/query/ComponentQuery.java | 2 +
.../apache/bigtop/manager/dao/sql/SQLBuilder.java | 4 +-
.../resources/mapper/mysql/ComponentMapper.xml | 7 ++-
.../mapper/postgresql/ComponentMapper.xml | 7 ++-
.../server/command/job/host/HostAddJob.java | 5 +-
.../manager/server/controller/HostController.java | 14 ++++++
.../converter/ServiceConfigSnapshotConverter.java | 3 ++
.../IdsReq.java} | 14 ++----
.../server/model/vo/ServiceConfigSnapshotVO.java | 4 ++
.../bigtop/manager/server/service/HostService.java | 15 ++++++
.../server/service/impl/HostServiceImpl.java | 55 ++++++++++++++++++---
.../main/resources/i18n/messages_en_US.properties | 2 +-
.../main/resources/i18n/messages_zh_CN.properties | 2 +-
.../infra/1.0.0/services/grafana/metainfo.xml | 7 +++
.../infra/1.0.0/services/prometheus/metainfo.xml | 7 +++
bigtop-manager-ui/package.json | 2 +-
bigtop-manager-ui/pom.xml | 14 +++++-
18 files changed, 193 insertions(+), 28 deletions(-)
diff --git
a/bigtop-manager-common/src/main/java/org/apache/bigtop/manager/common/utils/InstanceUtils.java
b/bigtop-manager-common/src/main/java/org/apache/bigtop/manager/common/utils/InstanceUtils.java
new file mode 100644
index 00000000..7fbdfed9
--- /dev/null
+++
b/bigtop-manager-common/src/main/java/org/apache/bigtop/manager/common/utils/InstanceUtils.java
@@ -0,0 +1,57 @@
+/*
+ * 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
+ *
+ * http://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.common.utils;
+
+import org.springframework.beans.BeanWrapper;
+import org.springframework.beans.BeanWrapperImpl;
+
+import java.beans.PropertyDescriptor;
+import java.util.HashSet;
+import java.util.Set;
+
+public class InstanceUtils {
+
+ public static String[] getNullProperties(Object source) {
+ BeanWrapper src = new BeanWrapperImpl(source);
+ PropertyDescriptor[] pds = src.getPropertyDescriptors();
+
+ Set<String> names = new HashSet<>();
+ for (PropertyDescriptor pd : pds) {
+ Object srcValue = src.getPropertyValue(pd.getName());
+ if (srcValue == null) {
+ names.add(pd.getName());
+ }
+ }
+ return names.toArray(new String[0]);
+ }
+
+ public static String[] getNonNullProperties(Object source) {
+ BeanWrapper src = new BeanWrapperImpl(source);
+ PropertyDescriptor[] pds = src.getPropertyDescriptors();
+
+ Set<String> names = new HashSet<>();
+ for (PropertyDescriptor pd : pds) {
+ Object srcValue = src.getPropertyValue(pd.getName());
+ if (srcValue != null) {
+ names.add(pd.getName());
+ }
+ }
+ return names.toArray(new String[0]);
+ }
+}
diff --git
a/bigtop-manager-dao/src/main/java/org/apache/bigtop/manager/dao/query/ComponentQuery.java
b/bigtop-manager-dao/src/main/java/org/apache/bigtop/manager/dao/query/ComponentQuery.java
index 6fc5c529..1494bb6c 100644
---
a/bigtop-manager-dao/src/main/java/org/apache/bigtop/manager/dao/query/ComponentQuery.java
+++
b/bigtop-manager-dao/src/main/java/org/apache/bigtop/manager/dao/query/ComponentQuery.java
@@ -44,4 +44,6 @@ public class ComponentQuery {
private Long serviceId;
private List<String> serviceNames;
+
+ private Integer status;
}
diff --git
a/bigtop-manager-dao/src/main/java/org/apache/bigtop/manager/dao/sql/SQLBuilder.java
b/bigtop-manager-dao/src/main/java/org/apache/bigtop/manager/dao/sql/SQLBuilder.java
index 10209c97..530e2130 100644
---
a/bigtop-manager-dao/src/main/java/org/apache/bigtop/manager/dao/sql/SQLBuilder.java
+++
b/bigtop-manager-dao/src/main/java/org/apache/bigtop/manager/dao/sql/SQLBuilder.java
@@ -369,12 +369,12 @@ public class SQLBuilder {
SQL sql = new SQL();
switch (DBType.toType(databaseId)) {
case MYSQL: {
- sql.DELETE_FROM(tableMetaData.getTableName());
+ sql.DELETE_FROM(keywordsFormat(tableMetaData.getTableName(),
DBType.MYSQL));
sql.WHERE(getEquals(tableMetaData.getPkColumn(),
tableMetaData.getPkProperty()));
break;
}
case POSTGRESQL: {
- sql.FROM(keywordsFormat(tableMetaData.getTableName(),
DBType.POSTGRESQL));
+ sql.DELETE_FROM(keywordsFormat(tableMetaData.getTableName(),
DBType.POSTGRESQL));
sql.WHERE(tableMetaData.getPkColumn() + " = " + id);
break;
}
diff --git
a/bigtop-manager-dao/src/main/resources/mapper/mysql/ComponentMapper.xml
b/bigtop-manager-dao/src/main/resources/mapper/mysql/ComponentMapper.xml
index 8a7f1fa0..4f87b36e 100644
--- a/bigtop-manager-dao/src/main/resources/mapper/mysql/ComponentMapper.xml
+++ b/bigtop-manager-dao/src/main/resources/mapper/mysql/ComponentMapper.xml
@@ -48,7 +48,7 @@
left join host h on comp.host_id = h.id
<where>
<if test="query.name != null and query.name != ''">
- and comp.name = #{query.name}
+ and comp.name like concat('%', #{query.name}, '%')
</if>
<if test="query.clusterId != null">
and comp.cluster_id = #{query.clusterId}
@@ -57,7 +57,7 @@
and comp.host_id = #{query.hostId}
</if>
<if test="query.hostname != null and query.hostname != ''">
- and h.hostname = #{query.hostname}
+ and h.hostname like concat('%', #{query.hostname}, '%')
</if>
<if test="query.hostnames != null and query.hostnames.size() > 0">
and h.hostname in
@@ -74,6 +74,9 @@
#{serviceName}
</foreach>
</if>
+ <if test="query.status != null">
+ and comp.status = #{query.status}
+ </if>
</where>
</select>
diff --git
a/bigtop-manager-dao/src/main/resources/mapper/postgresql/ComponentMapper.xml
b/bigtop-manager-dao/src/main/resources/mapper/postgresql/ComponentMapper.xml
index 8a7f1fa0..4f87b36e 100644
---
a/bigtop-manager-dao/src/main/resources/mapper/postgresql/ComponentMapper.xml
+++
b/bigtop-manager-dao/src/main/resources/mapper/postgresql/ComponentMapper.xml
@@ -48,7 +48,7 @@
left join host h on comp.host_id = h.id
<where>
<if test="query.name != null and query.name != ''">
- and comp.name = #{query.name}
+ and comp.name like concat('%', #{query.name}, '%')
</if>
<if test="query.clusterId != null">
and comp.cluster_id = #{query.clusterId}
@@ -57,7 +57,7 @@
and comp.host_id = #{query.hostId}
</if>
<if test="query.hostname != null and query.hostname != ''">
- and h.hostname = #{query.hostname}
+ and h.hostname like concat('%', #{query.hostname}, '%')
</if>
<if test="query.hostnames != null and query.hostnames.size() > 0">
and h.hostname in
@@ -74,6 +74,9 @@
#{serviceName}
</foreach>
</if>
+ <if test="query.status != null">
+ and comp.status = #{query.status}
+ </if>
</where>
</select>
diff --git
a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/command/job/host/HostAddJob.java
b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/command/job/host/HostAddJob.java
index ba045d31..d87121cc 100644
---
a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/command/job/host/HostAddJob.java
+++
b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/command/job/host/HostAddJob.java
@@ -72,7 +72,10 @@ public class HostAddJob extends AbstractHostJob {
CommandDTO commandDTO = jobContext.getCommandDTO();
List<HostDTO> hostDTOList =
HostConverter.INSTANCE.fromCommand2DTO(commandDTO.getHostCommands());
for (HostDTO hostDTO : hostDTOList) {
- hostDTO.setClusterId(clusterPO.getId());
+ if (hostDTO.getClusterId() == null) {
+ hostDTO.setClusterId(clusterPO.getId());
+ }
+
hostService.add(hostDTO);
}
}
diff --git
a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/controller/HostController.java
b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/controller/HostController.java
index 340a14b7..7521ab07 100644
---
a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/controller/HostController.java
+++
b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/controller/HostController.java
@@ -22,6 +22,8 @@ import org.apache.bigtop.manager.dao.query.HostQuery;
import org.apache.bigtop.manager.server.model.converter.HostConverter;
import org.apache.bigtop.manager.server.model.dto.HostDTO;
import org.apache.bigtop.manager.server.model.req.HostReq;
+import org.apache.bigtop.manager.server.model.req.IdsReq;
+import org.apache.bigtop.manager.server.model.vo.ComponentVO;
import org.apache.bigtop.manager.server.model.vo.HostVO;
import org.apache.bigtop.manager.server.model.vo.InstalledStatusVO;
import org.apache.bigtop.manager.server.model.vo.PageVO;
@@ -99,6 +101,18 @@ public class HostController {
return ResponseEntity.success(hostService.remove(id));
}
+ @Operation(summary = "components", description = "Get host components")
+ @GetMapping("/{id}/components")
+ public ResponseEntity<List<ComponentVO>> components(@PathVariable Long id)
{
+ return ResponseEntity.success(hostService.components(id));
+ }
+
+ @Operation(summary = "batch remove", description = "Remove hosts")
+ @DeleteMapping("/batch")
+ public ResponseEntity<Boolean> batchRemove(@RequestBody IdsReq req) {
+ return ResponseEntity.success(hostService.batchRemove(req.getIds()));
+ }
+
@Operation(summary = "Check connection", description = "Check connection
for hosts")
@PostMapping("/check-connection")
public ResponseEntity<Boolean> checkConnection(@RequestBody @Validated
HostReq hostReq) {
diff --git
a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/converter/ServiceConfigSnapshotConverter.java
b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/converter/ServiceConfigSnapshotConverter.java
index 41fe4799..d2d62eeb 100644
---
a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/converter/ServiceConfigSnapshotConverter.java
+++
b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/converter/ServiceConfigSnapshotConverter.java
@@ -24,6 +24,7 @@ import
org.apache.bigtop.manager.server.model.dto.ServiceConfigSnapshotDTO;
import org.apache.bigtop.manager.server.model.vo.ServiceConfigSnapshotVO;
import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import java.util.List;
@@ -37,6 +38,8 @@ public interface ServiceConfigSnapshotConverter {
List<ServiceConfigSnapshotDTO> fromPO2DTO(List<ServiceConfigSnapshotPO>
serviceConfigSnapshotPOList);
+ @Mapping(target = "createTime", source = "createTime", dateFormat =
"yyyy-MM-dd HH:mm:ss")
+ @Mapping(target = "updateTime", source = "updateTime", dateFormat =
"yyyy-MM-dd HH:mm:ss")
ServiceConfigSnapshotVO fromPO2VO(ServiceConfigSnapshotPO
serviceConfigSnapshotPO);
List<ServiceConfigSnapshotVO> fromPO2VO(List<ServiceConfigSnapshotPO>
serviceConfigSnapshotPOList);
diff --git
a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/vo/ServiceConfigSnapshotVO.java
b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/req/IdsReq.java
similarity index 77%
copy from
bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/vo/ServiceConfigSnapshotVO.java
copy to
bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/req/IdsReq.java
index dd7c4a2f..752bbad8 100644
---
a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/vo/ServiceConfigSnapshotVO.java
+++
b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/req/IdsReq.java
@@ -16,20 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.bigtop.manager.server.model.vo;
+package org.apache.bigtop.manager.server.model.req;
import lombok.Data;
-import java.io.Serializable;
+import java.util.List;
@Data
-public class ServiceConfigSnapshotVO implements Serializable {
+public class IdsReq {
- private Long id;
-
- private String name;
-
- private String desc;
-
- private String configJson;
+ private List<Long> ids;
}
diff --git
a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/vo/ServiceConfigSnapshotVO.java
b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/vo/ServiceConfigSnapshotVO.java
index dd7c4a2f..96dff3ca 100644
---
a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/vo/ServiceConfigSnapshotVO.java
+++
b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/model/vo/ServiceConfigSnapshotVO.java
@@ -32,4 +32,8 @@ public class ServiceConfigSnapshotVO implements Serializable {
private String desc;
private String configJson;
+
+ private String createTime;
+
+ private String updateTime;
}
diff --git
a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/service/HostService.java
b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/service/HostService.java
index 9bd0590f..d0503b05 100644
---
a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/service/HostService.java
+++
b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/service/HostService.java
@@ -20,6 +20,7 @@ package org.apache.bigtop.manager.server.service;
import org.apache.bigtop.manager.dao.query.HostQuery;
import org.apache.bigtop.manager.server.model.dto.HostDTO;
+import org.apache.bigtop.manager.server.model.vo.ComponentVO;
import org.apache.bigtop.manager.server.model.vo.HostVO;
import org.apache.bigtop.manager.server.model.vo.InstalledStatusVO;
import org.apache.bigtop.manager.server.model.vo.PageVO;
@@ -65,6 +66,20 @@ public interface HostService {
*/
Boolean remove(Long id);
+ /**
+ * Get host components
+ *
+ * @return Components
+ */
+ List<ComponentVO> components(Long id);
+
+ /**
+ * Batch delete hosts
+ *
+ * @return Host
+ */
+ Boolean batchRemove(List<Long> ids);
+
/**
* Check hosts connection
*
diff --git
a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/service/impl/HostServiceImpl.java
b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/service/impl/HostServiceImpl.java
index 9846c256..1808cc3f 100644
---
a/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/service/impl/HostServiceImpl.java
+++
b/bigtop-manager-server/src/main/java/org/apache/bigtop/manager/server/service/impl/HostServiceImpl.java
@@ -20,8 +20,11 @@ package org.apache.bigtop.manager.server.service.impl;
import org.apache.bigtop.manager.common.constants.MessageConstants;
import org.apache.bigtop.manager.common.shell.ShellResult;
+import org.apache.bigtop.manager.common.utils.InstanceUtils;
+import org.apache.bigtop.manager.dao.po.ComponentPO;
import org.apache.bigtop.manager.dao.po.HostPO;
import org.apache.bigtop.manager.dao.po.RepoPO;
+import org.apache.bigtop.manager.dao.query.ComponentQuery;
import org.apache.bigtop.manager.dao.query.HostQuery;
import org.apache.bigtop.manager.dao.repository.ComponentDao;
import org.apache.bigtop.manager.dao.repository.HostDao;
@@ -31,9 +34,11 @@ import
org.apache.bigtop.manager.server.enums.HealthyStatusEnum;
import org.apache.bigtop.manager.server.enums.HostAuthTypeEnum;
import org.apache.bigtop.manager.server.enums.InstalledStatusEnum;
import org.apache.bigtop.manager.server.exception.ApiException;
+import org.apache.bigtop.manager.server.model.converter.ComponentConverter;
import org.apache.bigtop.manager.server.model.converter.HostConverter;
import org.apache.bigtop.manager.server.model.dto.HostDTO;
import org.apache.bigtop.manager.server.model.query.PageQuery;
+import org.apache.bigtop.manager.server.model.vo.ComponentVO;
import org.apache.bigtop.manager.server.model.vo.HostVO;
import org.apache.bigtop.manager.server.model.vo.InstalledStatusVO;
import org.apache.bigtop.manager.server.model.vo.PageVO;
@@ -41,6 +46,7 @@ import org.apache.bigtop.manager.server.service.HostService;
import org.apache.bigtop.manager.server.utils.PageUtils;
import org.apache.bigtop.manager.server.utils.RemoteSSHUtils;
+import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import com.github.pagehelper.Page;
@@ -136,19 +142,56 @@ public class HostServiceImpl implements HostService {
@Override
public HostVO update(Long id, HostDTO hostDTO) {
- HostPO hostPO = HostConverter.INSTANCE.fromDTO2PO(hostDTO);
- hostPO.setId(id);
- hostDao.partialUpdateById(hostPO);
+ HostPO hostPO = hostDao.findById(id);
+ HostPO convertedHostPO = HostConverter.INSTANCE.fromDTO2PO(hostDTO);
+ BeanUtils.copyProperties(convertedHostPO, hostPO,
InstanceUtils.getNullProperties(convertedHostPO));
+ switch (HostAuthTypeEnum.fromCode(hostPO.getAuthType())) {
+ case PASSWORD -> {
+ hostPO.setSshPassword(hostDTO.getSshPassword());
+ hostPO.setSshKeyString(null);
+ hostPO.setSshKeyFilename(null);
+ hostPO.setSshKeyPassword(null);
+ }
+ case KEY -> {
+ hostPO.setSshPassword(null);
+ hostPO.setSshKeyString(hostDTO.getSshKeyString());
+ hostPO.setSshKeyFilename(hostDTO.getSshKeyFilename());
+ hostPO.setSshKeyPassword(hostDTO.getSshKeyPassword());
+ }
+ case NO_AUTH -> {
+ hostPO.setSshPassword(null);
+ hostPO.setSshKeyString(null);
+ hostPO.setSshKeyFilename(null);
+ hostPO.setSshKeyPassword(null);
+ }
+ }
+
+ hostDao.updateById(hostPO);
return get(id);
}
@Override
public Boolean remove(Long id) {
- if (componentDao.countByHostId(id) > 0) {
- throw new ApiException(ApiExceptionEnum.HOST_HAS_COMPONENTS);
+ return batchRemove(List.of(id));
+ }
+
+ @Override
+ public List<ComponentVO> components(Long id) {
+ ComponentQuery query = ComponentQuery.builder().hostId(id).build();
+ List<ComponentPO> componentPOList = componentDao.findByQuery(query);
+ return ComponentConverter.INSTANCE.fromPO2VO(componentPOList);
+ }
+
+ @Override
+ public Boolean batchRemove(List<Long> ids) {
+ for (Long id : ids) {
+ if (componentDao.countByHostId(id) > 0) {
+ HostPO hostPO = hostDao.findById(id);
+ throw new ApiException(ApiExceptionEnum.HOST_HAS_COMPONENTS,
hostPO.getHostname());
+ }
}
- return hostDao.deleteById(id);
+ return hostDao.deleteByIds(ids);
}
@Override
diff --git
a/bigtop-manager-server/src/main/resources/i18n/messages_en_US.properties
b/bigtop-manager-server/src/main/resources/i18n/messages_en_US.properties
index a9d1b3d9..d9a5b0fa 100644
--- a/bigtop-manager-server/src/main/resources/i18n/messages_en_US.properties
+++ b/bigtop-manager-server/src/main/resources/i18n/messages_en_US.properties
@@ -40,7 +40,7 @@ host.not.connected=Hosts [{0}] not connected
host.unable.to.resolve=Unable to resolve to host [{0}]
host.unable.to.connect=Unable to connect to host [{0}]
host.unable.to.exec.command=Unable to execute command on host [{0}]
-host.has.components=Host still has components, please remove them first
+host.has.components=Host [{0}] still has components, please remove them first
stack.not.found=Stack not exist
diff --git
a/bigtop-manager-server/src/main/resources/i18n/messages_zh_CN.properties
b/bigtop-manager-server/src/main/resources/i18n/messages_zh_CN.properties
index 64583349..aaa4eebc 100644
--- a/bigtop-manager-server/src/main/resources/i18n/messages_zh_CN.properties
+++ b/bigtop-manager-server/src/main/resources/i18n/messages_zh_CN.properties
@@ -40,7 +40,7 @@ host.not.connected=主机 [{0}] 未连接
host.unable.to.resolve=无法解析主机 [{0}]
host.unable.to.connect=无法连接到主机 [{0}]
host.unable.to.exec.command=无法在主机 [{0}] 上执行命令
-host.has.components=主机上仍有组件,请先移除
+host.has.components=主机 [{0}] 上仍有组件,请先移除
stack.not.found=组件栈不存在
diff --git
a/bigtop-manager-server/src/main/resources/stacks/infra/1.0.0/services/grafana/metainfo.xml
b/bigtop-manager-server/src/main/resources/stacks/infra/1.0.0/services/grafana/metainfo.xml
index e1054bbf..45465e02 100644
---
a/bigtop-manager-server/src/main/resources/stacks/infra/1.0.0/services/grafana/metainfo.xml
+++
b/bigtop-manager-server/src/main/resources/stacks/infra/1.0.0/services/grafana/metainfo.xml
@@ -37,6 +37,13 @@
<display-name>Grafana Server</display-name>
<category>server</category>
<cardinality>1+</cardinality>
+ <quick-link>
+ <display-name>Grafana UI</display-name>
+ <http-port-property>port</http-port-property>
+ <http-port-default>3000</http-port-default>
+ <https-port-property>port</https-port-property>
+ <https-port-default>3000</https-port-default>
+ </quick-link>
</component>
</components>
diff --git
a/bigtop-manager-server/src/main/resources/stacks/infra/1.0.0/services/prometheus/metainfo.xml
b/bigtop-manager-server/src/main/resources/stacks/infra/1.0.0/services/prometheus/metainfo.xml
index 9b9c5136..dfc1850b 100644
---
a/bigtop-manager-server/src/main/resources/stacks/infra/1.0.0/services/prometheus/metainfo.xml
+++
b/bigtop-manager-server/src/main/resources/stacks/infra/1.0.0/services/prometheus/metainfo.xml
@@ -37,6 +37,13 @@
<display-name>Prometheus Server</display-name>
<category>server</category>
<cardinality>1+</cardinality>
+ <quick-link>
+ <display-name>Prometheus UI</display-name>
+ <http-port-property>port</http-port-property>
+ <http-port-default>9090</http-port-default>
+ <https-port-property>port</https-port-property>
+ <https-port-default>9090</https-port-default>
+ </quick-link>
</component>
</components>
diff --git a/bigtop-manager-ui/package.json b/bigtop-manager-ui/package.json
index e50625af..33c0b103 100644
--- a/bigtop-manager-ui/package.json
+++ b/bigtop-manager-ui/package.json
@@ -5,7 +5,7 @@
"dev": "vite --open --mode development",
"build": "vue-tsc && vite build --mode production",
"preview": "vite preview",
- "lint": "eslint src --fix --ext .ts,.tsx,.vue",
+ "lint": "eslint src --ext .ts,.tsx,.vue",
"prettier": "prettier --write \"src/**/*.{vue,ts,tsx}\"",
"test": "vitest",
"test:run": "vitest run"
diff --git a/bigtop-manager-ui/pom.xml b/bigtop-manager-ui/pom.xml
index 23cc14ad..6f37e70f 100644
--- a/bigtop-manager-ui/pom.xml
+++ b/bigtop-manager-ui/pom.xml
@@ -68,13 +68,13 @@
</configuration>
</execution>
<execution>
- <id>pnpm build</id>
+ <id>pnpm lint</id>
<goals>
<goal>pnpm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
- <arguments>build</arguments>
+ <arguments>lint</arguments>
</configuration>
</execution>
<execution>
@@ -88,6 +88,16 @@
<skip>${skip.pnpm.test}</skip>
</configuration>
</execution>
+ <execution>
+ <id>pnpm build</id>
+ <goals>
+ <goal>pnpm</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ <configuration>
+ <arguments>build</arguments>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>