Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
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
wangpeng
dinky
Commits
5267fb5b
Unverified
Commit
5267fb5b
authored
Dec 13, 2023
by
Zzm0809
Committed by
GitHub
Dec 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix copyjob bug (#2639)
* Spotless Apply * fix-copyjob-bug * Spotless Apply --------- Co-authored-by:
Zzm0809
<
Zzm0809@users.noreply.github.com
>
parent
d568b925
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
3 deletions
+22
-3
CatalogueServiceImpl.java
...ain/java/org/dinky/service/impl/CatalogueServiceImpl.java
+1
-1
pages.ts
dinky-web/src/locales/en-US/pages.ts
+1
-0
pages.ts
dinky-web/src/locales/zh-CN/pages.ts
+2
-1
index.tsx
...pages/DataStudio/LeftContainer/Project/JobModal/index.tsx
+18
-1
No files found.
dinky-admin/src/main/java/org/dinky/service/impl/CatalogueServiceImpl.java
View file @
5267fb5b
...
@@ -294,7 +294,7 @@ public class CatalogueServiceImpl extends SuperServiceImpl<CatalogueMapper, Cata
...
@@ -294,7 +294,7 @@ public class CatalogueServiceImpl extends SuperServiceImpl<CatalogueMapper, Cata
newTask
.
setType
(
oldTask
.
getType
());
newTask
.
setType
(
oldTask
.
getType
());
// 设置复制后的作业名称为:原名称+自增序列
// 设置复制后的作业名称为:原名称+自增序列
size
=
size
+
1
;
size
=
size
+
1
;
newTask
.
setName
(
oldTask
.
getName
()
+
"
_
"
+
size
);
newTask
.
setName
(
oldTask
.
getName
()
+
"
-
"
+
size
);
newTask
.
setStep
(
JobLifeCycle
.
DEVELOP
.
getValue
());
newTask
.
setStep
(
JobLifeCycle
.
DEVELOP
.
getValue
());
taskService
.
save
(
newTask
);
taskService
.
save
(
newTask
);
...
...
dinky-web/src/locales/en-US/pages.ts
View file @
5267fb5b
...
@@ -57,6 +57,7 @@ export default {
...
@@ -57,6 +57,7 @@ export default {
'catalog.name'
:
'Job Name'
,
'catalog.name'
:
'Job Name'
,
'catalog.name.placeholder'
:
'Please enter the job name'
,
'catalog.name.placeholder'
:
'Please enter the job name'
,
'catalog.name.validate.error'
:
'Job name cannot contain _ characters, K8s naming specification'
,
'catalog.name.tip'
:
'catalog.name.tip'
:
'This name can be used as the JobName of the FlinkSql task (pipeline.name configuration item)'
,
'This name can be used as the JobName of the FlinkSql task (pipeline.name configuration item)'
,
'catalog.note'
:
'Job Description'
,
'catalog.note'
:
'Job Description'
,
...
...
dinky-web/src/locales/zh-CN/pages.ts
View file @
5267fb5b
...
@@ -54,7 +54,8 @@ export default {
...
@@ -54,7 +54,8 @@ export default {
'catalog.name'
:
'作业名称'
,
'catalog.name'
:
'作业名称'
,
'catalog.name.placeholder'
:
'请输入作业名称'
,
'catalog.name.placeholder'
:
'请输入作业名称'
,
'catalog.name.tip'
:
'此名称可作为 FlinkSql 任务的 JobName ([配置项'
,
'catalog.name.validate.error'
:
'作业名称不允许出现 _ 字符,K8s 命名规范'
,
'catalog.name.tip'
:
'此名称可作为 FlinkSql 任务的 JobName'
,
'catalog.note'
:
'作业描述'
,
'catalog.note'
:
'作业描述'
,
'catalog.note.placeholder'
:
'请输入作业描述'
,
'catalog.note.placeholder'
:
'请输入作业描述'
,
'catalog.type'
:
'作业类型'
,
'catalog.type'
:
'作业类型'
,
...
...
dinky-web/src/pages/DataStudio/LeftContainer/Project/JobModal/index.tsx
View file @
5267fb5b
...
@@ -112,6 +112,22 @@ const JobModal: React.FC<JobModalProps> = (props) => {
...
@@ -112,6 +112,22 @@ const JobModal: React.FC<JobModalProps> = (props) => {
onSubmit
({
...
values
,
...
formData
}
as
Catalogue
);
onSubmit
({
...
values
,
...
formData
}
as
Catalogue
);
};
};
/**
* validate name field value, contains '_'
* because k8s job name not contains '_'
* @param rule
* @param value
*/
const
validateName
=
async
(
rule
:
any
,
value
:
string
)
=>
{
if
(
/_/g
.
test
(
value
))
{
return
Promise
.
reject
(
l
(
'catalog.name.validate.error'
));
}
else
if
(
!
value
)
{
return
Promise
.
reject
(
l
(
'catalog.name.placeholder'
));
}
else
{
return
Promise
.
resolve
();
}
};
const
renderForm
=
()
=>
{
const
renderForm
=
()
=>
{
return
(
return
(
<>
<>
...
@@ -133,7 +149,8 @@ const JobModal: React.FC<JobModalProps> = (props) => {
...
@@ -133,7 +149,8 @@ const JobModal: React.FC<JobModalProps> = (props) => {
label=
{
l
(
'catalog.name'
)
}
label=
{
l
(
'catalog.name'
)
}
tooltip=
{
l
(
'catalog.name.tip'
)
}
tooltip=
{
l
(
'catalog.name.tip'
)
}
placeholder=
{
l
(
'catalog.name.placeholder'
)
}
placeholder=
{
l
(
'catalog.name.placeholder'
)
}
rules=
{
[{
required
:
true
,
message
:
l
(
'catalog.name.placeholder'
)
}]
}
validateTrigger=
{
[
'onBlur'
,
'onChange'
,
'onSubmit'
]
}
rules=
{
[{
required
:
true
,
validator
:
validateName
}]
}
/>
/>
<
ProFormTextArea
<
ProFormTextArea
name=
'note'
name=
'note'
...
...
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