Commit d84b6267 authored by chenshouchao's avatar chenshouchao

docs

parent c2dda2a3
......@@ -8,66 +8,66 @@
*/
type IType = "BATCH" | "FLOW";
export interface IParameter {
hidden: boolean;
hidden: boolean; // 使用模板时是否展示 true 不展示 用户不需要填写
id?: string;
name: string;
required: boolean;
defaultValue: any;
domType: IDomType;
classType: string;
classTypeName: string;
value: any;
description: string;
language: string;
languageVersion: string;
name: string; // 参数名称
required: boolean; // 是否必填
defaultValue: any; // 默认值
domType: IDomType; // 前端组件类型
classType: string; // 后端数据类型
classTypeName: string; // 前端展示的数据类型 classType对应的描述
value: any; // 值
description: string; // 该参数的描述、解释
language: string; //
languageVersion: string; //
tags: Array<string>;
source: string;
productId: string;
// tasks: ITask[];
linked?: boolean;
validators: Array<IValidator>;
choices: Array<IChoice>;
error?: boolean;
helperText?: string;
parameterGroup?: string;
validators: Array<IValidator>; // 校验方式的数组, 有正则和对应的提示语
choices: Array<IChoice>; // 提供给用户选择的选项组
error?: boolean; // 表单校验是否通过
helperText?: string; // 表单校验提示文案
parameterGroup?: string; //
}
export type IExecutionStatus = "Pending" | "Running" | "Done" | "Failed";
export interface ITask {
id: string;
title: string;
description: string;
version?: string;
allVersions?: string[]
position: {
title: string; // 批流算子名称
description: string; // 描述
version?: string; // 版本
allVersions?: string[]; // 全部版本
position: { // 流程图位置信息
x: number;
y: number;
};
tags?: string[];
type: IType | string;
parentNode?: string;
parameters: Array<IParameter>;
type: IType | string; // 算子类型(批算子、流算子)
parentNode?: string; //
parameters: Array<IParameter>; // 参数组
edges: Array<IEdge>;
isCheck?: boolean;
executionStatus?: IExecutionStatus;
isCheck?: boolean; // 表单校验是否通过
executionStatus?: IExecutionStatus; // 算子的状态
}
export interface ITemplateConfig {
title: string;
version: string;
updateTime?: string;
description: string;
export interface ITemplateConfig { // 模板信息
title: string; // 标题
version: string; // 版本
updateTime?: string; // 更新时间
description: string; // 模板描述
language: string;
languageVersion: string;
tags: Array<string>;
source: string;
productId: string;
tasks: ITask[];
productId: string; // 产品id
tasks: ITask[]; // 算子组
id: string;
}
export type IDomType =
export type IDomType = // 前端组件类型
| "path"
| "dataset"
| "file"
......@@ -78,12 +78,12 @@ export type IDomType =
| "checkbox";
// 待定
export type IValidator = {
export type IValidator = { // 表单校验中的一项
regex: string;
message: string;
};
export interface IChoice {
export interface IChoice { // 表单选项中的一项
label: string;
value: string;
}
......@@ -98,7 +98,7 @@ export interface IEdge {
}
// 提交任务时的动态表单的数据结构
export type IRenderTasks = Array<IRenderTask>;
export type IRenderTasks = Array<IRenderTask>; // 将批算子、流算子、批算子下的流算子混合在一起的一维数组转换成批算子、流算子的二维数组
export type IRenderTask = {
id: string;
title: string;
......@@ -114,18 +114,19 @@ export type IRenderTask = {
isCheck: boolean; // 里面的子项表单校验是否全部通过
};
// 工作流详情
export interface ITaskInfo extends ITemplateConfig {
name: string;
outputPath: string;
state: IState;
specTitle: string;
specVersion: string;
jobCost: string;
creator: string;
createTime: string;
costTime: string;
logPath: string;
outputs?: any;
name: string; // 任务(工作流)名称
outputPath: string; // 任务结果 输出文件路径
state: IState; // 任务状态
specTitle: string; // 源模板
specVersion: string; // 源模板版本
jobCost: string; // 花费(元)
creator: string; // 创建人
createTime: string; // 创建时间
costTime: string; // 运行时间
logPath: string; // 日志文件
outputs?: any; // 结果文件
}
type IState = "SUCCEEDED" | "RUNNING" | "ABORTED" | "FAILED";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment