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
252a5b86
Commit
252a5b86
authored
Sep 06, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-20220801' into 'release'
cn-Feat 20220801 See merge request
!92
parents
07afa5bb
94e4e0ba
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
26 deletions
+68
-26
index.tsx
src/views/ConsoleLayout/index.tsx
+11
-0
index.tsx
src/views/Project/ProjectJobDetail/index.tsx
+33
-15
index.tsx
src/views/Project/ProjectSubmitWork/index.tsx
+20
-5
index.tsx
src/views/Project/ProjectWorkbench/workbenchList/index.tsx
+4
-6
No files found.
src/views/ConsoleLayout/index.tsx
View file @
252a5b86
...
...
@@ -31,6 +31,7 @@ const ConsoleLayout = observer(() => {
const
{
currentProjectStore
,
fileListStore
}
=
useStores
();
const
{
openFileList
,
setOpenFileList
}
=
fileListStore
;
const
productInfo
=
toJS
(
currentProjectStore
.
currentProductInfo
);
console
.
log
(
productInfo
);
const
{
run
:
runGetProjectList
}
=
useMyRequest
(
getProjectList
,
{
onSuccess
:
(
res
)
=>
{
let
list
=
res
.
data
;
...
...
@@ -67,6 +68,16 @@ const ConsoleLayout = observer(() => {
const
location
=
useLocation
();
const
{
permissionStore
,
menuStore
}
=
useStores
();
// 不在产品页面下的时候清空
useEffect
(()
=>
{
console
.
log
(
location
.
pathname
.
slice
(
0
,
8
));
if
(
location
.
pathname
.
slice
(
0
,
8
)
!==
"/product"
)
{
currentProjectStore
.
setProjectList
([]);
currentProjectStore
.
changeProject
({});
currentProjectStore
.
changeProductInfo
({});
}
},
[
location
,
currentProjectStore
]);
useEffect
(()
=>
{
permissionStore
.
setSidebarRouters
(
location
.
pathname
);
},
[
location
,
permissionStore
]);
...
...
src/views/Project/ProjectJobDetail/index.tsx
View file @
252a5b86
...
...
@@ -49,7 +49,6 @@ import {
}
from
"./utils"
;
import
MyTooltip
from
"@/components/mui/MyTooltip"
;
import
styles
from
"./index.module.css"
;
const
stateMap
=
{
...
...
@@ -243,7 +242,7 @@ const ProjectSubmitWork = observer(() => {
state
:
{
type
:
"workbenchList"
},
});
}
},
[
navigate
]);
},
[
navigate
,
locationInfo
.
from
]);
const
getOutouts
=
(
outputs
:
any
)
=>
{
if
(
outputs
)
{
...
...
@@ -310,7 +309,8 @@ const ProjectSubmitWork = observer(() => {
if
(
Array
.
isArray
(
res
.
data
))
{
res
.
data
.
forEach
((
item1
)
=>
{
if
(
item1
.
name
===
item
.
path
.
slice
(
item
.
path
.
lastIndexOf
(
"/"
)
+
1
))
{
randerOutputs
[
index
].
size
=
`
${
item1
.
size
?
storageUnitFromB
(
Number
(
item1
.
size
))
:
"-"
randerOutputs
[
index
].
size
=
`
${
item1
.
size
?
storageUnitFromB
(
Number
(
item1
.
size
))
:
"-"
}
`
;
setRanderOutputs
([...
randerOutputs
]);
}
...
...
@@ -348,7 +348,7 @@ const ProjectSubmitWork = observer(() => {
if
(
item
.
id
===
id
)
{
getworkFlowTaskInfoRun
({
jobId
:
workFlowJobInfo
?.
id
as
string
,
taskId
:
item
.
parentNode
||
item
.
id
taskId
:
item
.
parentNode
||
item
.
id
,
});
}
});
...
...
@@ -360,7 +360,7 @@ const ProjectSubmitWork = observer(() => {
list
?.
length
&&
list
?.
forEach
((
item
:
any
)
=>
{
if
(
item
.
id
===
activeFlowIndex
)
{
setOverviewInfo
(
item
)
setOverviewInfo
(
item
)
;
result
=
item
.
parameters
;
}
});
...
...
@@ -370,9 +370,9 @@ const ProjectSubmitWork = observer(() => {
);
const
randerParameters
=
useMemo
(()
=>
{
if
(
patchInfo
?.
id
===
activeFlowIndex
)
{
setOverviewInfo
(
patchInfo
)
return
patchInfo
?.
parameters
if
(
patchInfo
?.
id
===
activeFlowIndex
)
{
setOverviewInfo
(
patchInfo
)
;
return
patchInfo
?.
parameters
;
}
else
{
return
selectedParameter
(
patchInfo
?.
children
);
}
...
...
@@ -408,12 +408,20 @@ const ProjectSubmitWork = observer(() => {
const
[
popperTitle
,
setPopperTitle
]
=
useState
(
"正在运行的任务终止后将无法重新运行,确认继续吗?"
);
const
[
placement
,
setPlacement
]
=
useState
<
"bottom"
|
"bottom-start"
>
(
"bottom"
);
const
[
anchorEl
,
setAnchorEl
]
=
useState
<
any
>
(
null
);
const
handleCancel
=
()
=>
{
setAnchorEl
(
null
);
};
const
handleShowPopper
=
(
e
:
any
,
title
:
string
)
=>
{
const
handleShowPopper
=
(
e
:
any
,
title
:
string
,
placementParams
:
"bottom"
|
"bottom-start"
)
=>
{
setPlacement
(
placementParams
);
setPopperTitle
(
title
);
setAnchorEl
(
e
.
currentTarget
);
};
...
...
@@ -461,7 +469,8 @@ const ProjectSubmitWork = observer(() => {
e
,
[
"SUBMITTED"
,
"RUNNING"
].
includes
(
state
||
""
)
?
"正在运行的任务终止后将无法重新运行,确认继续吗?"
:
"任务被删除后将无法恢复,确认继续吗?"
:
"任务被删除后将无法恢复,确认继续吗?"
,
"bottom-start"
)
}
></
MyButton
>
...
...
@@ -485,7 +494,6 @@ const ProjectSubmitWork = observer(() => {
className=
{
styles
.
outputLiLeft
}
onClick=
{
(
e
:
any
)
=>
{
handleDownLoadOutput
(
item
);
// goToProjectData(getFolderPath(item.path));
}
}
>
<
img
...
...
@@ -499,7 +507,6 @@ const ProjectSubmitWork = observer(() => {
{
item
.
name
}
</
span
>
</
div
>
{
/* </MyPopconfirm> */
}
<
span
className=
{
styles
.
outputLiRight
}
>
{
item
.
size
}
</
span
>
...
...
@@ -538,7 +545,8 @@ const ProjectSubmitWork = observer(() => {
onClick=
{
(
e
:
any
)
=>
{
handleShowPopper
(
e
,
"即将跳转至项目数据内该任务的输出路径,确认继续吗?"
"即将跳转至项目数据内该任务的输出路径,确认继续吗?"
,
"bottom"
);
setGoToProjectDataPath
(
workFlowJobInfo
?.
outputPath
as
string
...
...
@@ -644,7 +652,9 @@ const ProjectSubmitWork = observer(() => {
)
}
{
activeFlowIndex
&&
(
<
div
className=
{
styles
.
suanziInfo
}
>
<
MyTooltip
><
div
className=
{
styles
.
title
}
>
{
overviewInfo
?.
title
}
</
div
></
MyTooltip
>
<
MyTooltip
>
<
div
className=
{
styles
.
title
}
>
{
overviewInfo
?.
title
}
</
div
>
</
MyTooltip
>
<
div
className=
{
styles
.
tabs
}
>
<
div
className=
{
classNames
({
...
...
@@ -756,6 +766,7 @@ const ProjectSubmitWork = observer(() => {
anchorEl=
{
anchorEl
}
onCancel=
{
handleCancel
}
onConfirm=
{
handleConfirm
}
placement=
{
placement
}
/>
{
showSeeDataset
&&
(
<
SeeDataset
...
...
@@ -766,7 +777,14 @@ const ProjectSubmitWork = observer(() => {
projectId=
{
projectId
as
string
}
></
SeeDataset
>
)
}
{
showLogView
&&
<
LogView
isshow=
{
showLogView
}
handleClose=
{
handleClose
}
logs=
{
logs
}
setShowAddTemplate=
{
handleClose
}
/>
}
{
showLogView
&&
(
<
LogView
isshow=
{
showLogView
}
handleClose=
{
handleClose
}
logs=
{
logs
}
setShowAddTemplate=
{
handleClose
}
/>
)
}
</
div
>
);
});
...
...
src/views/Project/ProjectSubmitWork/index.tsx
View file @
252a5b86
...
...
@@ -8,8 +8,6 @@
*/
import
{
toJS
}
from
"mobx"
;
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
ArrowBackIosNewIcon
from
"@mui/icons-material/ArrowBackIosNew"
;
import
IconButton
from
"@mui/material/IconButton"
;
import
_
from
"lodash"
;
import
{
useLocation
,
useNavigate
}
from
"react-router-dom"
;
import
moment
from
"moment"
;
...
...
@@ -232,12 +230,20 @@ const ProjectSubmitWork = observer(() => {
const
[
popperTitle
,
setPopperTitle
]
=
useState
(
"提交前请先确认参数填写无误,确认提交吗?"
);
const
[
placement
,
setPlacement
]
=
useState
<
"bottom"
|
"bottom-start"
|
"bottom-end"
>
(
"bottom"
);
const
[
anchorEl
,
setAnchorEl
]
=
useState
<
any
>
(
null
);
const
handleCancel
=
()
=>
{
setAnchorEl
(
null
);
};
const
handleShowPopper
=
(
e
:
any
,
title
:
string
)
=>
{
const
handleShowPopper
=
(
e
:
any
,
title
:
string
,
placementParams
:
"bottom"
|
"bottom-start"
|
"bottom-end"
)
=>
{
setPlacement
(
placementParams
);
setPopperTitle
(
title
);
setAnchorEl
(
anchorEl
?
null
:
e
.
currentTarget
);
};
...
...
@@ -260,7 +266,11 @@ const ProjectSubmitWork = observer(() => {
src=
{
goback
}
alt=
""
onClick=
{
(
e
:
any
)
=>
handleShowPopper
(
e
,
"返回将放弃当前页面所有操作,确认返回吗?"
)
handleShowPopper
(
e
,
"返回将放弃当前页面所有操作,确认返回吗?"
,
"bottom-end"
)
}
/>
<
div
className=
{
styles
.
swTemplateTitle
}
>
...
...
@@ -288,7 +298,11 @@ const ProjectSubmitWork = observer(() => {
<
MyButton
text=
"提交任务"
onClick=
{
(
e
:
any
)
=>
handleShowPopper
(
e
,
"提交前请先确认参数填写无误,确认提交吗?"
)
handleShowPopper
(
e
,
"提交前请先确认参数填写无误,确认提交吗?"
,
"bottom-start"
)
}
></
MyButton
>
</
div
>
...
...
@@ -328,6 +342,7 @@ const ProjectSubmitWork = observer(() => {
onCancel=
{
handleCancel
}
onConfirm=
{
handleConfirm
}
loading=
{
loading
}
placement=
{
placement
}
/>
</
div
>
);
...
...
src/views/Project/ProjectWorkbench/workbenchList/index.tsx
View file @
252a5b86
...
...
@@ -401,7 +401,9 @@ const ProjectMembers = observer(() => {
onClick=
{
()
=>
rowClick
(
item
.
id
)
}
>
<
Box
className=
{
styles
.
tabBoxInfo
}
>
<
MyTooltip
title=
{
item
.
name
}
><
div
className=
{
styles
.
tabBoxTitle
}
>
{
item
.
name
}
</
div
></
MyTooltip
>
<
MyTooltip
title=
{
item
.
name
}
>
<
div
className=
{
styles
.
tabBoxTitle
}
>
{
item
.
name
}
</
div
>
</
MyTooltip
>
<
Box
className=
{
styles
.
tabBoxDescInfo
}
>
<
div
className=
{
styles
.
tabBoxDesc
}
...
...
@@ -499,11 +501,7 @@ const ProjectMembers = observer(() => {
</
MyCircularProgress
>
</
Box
>
<
div
className=
{
styles
.
pagination
}
>
<
MyPagination
page=
{
page
}
pageChange=
{
handleChangePage
}
count=
{
count
||
jobList
.
length
}
/>
<
MyPagination
page=
{
page
}
pageChange=
{
handleChangePage
}
count=
{
count
}
/>
</
div
>
{
/* <TablePagination
...
...
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