Files
APIPark/module/dynamic-module/driver/embed/file-access-log/plugin.yml
T
2024-08-12 21:38:09 +08:00

229 lines
6.2 KiB
YAML

#file: noinspection YAMLSchemaValidation
id: "file-access-log.apinto.com"
name: "file-access-log"
cname: "文件日志"
resume: "将请求和响应数据输出到日志文件中"
version: "v1.0.0"
icon: "文件日志.png"
driver: "dynamic.apinto.com"
front: template/file-access-log
navigation: "navigation.system"
group_id: "log"
frontend:
- name: file-access-log
driver: apinto.intelligent.normal
router:
- path: template/file-access-log
type: normal
define: # 动态模块定义
profession: output
drivers:
- name: file
title: 文件
skill: Access-Output
fields:
- name: title # 定义从响应中对应字段中获取显示值
title: 名称
- name: id
title: ID
- name: driver
title: 驱动名称
- name: description
title: 描述
render:
file: |
{
"type":"object",
"properties":{
"scopes":{
"type":"array",
"title":"作用范围",
"x-decorator":"FormItem",
"x-component":"ArrayItems",
"x-decorator-props":{
"labelCol":6,
"wrapperCol":10
},
"items":{
"type":"void",
"x-component":"Space",
"properties":{
"sort":{
"type":"void",
"x-decorator":"FormItem",
"x-component":"ArrayItems.SortHandle"
},
"select":{
"type":"string",
"x-decorator":"FormItem",
"x-component":"Select",
"enum":[
{
"label":"Access日志",
"value":"access_log"
}
]
},
"remove":{
"type":"void",
"x-decorator":"FormItem",
"x-component":"ArrayItems.Remove"
}
}
},
"properties":{
"add":{
"type":"void",
"title":"添加条目",
"x-component":"ArrayItems.Addition",
"x-component-props":{
"defaultValue":"access_log"
}
}
},
"name":"scopes",
"x-index":0,
"required":true
},
"file":{
"type":"string",
"title":"文件名称",
"x-decorator":"FormItem",
"x-component":"Input",
"x-validator":[
],
"x-component-props":{
},
"x-decorator-props":{
"labelCol":6,
"wrapperCol":10
},
"name":"file",
"x-index":1,
"required":true
},
"dir":{
"type":"string",
"title":"存放目录",
"x-decorator":"FormItem",
"x-component":"Input",
"x-validator":[
],
"x-component-props":{
},
"x-decorator-props":{
"labelCol":6,
"wrapperCol":10
},
"name":"dir",
"x-index":2,
"required":true
},
"period":{
"title":"日志分割周期",
"x-decorator":"FormItem",
"x-component":"Select",
"x-validator":[
],
"x-component-props":{
},
"x-decorator-props":{
"labelCol":6,
"wrapperCol":10
},
"enum":[
{
"children":[
],
"label":"小时",
"value":"hour"
},
{
"children":[
],
"label":"天",
"value":"day"
}
],
"default":"hour",
"name":"period",
"x-index":3,
"required":true
},
"expore":{
"type":"number",
"title":"过期时间",
"x-decorator":"FormItem",
"x-component":"NumberPicker",
"x-validator":"integer",
"x-component-props":{
},
"x-decorator-props":{
"labelCol":6,
"wrapperCol":10
},
"name":"expore",
"x-index":4,
"default":"3",
"description":"单位:天",
"required":true
},
"type":{
"title":"输出格式",
"x-decorator":"FormItem",
"x-component":"Select",
"x-validator":[
],
"x-component-props":{
},
"x-decorator-props":{
"labelCol":6,
"wrapperCol":10
},
"enum":[
{
"children":[
],
"label":"单行",
"value":"line"
},
{
"children":[
],
"label":"Json",
"value":"json"
}
],
"default":"line",
"name":"type",
"x-index":5,
"required":true
},
"formatter":{
"type":"object",
"title":"格式化配置",
"x-decorator":"FormItem",
"x-component":"CustomCodeboxComponent",
"x-component-props":{
"mode":"json"
},
"x-decorator-props":{
"labelCol":6,
"wrapperCol":10
}
}
}
}