|
- /*
- * @Author: 赵伟
- * @Date: 2024-04-08 09:54:39
- * @Description: 定义全局类型,比如无关联的页面都需要要的类型
- */
-
- import { ExperimentStatus } from '@/pages/Experiment/status';
-
- // 流水线全局参数
- export type PipelineGlobalParam = {
- param_name: string;
- description: string;
- param_type: number;
- param_value: number | string | boolean;
- is_sensitive: number;
- };
-
- // 实验实例
- export type ExperimentInstance = {
- id: number;
- experiment_id: number;
- workflow_id: number;
- create_time: string;
- finish_time: string;
- update_time: string;
- status: string;
- argo_ins_name: string;
- argo_ins_ns: string;
- nodes_result: string;
- nodes_status: string;
- global_param: PipelineGlobalParam[];
- };
-
- // 流水线节点
- export type PipelineNodeModel = {
- id: string;
- experimentStatus: ExperimentStatus;
- label: string;
- experimentStartTime: string;
- experimentEndTime?: string | null;
- control_strategy: string;
- in_parameters: string;
- out_parameters: string;
- component_label: string;
- icon_path: string;
- };
-
- // 流水线节点模型数据
- export type PipelineNodeModelParameter = {
- type: string;
- item_type: string;
- label: string;
- value: any;
- require?: number;
- placeholder?: string;
- describe?: string;
- fromSelect?: boolean;
- showValue?: any;
- editable?: number;
- activeTab?: string; // ResourceSelectorModal tab
- expandedKeys?: string[]; // ResourceSelectorModal expandedKeys
- checkedKeys?: string[]; // ResourceSelectorModal checkedKeys
- };
-
- // type ChangePropertyType<T, K extends keyof T, NewType> = Omit<T, K> & { [P in K]: NewType }
-
- // 序列化后的流水线节点
- export type PipelineNodeModelSerialize = Omit<
- PipelineNodeModel,
- 'control_strategy' | 'in_parameters' | 'out_parameters'
- > & {
- control_strategy: Record<string, PipelineNodeModelParameter>;
- in_parameters: Record<string, PipelineNodeModelParameter>;
- out_parameters: Record<string, PipelineNodeModelParameter>;
- };
-
- // 资源规格
- export type ComputingResource = {
- id: number;
- computing_resource: string;
- description: string;
- standard: string;
- create_by: string;
- };
|