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
f9cb48dc
Commit
f9cb48dc
authored
Nov 01, 2022
by
wuyongsheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 版本提示修改
parent
862adc15
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
10 deletions
+31
-10
index.tsx
...sources/WorkflowOperator/components/AddOperator/index.tsx
+8
-5
utils.ts
...esources/WorkflowOperator/components/AddOperator/utils.ts
+1
-1
index.tsx
...ources/WorkflowOperator/components/OperatorCard/index.tsx
+13
-2
index.tsx
...s/ResourceCenter/UserResources/WorkflowOperator/index.tsx
+7
-1
interface.ts
...esourceCenter/UserResources/WorkflowOperator/interface.ts
+2
-1
No files found.
src/views/ResourceCenter/UserResources/WorkflowOperator/components/AddOperator/index.tsx
View file @
f9cb48dc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-10-18 16:12:55
* @Date: 2022-10-18 16:12:55
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-11-01 1
1:34:0
4
* @LastEditTime: 2022-11-01 1
6:03:4
4
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/components/AddOperator/index.tsx
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/components/AddOperator/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
*/
*/
...
@@ -52,14 +52,16 @@ import style from "./index.module.css";
...
@@ -52,14 +52,16 @@ import style from "./index.module.css";
interface
IAddOperator
{
interface
IAddOperator
{
pageType
:
string
;
pageType
:
string
;
setPageType
:
(
val
:
string
)
=>
void
;
setPageType
:
(
val
:
string
)
=>
void
;
detailsId
:
string
;
detailsId
?:
string
;
detailsMaxVersion
?:
string
;
getList
:
()
=>
void
;
getList
:
()
=>
void
;
}
}
type
IBuildType
=
"ENVIRONMENT"
|
"OPERATOR"
;
type
IBuildType
=
"ENVIRONMENT"
|
"OPERATOR"
;
const
AddOperator
=
observer
((
props
:
IAddOperator
)
=>
{
const
AddOperator
=
observer
((
props
:
IAddOperator
)
=>
{
const
{
pageType
,
setPageType
,
detailsId
,
getList
}
=
props
;
const
{
pageType
,
setPageType
,
detailsId
,
detailsMaxVersion
,
getList
}
=
props
;
const
Message
=
useMessage
();
const
Message
=
useMessage
();
/** 创建类型 BATCH - 批算子; FLOW - 流算子*/
/** 创建类型 BATCH - 批算子; FLOW - 流算子*/
...
@@ -155,7 +157,7 @@ const AddOperator = observer((props: IAddOperator) => {
...
@@ -155,7 +157,7 @@ const AddOperator = observer((props: IAddOperator) => {
command
:
newCommand
,
command
:
newCommand
,
}
=
determineInfo
;
}
=
determineInfo
;
const
newVersion
=
editDefaultVersion
(
version
);
const
newVersion
=
editDefaultVersion
(
detailsMaxVersion
||
version
);
/** 设置表单数据 */
/** 设置表单数据 */
setFormData
({
setFormData
({
title
,
title
,
...
@@ -276,7 +278,7 @@ const AddOperator = observer((props: IAddOperator) => {
...
@@ -276,7 +278,7 @@ const AddOperator = observer((props: IAddOperator) => {
const resultErrors = checkFormData(
const resultErrors = checkFormData(
formData,
formData,
batchBuildType,
batchBuildType,
detailInfo?.
v
ersion || "0.99.99"
detailInfo?.
maxV
ersion || "0.99.99"
);
);
const paramsResultError = paramsConfigBlur();
const paramsResultError = paramsConfigBlur();
setFormErrors(resultErrors);
setFormErrors(resultErrors);
...
@@ -432,6 +434,7 @@ const AddOperator = observer((props: IAddOperator) => {
...
@@ -432,6 +434,7 @@ const AddOperator = observer((props: IAddOperator) => {
require
require
>
>
<MyInput
<MyInput
helperText={formErrors?.version ? "" : detailsMaxVersion}
value={formData?.version}
value={formData?.version}
onChange={(e) => {
onChange={(e) => {
changeFormData({ version: e.target.value });
changeFormData({ version: e.target.value });
...
...
src/views/ResourceCenter/UserResources/WorkflowOperator/components/AddOperator/utils.ts
View file @
f9cb48dc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-10-20 17:36:14
* @Date: 2022-10-20 17:36:14
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-11-01 1
1:05:3
9
* @LastEditTime: 2022-11-01 1
5:11:2
9
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/components/AddOperator/utils.ts
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/components/AddOperator/utils.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
*/
*/
...
...
src/views/ResourceCenter/UserResources/WorkflowOperator/components/OperatorCard/index.tsx
View file @
f9cb48dc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-10-17 14:35:11
* @Date: 2022-10-17 14:35:11
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-1
0-25 21:32:4
9
* @LastEditTime: 2022-1
1-01 14:45:0
9
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/index.tsx
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/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
*/
*/
...
@@ -20,14 +20,24 @@ interface IProps {
...
@@ -20,14 +20,24 @@ interface IProps {
operatorInfo
:
IOperatorInfo
;
operatorInfo
:
IOperatorInfo
;
setPageType
:
(
val
:
string
)
=>
void
;
setPageType
:
(
val
:
string
)
=>
void
;
setDetailsId
:
(
val
:
string
)
=>
void
;
setDetailsId
:
(
val
:
string
)
=>
void
;
setDetailsMaxVersion
:
(
val
:
string
)
=>
void
;
}
}
const
OperatorCard
=
observer
((
props
:
IProps
)
=>
{
const
OperatorCard
=
observer
((
props
:
IProps
)
=>
{
const
navigate
=
useNavigate
();
const
navigate
=
useNavigate
();
const
{
const
{
operatorInfo
:
{
title
=
""
,
type
,
version
,
productId
,
createdTime
,
id
},
operatorInfo
:
{
title
=
""
,
type
,
version
,
productId
,
createdTime
,
id
,
maxVersion
=
""
,
},
setPageType
,
setPageType
,
setDetailsId
,
setDetailsId
,
setDetailsMaxVersion
,
}
=
props
;
}
=
props
;
/** 产品store */
/** 产品store */
const
{
productListStore
}
=
useStores
();
const
{
productListStore
}
=
useStores
();
...
@@ -43,6 +53,7 @@ const OperatorCard = observer((props: IProps) => {
...
@@ -43,6 +53,7 @@ const OperatorCard = observer((props: IProps) => {
if
(
val
===
"upgrade"
)
{
if
(
val
===
"upgrade"
)
{
setPageType
(
"edit"
);
setPageType
(
"edit"
);
setDetailsId
(
id
||
""
);
setDetailsId
(
id
||
""
);
setDetailsMaxVersion
(
maxVersion
);
}
}
};
};
...
...
src/views/ResourceCenter/UserResources/WorkflowOperator/index.tsx
View file @
f9cb48dc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-10-17 14:35:11
* @Date: 2022-10-17 14:35:11
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-1
0-27 10:10:08
* @LastEditTime: 2022-1
1-01 14:49:40
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/index.tsx
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/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
*/
*/
...
@@ -38,7 +38,10 @@ const WorkflowOperator = observer(() => {
...
@@ -38,7 +38,10 @@ const WorkflowOperator = observer(() => {
type
:
"all"
,
type
:
"all"
,
});
});
/** 详情ID */
const
[
detailsId
,
setDetailsId
]
=
useState
<
string
>
(
""
);
const
[
detailsId
,
setDetailsId
]
=
useState
<
string
>
(
""
);
/** 详情最大版本 */
const
[
detailsMaxVersion
,
setDetailsMaxVersion
]
=
useState
<
string
>
(
""
);
const
[
list
,
setList
]
=
useState
<
IOperatorInfo
[]
>
();
const
[
list
,
setList
]
=
useState
<
IOperatorInfo
[]
>
();
...
@@ -124,6 +127,7 @@ const WorkflowOperator = observer(() => {
...
@@ -124,6 +127,7 @@ const WorkflowOperator = observer(() => {
onClick=
{
()
=>
{
onClick=
{
()
=>
{
setPageType
(
"add"
);
setPageType
(
"add"
);
setDetailsId
(
""
);
setDetailsId
(
""
);
setDetailsMaxVersion
(
""
);
}
}
}
}
></
MyButton
>
></
MyButton
>
</
div
>
</
div
>
...
@@ -135,6 +139,7 @@ const WorkflowOperator = observer(() => {
...
@@ -135,6 +139,7 @@ const WorkflowOperator = observer(() => {
renderItem=
{
(
item
:
any
)
=>
(
renderItem=
{
(
item
:
any
)
=>
(
<
OperatorCard
<
OperatorCard
setDetailsId=
{
setDetailsId
}
setDetailsId=
{
setDetailsId
}
setDetailsMaxVersion=
{
setDetailsMaxVersion
}
operatorInfo=
{
item
}
operatorInfo=
{
item
}
setPageType=
{
setPageType
}
setPageType=
{
setPageType
}
/>
/>
...
@@ -153,6 +158,7 @@ const WorkflowOperator = observer(() => {
...
@@ -153,6 +158,7 @@ const WorkflowOperator = observer(() => {
<
AddOperator
<
AddOperator
getList=
{
newGetList
}
getList=
{
newGetList
}
detailsId=
{
detailsId
}
detailsId=
{
detailsId
}
detailsMaxVersion=
{
detailsMaxVersion
}
setPageType=
{
setPageType
}
setPageType=
{
setPageType
}
pageType=
{
pageType
}
pageType=
{
pageType
}
/>
/>
...
...
src/views/ResourceCenter/UserResources/WorkflowOperator/interface.ts
View file @
f9cb48dc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-10-19 20:50:18
* @Date: 2022-10-19 20:50:18
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-1
0-27 17:14:29
* @LastEditTime: 2022-1
1-01 14:45:41
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/interface.ts
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/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
*/
*/
...
@@ -17,6 +17,7 @@ export interface IOperatorInfo{
...
@@ -17,6 +17,7 @@ export interface IOperatorInfo{
version
:
string
;
version
:
string
;
productId
:
string
;
productId
:
string
;
createdTime
:
string
;
createdTime
:
string
;
maxVersion
:
string
}
}
export
enum
operatorType
{
export
enum
operatorType
{
...
...
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