[monitor]feature:param yml support key-value map (#57)

This commit is contained in:
tomsun28
2022-04-03 21:35:56 +08:00
committed by GitHub
parent 0cf66f32ff
commit 636303021f
18 changed files with 210 additions and 16 deletions

View File

@@ -236,6 +236,9 @@ public class MonitorServiceImpl implements MonitorService {
case "checkbox":
// todo checkbox校验
break;
case "key-value":
// todo key-value校验
break;
// todo 更多参数定义与实际值格式校验
default:
throw new IllegalArgumentException("ParamDefine type " + paramDefine.getType() + " is invalid.");

View File

@@ -5,7 +5,7 @@ app: example
name:
zh-CN: 模拟应用类型
en-US: EXAMPLE APP
# 参数映射map. type是参数类型: 0-number数字, 1-string明文字符串, 2-secret加密字符串
# 参数映射map. type是参数类型: 0-number数字, 1-string明文字符串, 2-secret加密字符串, 3-map映射的json串
# 强制固定必须参数 - host
configmap:
- key: host
@@ -16,6 +16,8 @@ configmap:
type: 1
- key: password
type: 2
- key: headers
type: 3
# 指标组列表
metrics:
# 第一个监控指标组 cpu
@@ -69,7 +71,7 @@ metrics:
ssl: false
# 请求头内容
headers:
apiVersion: v1
^_^headers^_^: ^_^headers^_^
# 请求参数内容
params:
param1: param1

View File

@@ -48,4 +48,10 @@ param:
- label: PUT请求
value: PUT
- label: DELETE请求
value: DELETE
value: DELETE
- field: headers
name: 请求头
type: key-value
required: false
keyAlias: Header Name
valueAlias: Header Value