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
6fe23cb6
Commit
6fe23cb6
authored
Oct 14, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-20221010-partition' into feat-20221012-environment
parents
ae2068b5
28b78e92
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
28 deletions
+61
-28
index.tsx
src/components/BusinessComponents/QueueSelect/index.tsx
+7
-0
index.tsx
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
+28
-17
index.tsx
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
+6
-0
index.tsx
src/views/WorkFlowEdit/index.tsx
+20
-11
No files found.
src/components/BusinessComponents/QueueSelect/index.tsx
View file @
6fe23cb6
...
@@ -28,6 +28,8 @@ type IQueueSelectProps = {
...
@@ -28,6 +28,8 @@ type IQueueSelectProps = {
error
?:
boolean
;
error
?:
boolean
;
helperText
?:
string
;
helperText
?:
string
;
disabled
?:
boolean
;
disabled
?:
boolean
;
cpuLoading
?:
boolean
;
gpuLoading
?:
boolean
;
};
};
type
IMemoryLi
=
{
type
IMemoryLi
=
{
...
@@ -65,7 +67,10 @@ const QueueSelect = (props: IQueueSelectProps) => {
...
@@ -65,7 +67,10 @@ const QueueSelect = (props: IQueueSelectProps) => {
error
,
error
,
helperText
,
helperText
,
disabled
,
disabled
,
cpuLoading
=
false
,
gpuLoading
=
false
,
}
=
props
;
}
=
props
;
// 队列列表由外面传入的设计是考虑到一个表单可能有多次队列选择, 请求队列接口在表单页面完成可以减少请求
const
Message
=
useMessage
();
const
Message
=
useMessage
();
const
[
activePartition
,
setActivePartition
]
=
useState
(
""
);
const
[
activePartition
,
setActivePartition
]
=
useState
(
""
);
const
[
open
,
setOpen
]
=
useState
(
false
);
const
[
open
,
setOpen
]
=
useState
(
false
);
...
@@ -341,6 +346,7 @@ const QueueSelect = (props: IQueueSelectProps) => {
...
@@ -341,6 +346,7 @@ const QueueSelect = (props: IQueueSelectProps) => {
handleRow=
{
(
e
:
any
)
=>
handleRow
(
e
)
}
handleRow=
{
(
e
:
any
)
=>
handleRow
(
e
)
}
activeId=
{
activePartition
}
activeId=
{
activePartition
}
tableKey=
"partition"
tableKey=
"partition"
loading=
{
cpuLoading
}
></
MyTable
>
></
MyTable
>
)
}
)
}
{
queueType
===
"GPU"
&&
(
{
queueType
===
"GPU"
&&
(
...
@@ -357,6 +363,7 @@ const QueueSelect = (props: IQueueSelectProps) => {
...
@@ -357,6 +363,7 @@ const QueueSelect = (props: IQueueSelectProps) => {
handleRow=
{
(
e
:
any
)
=>
handleRow
(
e
)
}
handleRow=
{
(
e
:
any
)
=>
handleRow
(
e
)
}
activeId=
{
activePartition
}
activeId=
{
activePartition
}
tableKey=
"partition"
tableKey=
"partition"
loading=
{
gpuLoading
}
></
MyTable
>
></
MyTable
>
)
}
)
}
</
div
>
</
div
>
...
...
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
View file @
6fe23cb6
...
@@ -43,27 +43,36 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -43,27 +43,36 @@ const ConfigForm = (props: ConfigFormProps) => {
const
[
cpuList
,
setCpuList
]
=
useState
<
Array
<
IQueueLi
>>
([]);
const
[
cpuList
,
setCpuList
]
=
useState
<
Array
<
IQueueLi
>>
([]);
const
[
gpuList
,
setGpuList
]
=
useState
<
Array
<
IQueueLi
>>
([]);
const
[
gpuList
,
setGpuList
]
=
useState
<
Array
<
IQueueLi
>>
([]);
const
{
run
:
getHardwreListFn
}
=
useMyRequest
(
getHardwreList
,
{
const
{
run
:
getCpuList
,
loading
:
cpuLoading
}
=
useMyRequest
(
onSuccess
:
(
res
,
params
)
=>
{
getHardwreList
,
if
(
params
[
0
].
computeType
===
"CPU"
)
{
{
onSuccess
:
(
res
)
=>
{
setCpuList
(
res
.
data
);
setCpuList
(
res
.
data
);
}
else
{
},
}
);
const
{
run
:
getGpuList
,
loading
:
gpuLoading
}
=
useMyRequest
(
getHardwreList
,
{
onSuccess
:
(
res
)
=>
{
setGpuList
(
res
.
data
);
setGpuList
(
res
.
data
);
}
}
,
}
,
}
}
);
);
useEffect
(()
=>
{
useEffect
(()
=>
{
getHardwreListFn
({
zoneId
&&
zoneId
,
getCpuList
({
computeType
:
"CPU"
,
zoneId
,
});
computeType
:
"CPU"
,
},
[
getHardwreListFn
,
zoneId
]);
});
},
[
getCpuList
,
zoneId
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
getHardwreListFn
({
zoneId
&&
zoneId
,
getGpuList
({
computeType
:
"GPU"
,
zoneId
,
});
computeType
:
"GPU"
,
},
[
getHardwreListFn
,
zoneId
]);
});
},
[
getGpuList
,
zoneId
]);
const
[
nameHelp
,
setNameHelp
]
=
useState
({
const
[
nameHelp
,
setNameHelp
]
=
useState
({
error
:
false
,
error
:
false
,
...
@@ -332,6 +341,8 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -332,6 +341,8 @@ const ConfigForm = (props: ConfigFormProps) => {
originalGpuList=
{
gpuList
}
originalGpuList=
{
gpuList
}
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helperText=
{
parameter
.
helperText
}
helperText=
{
parameter
.
helperText
}
cpuLoading=
{
cpuLoading
}
gpuLoading=
{
gpuLoading
}
></
QueueSelect
>
></
QueueSelect
>
)
}
)
}
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"input"
&&
(
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"input"
&&
(
...
...
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
View file @
6fe23cb6
...
@@ -32,6 +32,8 @@ type IParameterSettingProps = {
...
@@ -32,6 +32,8 @@ type IParameterSettingProps = {
setTemplateConfigInfo
:
any
;
setTemplateConfigInfo
:
any
;
cpuList
:
Array
<
IQueueLi
>
;
cpuList
:
Array
<
IQueueLi
>
;
gpuList
:
Array
<
IQueueLi
>
;
gpuList
:
Array
<
IQueueLi
>
;
cpuLoading
?:
boolean
;
gpuLoading
?:
boolean
;
};
};
const
ParameterSetting
=
(
props
:
IParameterSettingProps
)
=>
{
const
ParameterSetting
=
(
props
:
IParameterSettingProps
)
=>
{
const
{
const
{
...
@@ -40,6 +42,8 @@ const ParameterSetting = (props: IParameterSettingProps) => {
...
@@ -40,6 +42,8 @@ const ParameterSetting = (props: IParameterSettingProps) => {
taskId
,
taskId
,
cpuList
,
cpuList
,
gpuList
,
gpuList
,
cpuLoading
=
false
,
gpuLoading
=
false
,
}
=
props
;
// 算子大数组
}
=
props
;
// 算子大数组
const
[
isShowAllDese
,
setIsShowAllDese
]
=
useState
(
false
);
// 是否展示全部描述
const
[
isShowAllDese
,
setIsShowAllDese
]
=
useState
(
false
);
// 是否展示全部描述
const
[
fileSelectOpen
,
setFileSelectOpen
]
=
useState
(
false
);
// 选择输出路径的弹窗显示控制
const
[
fileSelectOpen
,
setFileSelectOpen
]
=
useState
(
false
);
// 选择输出路径的弹窗显示控制
...
@@ -294,6 +298,8 @@ const ParameterSetting = (props: IParameterSettingProps) => {
...
@@ -294,6 +298,8 @@ const ParameterSetting = (props: IParameterSettingProps) => {
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helperText=
{
parameter
.
helperText
}
helperText=
{
parameter
.
helperText
}
disabled=
{
parameter
.
parameterGroup
===
"out"
}
disabled=
{
parameter
.
parameterGroup
===
"out"
}
cpuLoading=
{
cpuLoading
}
gpuLoading=
{
gpuLoading
}
></
QueueSelect
>
></
QueueSelect
>
)
}
)
}
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"input"
&&
(
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"input"
&&
(
...
...
src/views/WorkFlowEdit/index.tsx
View file @
6fe23cb6
...
@@ -70,29 +70,36 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -70,29 +70,36 @@ const WorkFlowEdit = observer((props: IProps) => {
const
[
cpuList
,
setCpuList
]
=
useState
<
Array
<
IQueueLi
>>
([]);
const
[
cpuList
,
setCpuList
]
=
useState
<
Array
<
IQueueLi
>>
([]);
const
[
gpuList
,
setGpuList
]
=
useState
<
Array
<
IQueueLi
>>
([]);
const
[
gpuList
,
setGpuList
]
=
useState
<
Array
<
IQueueLi
>>
([]);
const
{
run
:
getHardwreListFn
}
=
useMyRequest
(
getHardwreList
,
{
const
{
run
:
getCpuList
,
loading
:
cpuLoading
}
=
useMyRequest
(
onSuccess
:
(
res
,
params
)
=>
{
getHardwreList
,
if
(
params
[
0
].
computeType
===
"CPU"
)
{
{
onSuccess
:
(
res
)
=>
{
setCpuList
(
res
.
data
);
setCpuList
(
res
.
data
);
}
else
{
},
}
);
const
{
run
:
getGpuList
,
loading
:
gpuLoading
}
=
useMyRequest
(
getHardwreList
,
{
onSuccess
:
(
res
)
=>
{
setGpuList
(
res
.
data
);
setGpuList
(
res
.
data
);
}
}
,
}
,
}
}
);
);
useEffect
(()
=>
{
useEffect
(()
=>
{
zoneId
&&
zoneId
&&
get
HardwreListFn
({
get
CpuList
({
zoneId
,
zoneId
,
computeType
:
"CPU"
,
computeType
:
"CPU"
,
});
});
},
[
get
HardwreListFn
,
zoneId
]);
},
[
get
CpuList
,
zoneId
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
zoneId
&&
zoneId
&&
get
HardwreListFn
({
get
GpuList
({
zoneId
,
zoneId
,
computeType
:
"GPU"
,
computeType
:
"GPU"
,
});
});
},
[
get
HardwreListFn
,
zoneId
]);
},
[
get
GpuList
,
zoneId
]);
// 是否要监听删除时间
// 是否要监听删除时间
const
listenState
=
useMemo
(()
=>
{
const
listenState
=
useMemo
(()
=>
{
...
@@ -276,6 +283,8 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -276,6 +283,8 @@ const WorkFlowEdit = observer((props: IProps) => {
taskId=
{
selectTaskId
||
""
}
taskId=
{
selectTaskId
||
""
}
cpuList=
{
cpuList
}
cpuList=
{
cpuList
}
gpuList=
{
gpuList
}
gpuList=
{
gpuList
}
cpuLoading=
{
cpuLoading
}
gpuLoading=
{
gpuLoading
}
/>
/>
)
}
)
}
<
div
<
div
...
...
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