@uyun/ec-action-test
参数配置组件
Last updated 3 years ago .
UNLICENSED · Repository · Bugs ·
$ cnpm install @uyun/ec-action-test 
Private package

category: Components type: Automation title: ActionTest subtitle: 操作测试 cols: 1

作者:夏显林

API

<ActionTest />

组件参数

ActionTest / ActionTest.ActionTestForm

属性 说明 类型 默认值
action 操作对象,数据结构参考 automation object -
value 操作执行数据 object -
inline 表单项展示方式,单行/跨行 boolean true
autoTest 是否自动测试,自动测试就是直接校验并发起测试请求 boolean true
submitCallback 获取调用提交的方法 Function(cb:(reuslt:boolean)->void) -
onChange 值变化回调 Function(value) -
onResultChange 测试结果回调,只有提交后才出发 Function(result:obhect) -

ActionTest.ActionTestResult

属性 说明 类型 默认值
status 日志状态,1:执行中,2:执行成功,9:执行错误 number
logs 日志数据 object[] []

操作测试数据结构

数据结构中只有部分字段在测试用到,但是提交测试需要完整的数据结构,用到的字段有 id, version, target, paramContent

{
  id: "", // 操作ID,
  version: -1, // 操作版本
  target: { // 执行目标
    isGroupExec: false, // 是否分组执行,只有false
    host: { // 主机类,数据结构参考组件@uyun/ec-device-picker
      hosts: [],
      tags: [],
      ips: [],
      select: "hosts",
      execHost: "",
      objType: 0
    },
    proxy: [] // 监管代理类
  },
  paramContent: [], // 参数内容,数据结构仓库组件@uyun/ec-argument-config
  notify: [], // 通知策略
  verficationUserId: "", // 核验人id
  verificationCodeValue: "", // 校验码
  execAccount: { type: 2, value: { name: "", id: "" } }, // 执行账户
  timeout: 300, // 超时时间
  sensitive: { users: [], groups: [] }, // 敏感命令审核人
  execAuth: { type: "", user: { users: [], groups: [] } }, // 执行审核人
  isIgnoreErr: false, // 是否在执行过程中忽略错误
  isSendAlert: false // 是否发生警告
}

操作测试结果数据结构

{
  errMsg: "", // 错误信息
  handleTime: 0, // 处理时间
  outputParam: "{}", // 输出参数
  stdMsg:"" // 标准信息
}

Current Tags

  • 1.0.0-dev.0                                ...           dev (3 years ago)
  • 0.1.12                                ...           latest (3 years ago)

13 Versions

  • 0.1.12                                ...           3 years ago
  • 1.0.0-dev.0                                ...           3 years ago
  • 0.1.11                                ...           3 years ago
  • 0.1.10                                ...           3 years ago
  • 0.1.8                                ...           4 years ago
  • 0.1.7                                ...           4 years ago
  • 0.1.7-alpha.1                                ...           4 years ago
  • 0.1.7-alpha.0                                ...           4 years ago
  • 0.1.6                                ...           4 years ago
  • 0.1.5                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org