Skip to content

Latest commit

 

History

History
277 lines (276 loc) · 7.69 KB

表单定义.md

File metadata and controls

277 lines (276 loc) · 7.69 KB

表单定义Json

暂定义可输入三条规则。

[
  {
    "field": "pr1_status",
    "label": "规则一:是否启用",
    "component": "radio",
    "dataType": "boolean",
    "default": true,
    "options": [
      {
        "label": "",
        "value": true
      },
      {
        "label": "",
        "value": false
      }
    ],
    "rules": []
  },
  {
    "field": "pr1_routeType",
    "label": "规则一:路由方式",
    "component": "radio",
    "dataType": "short",
    "default": 1,
    "options": [
      {
        "label": "分派",
        "value": 1
      },
      {
        "label": "复制",
        "value": 2
      }
    ],
    "rules": []
  },
  {
    "field": "pr1_path",
    "label": "规则一:匹配条件-接口路径",
    "component": "input",
    "dataType": "string",
    "desc": "当前路由子路径,可以是某一层路径或是具体接口,不填或/**为当前路由下所有路径。选填",
    "default": "",
    "rules": []
  },
  {
    "field": "pr1_ip",
    "label": "规则一:匹配条件-来源IP",
    "component": "input",
    "dataType": "string",
    "desc": "填写单个IP、多个IP或IP段,逗号隔开。选填",
    "default": "",
    "rules": []
  },
  {
    "field": "pr1_header",
    "label": "规则一:匹配条件-header",
    "component": "input",
    "dataType": "string",
    "desc": "填写header字段名及其值(若多个值可用竖线隔开),多个header可逗号隔开(为并的关系),例如填 \"version=2.0|3.0,os=andriod\", 表示header里name为version的字段为2.0或3.0且os为andriod时匹配条件,若值填*表示任意非空值(此时其它值无效)。选填",
    "default": "",
    "rules": []
  },
  {
    "field": "pr1_cookie",
    "label": "规则一:匹配条件-cookie",
    "component": "input",
    "dataType": "string",
    "desc": "填法同header。选填",
    "default": "",
    "rules": []
  },
  {
    "field": "pr1_param",
    "label": "规则一:匹配条件-请求参数",
    "component": "input",
    "dataType": "string",
    "desc": "填法同header。选填",
    "default": "",
    "rules": []
  },
  {
    "field": "pr1_targetParam",
    "label": "规则一:目标路由",
    "component": "input",
    "dataType": "string",
    "desc": "填写接收匹配上述条件的请求的Fizz路由信息,不填则使用本路由(复制方式下必填)。路由由服务名(必填)+前端路径(必填)+请求方法(必填)+AppID(选填)一起确定,填写格式:targetService=xxx, targetPath=xxx, targetMethod=xxx, appId=xxx",
    "default": "",
    "rules": []
  },
  {
    "field": "pr2_status",
    "label": "规则二:是否启用",
    "component": "radio",
    "dataType": "boolean",
    "default": true,
    "options": [
      {
        "label": "",
        "value": true
      },
      {
        "label": "",
        "value": false
      }
    ],
    "rules": []
  },
  {
    "field": "pr2_routeType",
    "label": "规则二:路由方式",
    "component": "radio",
    "dataType": "short",
    "default": 1,
    "options": [
      {
        "label": "分派",
        "value": 1
      },
      {
        "label": "复制",
        "value": 2
      }
    ],
    "rules": []
  },
  {
    "field": "pr2_path",
    "label": "规则二:匹配条件-接口路径",
    "component": "input",
    "dataType": "string",
    "desc": "当前路由子路径,可以是某一层路径或是具体接口,不填或/**为当前路由下所有路径。选填",
    "default": "",
    "rules": []
  },
  {
    "field": "pr2_ip",
    "label": "规则二:匹配条件-来源IP",
    "component": "input",
    "dataType": "string",
    "desc": "填写单个IP、多个IP或IP段,逗号隔开。选填",
    "default": "",
    "rules": []
  },
  {
    "field": "pr2_header",
    "label": "规则二:匹配条件-header",
    "component": "input",
    "dataType": "string",
    "desc": "填写header字段名及其值(若多个值可用竖线隔开),多个header可逗号隔开(为并的关系),例如填 \"version=2.0|3.0,os=andriod\", 表示header里name为version的字段为2.0或3.0且os为andriod时匹配条件,若值填*表示任意非空值(此时其它值无效)。选填",
    "default": "",
    "rules": []
  },
  {
    "field": "pr2_cookie",
    "label": "规则二:匹配条件-cookie",
    "component": "input",
    "dataType": "string",
    "desc": "填法同header。选填",
    "default": "",
    "rules": []
  },
  {
    "field": "pr2_param",
    "label": "规则二:匹配条件-请求参数",
    "component": "input",
    "dataType": "string",
    "desc": "填法同header。选填",
    "default": "",
    "rules": []
  },
  {
    "field": "pr2_targetParam",
    "label": "规则二:目标路由",
    "component": "input",
    "dataType": "string",
    "desc": "填写接收匹配上述条件的请求的Fizz路由信息,不填则使用本路由(复制方式下必填)。路由由服务名(必填)+前端路径(必填)+请求方法(必填)+AppID(选填)一起确定,填写格式:targetService=xxx, targetPath=xxx, targetMethod=xxx, appId=xxx",
    "default": "",
    "rules": []
  },
  {
    "field": "pr3_status",
    "label": "规则三:是否启用",
    "component": "radio",
    "dataType": "boolean",
    "default": true,
    "options": [
      {
        "label": "",
        "value": true
      },
      {
        "label": "",
        "value": false
      }
    ],
    "rules": []
  },
  {
    "field": "pr3_routeType",
    "label": "规则三:路由方式",
    "component": "radio",
    "dataType": "short",
    "default": 1,
    "options": [
      {
        "label": "分派",
        "value": 1
      },
      {
        "label": "复制",
        "value": 2
      }
    ],
    "rules": []
  },
  {
    "field": "pr3_path",
    "label": "规则三:匹配条件-接口路径",
    "component": "input",
    "dataType": "string",
    "desc": "当前路由子路径,可以是某一层路径或是具体接口,不填或/**为当前路由下所有路径。选填",
    "default": "",
    "rules": []
  },
  {
    "field": "pr3_ip",
    "label": "规则三:匹配条件-来源IP",
    "component": "input",
    "dataType": "string",
    "desc": "填写单个IP、多个IP或IP段,逗号隔开。选填",
    "default": "",
    "rules": []
  },
  {
    "field": "pr3_header",
    "label": "规则三:匹配条件-header",
    "component": "input",
    "dataType": "string",
    "desc": "填写header字段名及其值(若多个值可用竖线隔开),多个header可逗号隔开(为并的关系),例如填 \"version=2.0|3.0,os=andriod\", 表示header里name为version的字段为2.0或3.0且os为andriod时匹配条件,若值填*表示任意非空值(此时其它值无效)。选填",
    "default": "",
    "rules": []
  },
  {
    "field": "pr3_cookie",
    "label": "规则三:匹配条件-cookie",
    "component": "input",
    "dataType": "string",
    "desc": "填法同header。选填",
    "default": "",
    "rules": []
  },
  {
    "field": "pr3_param",
    "label": "规则三:匹配条件-请求参数",
    "component": "input",
    "dataType": "string",
    "desc": "填法同header。选填",
    "default": "",
    "rules": []
  },
  {
    "field": "pr3_targetParam",
    "label": "规则三:目标路由",
    "component": "input",
    "dataType": "string",
    "desc": "填写接收匹配上述条件的请求的Fizz路由信息,不填则使用本路由(复制方式下必填)。路由由服务名(必填)+前端路径(必填)+请求方法(必填)+AppID(选填)一起确定,填写格式:targetService=xxx, targetPath=xxx, targetMethod=xxx, appId=xxx",
    "default": "",
    "rules": []
  }
]