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
sunyihao
bkunyun
Commits
804cfece
Commit
804cfece
authored
Jun 28, 2022
by
吴永生#A02208
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 点击幕布重置
parent
19848612
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
8 deletions
+31
-8
index.tsx
src/views/ConsoleLayout/components/FileItem/index.tsx
+3
-4
index.tsx
src/views/Project/ProjectJobDetail/index.tsx
+1
-1
interface.ts
src/views/Project/ProjectSubmitWork/interface.ts
+4
-1
index.tsx
src/views/Project/components/Flow/index.tsx
+23
-2
No files found.
src/views/ConsoleLayout/components/FileItem/index.tsx
View file @
804cfece
...
@@ -140,11 +140,10 @@ const FileItem = observer((props: IProps) => {
...
@@ -140,11 +140,10 @@ const FileItem = observer((props: IProps) => {
<
div
className=
{
styles
.
speedBox
}
>
<
div
className=
{
styles
.
speedBox
}
>
<
span
className=
{
styles
.
span
}
>
{
`${storageUnitFromB(
<
span
className=
{
styles
.
span
}
>
{
`${storageUnitFromB(
itemInfo?.bytesUploaded || 0
itemInfo?.bytesUploaded || 0
)}/${storageUnitFromB(itemInfo?.bytesTotal || 0)}`
}
</
span
>
{
" "
}
)}/${storageUnitFromB(itemInfo?.bytesTotal || 0)}`
}
</
span
>
:
{
statusMsg
!==
'上传失败'
?
<
span
className=
{
styles
.
span
}
>
{
`${storageUnitFromB(
<
span
className=
{
styles
.
span
}
>
{
`${storageUnitFromB(
speed
speed
)}/s`
}
</
span
>
)}/s`
}
</
span
>
:
null
}
</
div
>
</
div
>
)
}
)
}
</
div
>
</
div
>
...
...
src/views/Project/ProjectJobDetail/index.tsx
View file @
804cfece
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-21 20:03:56
* @Date: 2022-06-21 20:03:56
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-28 1
1:22:47
* @LastEditTime: 2022-06-28 1
7:19:15
* @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/index.tsx
* @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
...
src/views/Project/ProjectSubmitWork/interface.ts
View file @
804cfece
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-21 20:03:56
* @Date: 2022-06-21 20:03:56
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-2
2 19:53:09
* @LastEditTime: 2022-06-2
8 16:22:13
* @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/interface.ts
* @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/interface.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -29,6 +29,8 @@ export interface IParameter {
...
@@ -29,6 +29,8 @@ export interface IParameter {
helperText
?:
string
;
helperText
?:
string
;
}
}
export
type
IExecutionStatus
=
'Pending'
|
'Running'
|
'Done'
|
'Failed'
export
interface
ITask
{
export
interface
ITask
{
id
:
string
;
id
:
string
;
title
:
string
;
title
:
string
;
...
@@ -42,6 +44,7 @@ export interface ITask {
...
@@ -42,6 +44,7 @@ export interface ITask {
parameters
:
Array
<
IParameter
>
;
parameters
:
Array
<
IParameter
>
;
edges
:
Array
<
IEdge
>
;
edges
:
Array
<
IEdge
>
;
isCheck
?:
boolean
;
isCheck
?:
boolean
;
executionStatus
?:
IExecutionStatus
}
}
export
interface
ITemplateConfig
{
export
interface
ITemplateConfig
{
...
...
src/views/Project/components/Flow/index.tsx
View file @
804cfece
...
@@ -14,7 +14,7 @@ import classNames from "classnames";
...
@@ -14,7 +14,7 @@ import classNames from "classnames";
import
jobFail
from
"@/assets/project/jobFail.svg"
;
import
jobFail
from
"@/assets/project/jobFail.svg"
;
import
jobRun
from
"@/assets/project/jobRun.svg"
;
import
jobRun
from
"@/assets/project/jobRun.svg"
;
import
jobSue
from
"@/assets/project/jobSue.svg"
;
import
jobSue
from
"@/assets/project/jobSue.svg"
;
import
{
IEdge
,
ITask
}
from
"../../ProjectSubmitWork/interface"
;
import
{
IEdge
,
I
ExecutionStatus
,
I
Task
}
from
"../../ProjectSubmitWork/interface"
;
import
{
IBatchNode
,
ILine
}
from
"./interface"
;
import
{
IBatchNode
,
ILine
}
from
"./interface"
;
import
styles
from
"./index.module.css"
;
import
styles
from
"./index.module.css"
;
...
@@ -32,6 +32,20 @@ interface IProps extends ReactFlowProps {
...
@@ -32,6 +32,20 @@ interface IProps extends ReactFlowProps {
onBatchClick
?:
(
val
:
string
)
=>
void
;
onBatchClick
?:
(
val
:
string
)
=>
void
;
}
}
/** 获取imgUrl */
const
getImgUrl
=
(
type
:
IExecutionStatus
)
=>
{
if
(
type
===
'Done'
){
return
jobSue
}
if
(
type
===
'Failed'
){
return
jobFail
}
if
(
type
===
'Running'
){
return
jobRun
}
return
undefined
}
/** 自定义batch节点 */
/** 自定义batch节点 */
const
BatchNode
=
(
props
:
IBatchNode
)
=>
{
const
BatchNode
=
(
props
:
IBatchNode
)
=>
{
const
{
data
}
=
props
;
const
{
data
}
=
props
;
...
@@ -89,7 +103,7 @@ const FlowNode = (props: any) => {
...
@@ -89,7 +103,7 @@ const FlowNode = (props: any) => {
<
div
style=
{
{
display
:
"flex"
,
alignItems
:
"center"
}
}
>
<
div
style=
{
{
display
:
"flex"
,
alignItems
:
"center"
}
}
>
{
data
?.
label
||
""
}
{
data
?.
label
||
""
}
{
data
.
isCheck
&&
<
span
className=
{
styles
.
successDot
}
></
span
>
}
{
data
.
isCheck
&&
<
span
className=
{
styles
.
successDot
}
></
span
>
}
<
img
style=
{
{
marginLeft
:
"6px"
}
}
src=
{
jobRun
}
alt=
""
/>
{
getImgUrl
(
data
.
executionStatus
)
&&
<
img
style=
{
{
marginLeft
:
"6px"
}
}
src=
{
getImgUrl
(
data
.
executionStatus
)
}
alt=
""
/>
}
</
div
>
</
div
>
{
data
?.
dotStatus
?.
isOutput
?
(
{
data
?.
dotStatus
?.
isOutput
?
(
<
Handle
<
Handle
...
@@ -200,6 +214,7 @@ const Flow = (props: IProps) => {
...
@@ -200,6 +214,7 @@ const Flow = (props: IProps) => {
selectedStatus
:
selectedNodeId
===
item
.
id
,
selectedStatus
:
selectedNodeId
===
item
.
id
,
}
}
:
{
isCheck
:
item
.
isCheck
}),
:
{
isCheck
:
item
.
isCheck
}),
executionStatus
:
item
.
executionStatus
,
/** 输入输出圆点状态 */
/** 输入输出圆点状态 */
dotStatus
:
nodesInputAndOutputStatus
(
item
.
id
),
dotStatus
:
nodesInputAndOutputStatus
(
item
.
id
),
/** 样式 */
/** 样式 */
...
@@ -267,6 +282,11 @@ const Flow = (props: IProps) => {
...
@@ -267,6 +282,11 @@ const Flow = (props: IProps) => {
});
});
};
};
const
handlePaneClick
=
()
=>
{
setSelectedNodeId
(
''
);
onBatchClick
&&
onBatchClick
(
''
);
}
/** node节点 */
/** node节点 */
const
[
nodes
,
setNodes
]
=
useNodesState
(
initialNodes
);
const
[
nodes
,
setNodes
]
=
useNodesState
(
initialNodes
);
/** 连线数组 */
/** 连线数组 */
...
@@ -287,6 +307,7 @@ const Flow = (props: IProps) => {
...
@@ -287,6 +307,7 @@ const Flow = (props: IProps) => {
fitView
fitView
proOptions=
{
{
hideAttribution
:
true
,
account
:
""
}
}
proOptions=
{
{
hideAttribution
:
true
,
account
:
""
}
}
nodeTypes=
{
nodeTypes
}
nodeTypes=
{
nodeTypes
}
onPaneClick=
{
handlePaneClick
}
onNodeClick=
{
onNodeClick
}
onNodeClick=
{
onNodeClick
}
{
...
props
}
{
...
props
}
>
>
...
...
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