Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bkunyun
Commits
84a93e67
Commit
84a93e67
authored
Aug 10, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-20220801' into 'staging'
Feat 20220801 See merge request
!49
parents
880fb7d4
b195aaeb
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
656 additions
and
90 deletions
+656
-90
index.tsx
src/views/CustomOperator/components/OperatorList/index.tsx
+53
-48
index.tsx
src/views/CustomOperator/components/SaveOperator/index.tsx
+549
-0
index.tsx
src/views/CustomOperator/index.tsx
+20
-7
index.module.css
src/views/Project/ProjectSetting/BaseInfo/index.module.css
+1
-1
index.tsx
src/views/Project/ProjectSetting/BaseInfo/index.tsx
+1
-4
index.tsx
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
+9
-8
index.tsx
src/views/Project/ProjectSubmitWork/index.tsx
+7
-7
index.tsx
...ct/components/Flow/components/BatchOperatorFlow/index.tsx
+4
-4
index.tsx
src/views/Project/components/Flow/index.tsx
+1
-0
index.tsx
src/views/WorkFlowEdit/components/OperatorList/index.tsx
+3
-3
index.tsx
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
+8
-8
No files found.
src/views/CustomOperator/components/OperatorList/index.tsx
View file @
84a93e67
...
...
@@ -47,56 +47,61 @@ const OperatorList = (props: IProps) => {
// 获取算子列表
const
{
run
:
getOperatorListRun
,
loading
}
=
useMyRequest
(
getOperatorList
,
{
onSuccess
:
(
res
)
=>
{
let
arr
=
res
?.
data
?.
content
;
let
arr
=
res
?.
data
?.
content
.
map
((
item
:
any
)
=>
{
return
{
...
item
,
edges
:
[],
};
});
setIsLastPage
(
res
?.
data
?.
last
);
// todo 去掉parameters添加
arr
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
item
.
edges
=
[];
item
.
parameters
.
push
({
choices
:
[],
classType
:
"STRING"
,
classTypeName
:
"String"
,
defaultValue
:
null
,
description
:
""
,
domType
:
"dataset"
,
hidden
:
false
,
isnull
:
false
,
level
:
null
,
linked
:
false
,
many
:
false
,
name
:
`in
${
index
+
1
}
`
,
order
:
0
,
parameterGroup
:
"in"
,
promoted
:
false
,
promotedName
:
null
,
required
:
false
,
title
:
null
,
validators
:
[],
});
});
arr
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
item
.
parameters
.
push
({
choices
:
[],
classType
:
"STRING"
,
classTypeName
:
"String"
,
defaultValue
:
null
,
description
:
""
,
domType
:
"dataset"
,
hidden
:
false
,
isnull
:
false
,
level
:
null
,
linked
:
false
,
many
:
false
,
name
:
`out
${
index
+
1
}
`
,
order
:
0
,
parameterGroup
:
"out"
,
promoted
:
false
,
promotedName
:
null
,
required
:
false
,
title
:
null
,
validators
:
[],
});
});
//
arr.forEach((item: any, index: number) => {
//
item.edges = [];
//
item.parameters.push({
//
choices: [],
//
classType: "STRING",
//
classTypeName: "String",
//
defaultValue: null,
//
description: "",
//
domType: "dataset",
//
hidden: false,
//
isnull: false,
//
level: null,
//
linked: false,
//
many: false,
//
name: `in${index + 1}`,
//
order: 0,
//
parameterGroup: "in",
//
promoted: false,
//
promotedName: null,
//
required: false,
//
title: null,
//
validators: [],
//
});
//
});
//
arr.forEach((item: any, index: number) => {
//
item.parameters.push({
//
choices: [],
//
classType: "STRING",
//
classTypeName: "String",
//
defaultValue: null,
//
description: "",
//
domType: "dataset",
//
hidden: false,
//
isnull: false,
//
level: null,
//
linked: false,
//
many: false,
//
name: `out${index + 1}`,
//
order: 0,
//
parameterGroup: "out",
//
promoted: false,
//
promotedName: null,
//
required: false,
//
title: null,
//
validators: [],
//
});
//
});
setList
([...
list
,
...
arr
]);
},
});
...
...
src/views/CustomOperator/components/SaveOperator/index.tsx
View file @
84a93e67
...
...
@@ -156,6 +156,555 @@ const SaveOperator = (props: IProps) => {
description
:
description
,
},
body
:
positionTransform
(),
// body: [
// {
// id: "62c7965c9bf7ba39f2dcefc0",
// title: "RecordFileReader",
// description: "这是一段RecordFileReader算子的描述",
// type: "FLOW",
// productId: "cadd",
// creator: "root",
// parameters: [
// {
// name: "raw",
// classType: "BOOLEAN",
// classTypeName: "Boolean",
// required: false,
// defaultValue: "false",
// description: "",
// hidden: false,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "RADIO",
// validators: [],
// choices: [
// {
// value: "true",
// },
// {
// value: "false",
// },
// ],
// parameterGroup: "basis",
// linked: false,
// },
// {
// name: "sep",
// classType: "STRING",
// classTypeName: "String",
// required: false,
// description: "",
// hidden: false,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [],
// choices: [],
// parameterGroup: "basis",
// linked: false,
// },
// {
// name: "contains_sep",
// classType: "BOOLEAN",
// classTypeName: "Boolean",
// required: false,
// defaultValue: "false",
// description: "",
// hidden: false,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "RADIO",
// validators: [],
// choices: [
// {
// value: "true",
// },
// {
// value: "false",
// },
// ],
// parameterGroup: "basis",
// linked: false,
// },
// {
// name: "encoding",
// classType: "STRING",
// classTypeName: "String",
// required: false,
// defaultValue: "UTF-8",
// description: "",
// hidden: false,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [],
// choices: [],
// parameterGroup: "senior",
// linked: false,
// },
// {
// name: "chunk_size",
// classType: "INT",
// classTypeName: "Int",
// required: false,
// defaultValue: "1000",
// description: "",
// hidden: false,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "senior",
// linked: false,
// },
// {
// name: "compression",
// classType: "STRING",
// classTypeName: "String",
// required: false,
// description: "",
// hidden: false,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [],
// choices: [],
// parameterGroup: "senior",
// linked: false,
// },
// {
// name: "cpus",
// classType: "INT",
// classTypeName: "Int",
// required: false,
// defaultValue: "1",
// description: "",
// hidden: true,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "hardware",
// linked: false,
// },
// {
// name: "ntasks",
// classType: "INT",
// classTypeName: "Int",
// required: false,
// defaultValue: "1",
// description: "",
// hidden: true,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "hardware",
// linked: false,
// },
// {
// name: "partition",
// classType: "STRING",
// classTypeName: "String",
// required: false,
// defaultValue: "c-4-1",
// description: "",
// hidden: true,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// choices: [],
// parameterGroup: "hardware",
// linked: false,
// },
// {
// name: "parallelism",
// classType: "INT",
// classTypeName: "Int",
// required: false,
// defaultValue: "1",
// description: "",
// hidden: true,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "hardware",
// linked: false,
// },
// ],
// edges: [
// {
// id: "d3ffaf04-b3dc-4c1c-a3c0-a897536131ba",
// source: "62c7965c9bf7ba39f2dcefc0",
// target: "62c7965c9bf7ba39f2dcefc1",
// },
// ],
// version: "1.0.0",
// allVersions: ["1.0.0", "2.0.0"],
// scatter: false,
// _class: "com.cloudam.c3.domain.ActorSpec",
// },
// {
// id: "62c7965c9bf7ba39f2dcefc2",
// title: "Docking",
// description: "这是一段Docking算子的描述",
// type: "FLOW",
// productId: "cadd",
// creator: "root",
// parameters: [
// {
// name: "core_num",
// classType: "INT",
// classTypeName: "Int",
// required: false,
// defaultValue: "1",
// description: "",
// hidden: false,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "basis",
// linked: false,
// },
// {
// name: "centerX",
// classType: "INT",
// classTypeName: "Int",
// required: true,
// description: "",
// hidden: false,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "basis",
// linked: false,
// },
// {
// name: "centerY",
// classType: "INT",
// classTypeName: "Int",
// required: true,
// description: "",
// hidden: false,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "basis",
// linked: false,
// },
// {
// name: "centerZ",
// classType: "INT",
// classTypeName: "Int",
// required: true,
// description: "",
// hidden: false,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "basis",
// linked: false,
// },
// {
// name: "boxSizeX",
// classType: "INT",
// classTypeName: "Int",
// required: true,
// description: "",
// hidden: false,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "basis",
// linked: false,
// },
// {
// name: "boxSizeY",
// classType: "INT",
// classTypeName: "Int",
// required: true,
// description: "",
// hidden: false,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "basis",
// linked: false,
// },
// {
// name: "boxSizeZ",
// classType: "INT",
// classTypeName: "Int",
// required: true,
// description: "",
// hidden: false,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "basis",
// linked: false,
// },
// {
// name: "poses_num",
// classType: "INT",
// classTypeName: "Int",
// required: false,
// defaultValue: "9",
// description: "",
// hidden: false,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "senior",
// linked: false,
// },
// {
// name: "verbosity",
// classType: "INT",
// classTypeName: "Int",
// required: false,
// defaultValue: "1",
// description: "",
// hidden: false,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "senior",
// linked: false,
// },
// {
// name: "exhaustiveness",
// classType: "INT",
// classTypeName: "Int",
// required: false,
// defaultValue: "1",
// description: "",
// hidden: false,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "senior",
// linked: false,
// },
// {
// name: "cpus",
// classType: "INT",
// classTypeName: "Int",
// required: false,
// defaultValue: "1",
// description: "",
// hidden: true,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "hardware",
// linked: false,
// },
// {
// name: "ntasks",
// classType: "INT",
// classTypeName: "Int",
// required: false,
// defaultValue: "4",
// description: "",
// hidden: true,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "hardware",
// linked: false,
// },
// {
// name: "partition",
// classType: "STRING",
// classTypeName: "String",
// required: false,
// defaultValue: "c-4-1",
// description: "",
// hidden: true,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [],
// choices: [],
// parameterGroup: "hardware",
// linked: false,
// },
// {
// name: "parallelism",
// classType: "INT",
// classTypeName: "Int",
// required: false,
// defaultValue: "6",
// description: "",
// hidden: true,
// many: false,
// isnull: false,
// promoted: false,
// order: 0,
// domType: "INPUT",
// validators: [
// {
// regex: "^[1-9]\\d*$",
// },
// ],
// choices: [],
// parameterGroup: "hardware",
// linked: false,
// },
// ],
// edges: [
// {
// id: "33f82dd3-47ed-4aae-85bc-0a9e763e0981",
// source: "62c7965c9bf7ba39f2dcefc2",
// target: "62c7965c9bf7ba39f2dcefc3",
// },
// ],
// version: "1.0.0",
// allVersions: ["1.0.0", "2.0.0"],
// scatter: false,
// _class: "com.cloudam.c3.domain.ActorSpec",
// },
// ],
});
// operatorList
// if (id) {
...
...
src/views/CustomOperator/index.tsx
View file @
84a93e67
...
...
@@ -31,10 +31,13 @@ const CustomOperator = observer((props: IProps) => {
// 判断 每个流算子必须至少有一条连接线。
const
checkHasOneLine
=
(
sourceArr
:
string
[],
targetArr
:
string
[])
=>
{
console
.
log
(
"checkHasOneLine"
);
const
all
=
_
.
uniq
([...
sourceArr
,
...
targetArr
]);
if
(
all
.
length
===
operatorList
.
length
)
{
console
.
log
(
"checkHasOneLine1"
);
return
true
;
}
else
{
console
.
log
(
"checkHasOneLine2"
);
return
false
;
}
// _.uniq([2, 1, 2]);
...
...
@@ -42,6 +45,7 @@ const CustomOperator = observer((props: IProps) => {
// 判断 每个起始算子(可以有多个起始点)的输入必须为文件的路径输入或数据集的路径输入。
const
checkIn
=
(
targetArr
:
string
[])
=>
{
console
.
log
(
"checkIn"
);
const
uniqTargetArr
=
_
.
uniq
(
targetArr
);
if
(
uniqTargetArr
.
length
===
operatorList
.
length
)
{
// 流节点连成一个圈了
...
...
@@ -57,7 +61,11 @@ const CustomOperator = observer((props: IProps) => {
if
(
inArr
.
length
>
0
)
{
if
(
!
inArr
.
some
((
inItem
)
=>
{
return
inItem
.
domType
===
"dataset"
||
inItem
.
domType
===
"path"
;
return
(
(
inItem
.
domType
||
""
).
toLowerCase
()
===
"dataset"
||
(
inItem
.
domType
||
""
).
toLowerCase
()
===
"path"
||
(
inItem
.
domType
||
""
).
toLowerCase
()
===
"file"
);
})
)
{
check
=
false
;
...
...
@@ -73,6 +81,7 @@ const CustomOperator = observer((props: IProps) => {
// 判断 起码有一个结尾算子(可以有多个结尾点)的输出必须为文件保存或数据集保存。
const
checkOut
=
(
sourceArr
:
string
[])
=>
{
console
.
log
(
"checkOut"
);
const
uniqSourceArr
=
_
.
uniq
(
sourceArr
);
if
(
uniqSourceArr
.
length
===
operatorList
.
length
)
{
// 流节点连成一个圈了
...
...
@@ -82,13 +91,17 @@ const CustomOperator = observer((props: IProps) => {
operatorList
.
forEach
((
flowNode
)
=>
{
if
(
uniqSourceArr
.
indexOf
(
flowNode
.
id
)
===
-
1
)
{
// 该节点的输入没有连线 也就是说这个节点是起点
const
in
Arr
=
flowNode
.
parameters
.
filter
(
(
parameter
)
=>
parameter
.
parameterGroup
===
"
in
"
const
out
Arr
=
flowNode
.
parameters
.
filter
(
(
parameter
)
=>
parameter
.
parameterGroup
===
"
out
"
);
if
(
in
Arr
.
length
>
0
)
{
if
(
out
Arr
.
length
>
0
)
{
if
(
!
inArr
.
some
((
inItem
)
=>
{
return
inItem
.
domType
===
"dataset"
||
inItem
.
domType
===
"file"
;
!
outArr
.
some
((
outItem
)
=>
{
return
(
(
outItem
.
domType
||
""
).
toLowerCase
()
===
"dataset"
||
(
outItem
.
domType
||
""
).
toLowerCase
()
===
"file"
||
(
outItem
.
domType
||
""
).
toLowerCase
()
===
"path"
);
})
)
{
check
=
false
;
...
...
@@ -168,7 +181,7 @@ const CustomOperator = observer((props: IProps) => {
type=
"edit"
onFlowNodeClick=
{
handleNodeClick
}
flowNodeDraggable=
{
true
}
//
ListenState={!saveFormDialog}
ListenState=
{
!
saveFormDialog
}
showVersion=
{
true
}
showControls=
{
false
}
/>
...
...
src/views/Project/ProjectSetting/BaseInfo/index.module.css
View file @
84a93e67
...
...
@@ -64,7 +64,7 @@
font-size
:
14px
;
line-height
:
22px
;
color
:
#ff4e4e
;
margin-bottom
:
8
px
;
margin-bottom
:
20
px
;
}
.deleteText2
{
color
:
#1e2633
;
...
...
src/views/Project/ProjectSetting/BaseInfo/index.tsx
View file @
84a93e67
...
...
@@ -462,10 +462,7 @@ const BaseInfo = observer(() => {
>
<
div
className=
{
style
.
deleteBox
}
>
<
div
className=
{
style
.
deleteText1
}
>
您要删除本项目。已删除的项目将无法恢复!您真的确定吗?
</
div
>
<
div
className=
{
style
.
deleteText2
}
>
此操作可能会导致数据丢失。为防止意外操作,我们要求您确认您的操作。
删除项目会导致数据丢失,已删除的项目将无法恢复。
</
div
>
<
div
className=
{
style
.
deleteText3
}
>
请输入“
...
...
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
View file @
84a93e67
...
...
@@ -215,7 +215,7 @@ const ConfigForm = (props: ConfigFormProps) => {
</
div
>
<
MyTooltip
title=
{
parameter
.
description
}
placement=
"right"
>
<
div
className=
{
styles
.
parameterContent
}
>
{
parameter
.
domType
.
toLowerCase
()
===
"file"
&&
(
{
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"file"
&&
(
<
MyInput
onFocus=
{
()
=>
setSelectedBatchNodeId
(
batchId
||
""
)
}
onBlur=
{
()
=>
setSelectedBatchNodeId
(
""
)
}
...
...
@@ -239,7 +239,7 @@ const ConfigForm = (props: ConfigFormProps) => {
size=
"medium"
></
MyInput
>
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"path"
&&
(
{
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"path"
&&
(
<
MyInput
onFocus=
{
()
=>
setSelectedBatchNodeId
(
batchId
||
""
)
}
onBlur=
{
()
=>
setSelectedBatchNodeId
(
""
)
}
...
...
@@ -263,7 +263,7 @@ const ConfigForm = (props: ConfigFormProps) => {
size=
"medium"
></
MyInput
>
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"dataset"
&&
(
{
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"dataset"
&&
(
<
MyInput
onFocus=
{
()
=>
setSelectedBatchNodeId
(
taskId
)
}
onBlur=
{
()
=>
setSelectedBatchNodeId
(
""
)
}
...
...
@@ -287,7 +287,7 @@ const ConfigForm = (props: ConfigFormProps) => {
size=
"medium"
></
MyInput
>
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"input"
&&
(
{
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"input"
&&
(
<
MyInput
onFocus=
{
()
=>
{
setSelectedBatchNodeId
(
batchId
||
""
);
...
...
@@ -304,7 +304,7 @@ const ConfigForm = (props: ConfigFormProps) => {
size=
"medium"
></
MyInput
>
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"select"
&&
(
{
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"select"
&&
(
<
MySelect
onFocus=
{
()
=>
setSelectedBatchNodeId
(
batchId
||
""
)
}
onBlur=
{
()
=>
setSelectedBatchNodeId
(
""
)
}
...
...
@@ -326,7 +326,8 @@ const ConfigForm = (props: ConfigFormProps) => {
fullWidth
></
MySelect
>
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"multipleselect"
&&
(
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"multipleselect"
&&
(
<
MySelect
onFocus=
{
()
=>
setSelectedBatchNodeId
(
batchId
||
""
)
}
onBlur=
{
()
=>
setSelectedBatchNodeId
(
""
)
}
...
...
@@ -349,7 +350,7 @@ const ConfigForm = (props: ConfigFormProps) => {
fullWidth
></
MySelect
>
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"radio"
&&
(
{
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"radio"
&&
(
<
MyRadio
value=
{
parameter
.
value
}
onChange=
{
(
e
:
any
)
=>
...
...
@@ -362,7 +363,7 @@ const ConfigForm = (props: ConfigFormProps) => {
helperText=
{
parameter
.
helperText
}
></
MyRadio
>
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"checkbox"
&&
(
{
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"checkbox"
&&
(
<
MyCheckBox
value=
{
parameter
.
value
}
onChange=
{
(
e
:
any
)
=>
...
...
src/views/Project/ProjectSubmitWork/index.tsx
View file @
84a93e67
...
...
@@ -70,16 +70,16 @@ const ProjectSubmitWork = observer(() => {
let
value
:
any
=
undefined
;
if
(
parameter
.
defaultValue
)
{
if
(
parameter
.
domType
.
toLowerCase
()
===
"multipleselect"
||
parameter
.
domType
.
toLowerCase
()
===
"checkbox"
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"multipleselect"
||
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"checkbox"
)
{
value
=
parameter
.
defaultValue
.
split
(
","
);
}
else
{
value
=
parameter
.
defaultValue
;
}
}
else
if
(
parameter
.
domType
.
toLowerCase
()
===
"multipleselect"
||
parameter
.
domType
.
toLowerCase
()
===
"checkbox"
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"multipleselect"
||
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"checkbox"
)
{
value
=
[];
}
else
{
...
...
@@ -179,9 +179,9 @@ const ProjectSubmitWork = observer(() => {
value
=
parameter
.
value
;
}
if
(
parameter
.
domType
.
toLowerCase
()
===
"path"
||
parameter
.
domType
.
toLowerCase
()
===
"dataset"
||
parameter
.
domType
.
toLowerCase
()
===
"file"
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"path"
||
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"dataset"
||
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"file"
)
{
value
=
`/
${
value
}
`
;
}
...
...
src/views/Project/components/Flow/components/BatchOperatorFlow/index.tsx
View file @
84a93e67
...
...
@@ -50,6 +50,7 @@ const BatchOperatorFlow = (props: IProps) => {
showVersion
=
false
,
...
other
}
=
props
;
console
.
log
(
tasks
);
/** 自定义的节点类型 */
const
nodeTypes
=
useMemo
(()
=>
{
return
{
batchNode
:
BatchNode
,
flowNode
:
FlowNode
};
...
...
@@ -62,7 +63,7 @@ const BatchOperatorFlow = (props: IProps) => {
/** 原始数据删除线 */
const
tasksDeleteLine
=
useCallback
(
(
connection
:
Connection
|
Edge
)
=>
{
(
connection
:
Connection
|
Edge
|
any
)
=>
{
const
result
=
(
tasks
?.
length
&&
tasks
.
map
((
item
)
=>
{
...
...
@@ -70,9 +71,7 @@ const BatchOperatorFlow = (props: IProps) => {
if
(
item
.
id
===
connection
.
source
)
{
const
newEdges
=
(
item
.
edges
?.
length
&&
item
.
edges
?.
filter
(
(
every
)
=>
every
.
sourceHandle
!==
connection
.
sourceHandle
))
||
item
.
edges
?.
filter
((
every
)
=>
every
.
id
!==
connection
.
id
))
||
[];
return
{
...
item
,
...
...
@@ -91,6 +90,7 @@ const BatchOperatorFlow = (props: IProps) => {
/** 删除流节点或者线 */
const
deleteSelectFlowNode
=
useCallback
(
(
e
:
any
)
=>
{
console
.
log
(
tasks
);
if
(
e
.
keyCode
===
8
&&
ListenState
)
{
/** 删除流节点逻辑 */
if
(
inSideFlowNodeId
)
{
...
...
src/views/Project/components/Flow/index.tsx
View file @
84a93e67
...
...
@@ -61,6 +61,7 @@ const Flow = (props: IProps) => {
showControls
=
true
,
...
other
}
=
props
;
console
.
log
(
tasks
);
/** 自定义的节点类型 */
const
nodeTypes
=
useMemo
(()
=>
{
return
{
batchNode
:
BatchNode
,
flowNode
:
FlowNode
};
...
...
src/views/WorkFlowEdit/components/OperatorList/index.tsx
View file @
84a93e67
...
...
@@ -29,7 +29,7 @@ let count = 1;
const
OperatorItem
=
(
props
:
IOperatorItemProps
)
=>
{
const
{
info
:
{
title
,
description
,
tags
,
version
},
info
:
{
title
,
description
,
tags
,
version
},
setTemplateConfigInfo
,
templateConfigInfo
,
operatorListData
,
...
...
@@ -75,7 +75,7 @@ const OperatorItem = (props: IOperatorItemProps) => {
x
:
item
.
type
===
"BATCH"
?
x
:
item
.
position
?.
x
,
y
:
item
.
type
===
"BATCH"
?
y
:
item
.
position
?.
y
,
},
edges
:
newEdges
.
length
?
newEdges
:
item
?.
edges
,
edges
:
newEdges
?
.
length
?
newEdges
:
item
?.
edges
,
};
});
return
newVal
;
...
...
@@ -133,7 +133,7 @@ const OperatorItem = (props: IOperatorItemProps) => {
<
h2
className=
{
styles
.
operatorItemTitle
}
>
{
title
}
</
h2
>
<
div
className=
{
styles
.
operatorItemText
}
>
{
description
}
</
div
>
<
div
className=
{
styles
.
footerBox
}
>
{
tags
?.
map
((
item
:
string
)
=>
{
{
tags
?.
map
((
item
:
string
)
=>
{
return
(
<
span
key=
{
item
}
...
...
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
View file @
84a93e67
...
...
@@ -395,7 +395,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
return
(
<
MyTooltip
title=
{
parameter
.
description
}
placement=
"right"
>
<
div
>
{
parameter
.
domType
.
toLowerCase
()
===
"file"
&&
(
{
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"file"
&&
(
<
MyInput
value=
{
parameter
.
defaultValue
||
""
}
InputProps=
{
{
...
...
@@ -420,7 +420,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
disabled=
{
parameter
.
parameterGroup
===
"out"
}
></
MyInput
>
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"path"
&&
(
{
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"path"
&&
(
<
MyInput
value=
{
parameter
.
defaultValue
||
""
}
InputProps=
{
{
...
...
@@ -445,7 +445,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
disabled=
{
parameter
.
parameterGroup
===
"out"
}
></
MyInput
>
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"dataset"
&&
(
{
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"dataset"
&&
(
<
MyInput
value=
{
parameter
.
defaultValue
||
""
}
InputProps=
{
{
...
...
@@ -470,7 +470,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
disabled=
{
parameter
.
parameterGroup
===
"out"
}
></
MyInput
>
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"input"
&&
(
{
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"input"
&&
(
<
MyInput
value=
{
parameter
.
defaultValue
||
""
}
onChange=
{
(
e
:
any
)
=>
...
...
@@ -482,7 +482,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
disabled=
{
parameter
.
parameterGroup
===
"out"
}
></
MyInput
>
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"select"
&&
(
{
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"select"
&&
(
<
MySelect
value=
{
parameter
.
defaultValue
}
onChange=
{
(
e
:
any
)
=>
...
...
@@ -501,7 +501,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
disabled=
{
parameter
.
parameterGroup
===
"out"
}
></
MySelect
>
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"multipleselect"
&&
(
{
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"multipleselect"
&&
(
<
MySelect
value=
{
parameter
.
defaultValue
}
onChange=
{
(
e
:
any
)
=>
...
...
@@ -521,7 +521,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
disabled=
{
parameter
.
parameterGroup
===
"out"
}
></
MySelect
>
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"radio"
&&
(
{
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"radio"
&&
(
<
MyRadio
value=
{
parameter
.
defaultValue
}
onChange=
{
(
e
:
any
)
=>
...
...
@@ -532,7 +532,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
helperText=
{
parameter
.
helperText
}
></
MyRadio
>
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"checkbox"
&&
(
{
(
parameter
.
domType
||
""
)
.
toLowerCase
()
===
"checkbox"
&&
(
<
MyCheckBox
value=
{
parameter
.
defaultValue
}
onChange=
{
(
e
:
any
)
=>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment