[manager,webapp]新增监控大类别,支持自定义监控页面菜单自动渲染

This commit is contained in:
tomsun28
2022-03-05 15:17:52 +08:00
parent 326cc35199
commit 36926f0fa2
15 changed files with 65 additions and 45 deletions

View File

@@ -50,7 +50,7 @@ public class AppController {
}
@GetMapping(path = "/hierarchy")
@ApiOperation(value = "查询全部层级的监控类型", notes = "查询所有监控类型,以层级结构输出")
@ApiOperation(value = "查询全部监控指标层级", notes = "查询所有监控类型-指标组-指标层级,以层级结构输出")
public ResponseEntity<Message<List<Hierarchy>>> queryAppsHierarchy(
@ApiParam(value = "语言类型", example = "zh-CN", defaultValue = "zh-CN")
@RequestParam(name = "lang", required = false) String lang) {

View File

@@ -21,15 +21,18 @@ import static io.swagger.annotations.ApiModelProperty.AccessMode.READ_WRITE;
@Data
public class Hierarchy {
@ApiModelProperty(value = "属性", example = "linux", accessMode = READ_WRITE, position = 0)
@ApiModelProperty(value = "类别", example = "os", accessMode = READ_WRITE, position = 0)
String category;
@ApiModelProperty(value = "属性值", example = "linux", accessMode = READ_WRITE, position = 1)
String value;
@ApiModelProperty(value = "属性国际化标签", example = "Linux系统", accessMode = READ_WRITE, position = 1)
@ApiModelProperty(value = "属性国际化标签", example = "Linux系统", accessMode = READ_WRITE, position = 2)
String label;
@ApiModelProperty(value = "是否是叶子节点", example = "true", accessMode = READ_WRITE, position = 2)
@ApiModelProperty(value = "是否是叶子节点", example = "true", accessMode = READ_WRITE, position = 3)
Boolean isLeaf = false;
@ApiModelProperty(value = "下一关联层级", accessMode = READ_WRITE, position = 3)
@ApiModelProperty(value = "下一关联层级", accessMode = READ_WRITE, position = 4)
private List<Hierarchy> children;
}

View File

@@ -84,6 +84,7 @@ public class AppServiceImpl implements AppService, CommandLineRunner {
List<Hierarchy> hierarchies = new LinkedList<>();
for (Job job : appDefines.values()) {
Hierarchy hierarchyApp = new Hierarchy();
hierarchyApp.setCategory(job.getCategory());
hierarchyApp.setValue(job.getApp());
Map<String, String> nameMap = job.getName();
if (nameMap != null) {

View File

@@ -1,3 +1,5 @@
# 此监控类型所属类别service-应用服务监控 db-数据库监控 custom-自定义监控 os-操作系统监控
category: custom
# 监控应用类型(与文件名保持一致) eg: linux windows tomcat mysql aws...
app: example
name:

View File

@@ -1,3 +1,5 @@
# 此监控类型所属类别service-应用服务监控 db-数据库监控 custom-自定义监控 os-操作系统监控
category: service
# 监控应用类型名称(与文件名保持一致) eg: linux windows tomcat mysql aws...
app: api
name:

View File

@@ -1,3 +1,4 @@
category: service
app: fullsite
name:
zh-CN: 全站监控

View File

@@ -1,3 +1,4 @@
category: db
app: mysql
name:
zh-CN: MYSQL数据库

View File

@@ -1,3 +1,5 @@
# 此监控类型所属类别service-应用服务监控 db-数据库监控 custom-自定义监控 os-操作系统监控
category: service
# 监控应用类型名称(与文件名保持一致) eg: linux windows tomcat mysql aws...
app: ping
name:

View File

@@ -1,3 +1,4 @@
category: service
app: port
name:
zh-CN: 端口可用性

View File

@@ -1,3 +1,4 @@
category: service
app: telnet
name:
zh-CN: TELNET端口可用性

View File

@@ -1,3 +1,4 @@
category: service
app: website
name:
zh-CN: 网站监测