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
767bca8d
Unverified
Commit
767bca8d
authored
Nov 17, 2023
by
gaoyan
Committed by
GitHub
Nov 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the issue that jobs could still be edited after they went online (#2540)
* Optimize the process * fix editor bug * fix bug * fix bug
parent
9dcf9ec6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
TaskServiceImpl.java
...src/main/java/org/dinky/service/impl/TaskServiceImpl.java
+2
-2
index.tsx
dinky-web/src/components/CustomEditor/CodeEdit/index.tsx
+4
-6
No files found.
dinky-admin/src/main/java/org/dinky/service/impl/TaskServiceImpl.java
View file @
767bca8d
...
...
@@ -444,8 +444,8 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
@Override
public
boolean
saveOrUpdateTask
(
Task
task
)
{
if
(
JobLifeCycle
.
PUBLISH
.
equalsValue
(
task
.
getStep
()))
{
Task
byId
=
getById
(
task
.
getId
());
if
(
byId
!=
null
&&
JobLifeCycle
.
PUBLISH
.
equalsValue
(
byId
.
getStep
()))
{
throw
new
BusException
(
Status
.
TASK_IS_ONLINE
.
getMessage
());
}
...
...
dinky-web/src/components/CustomEditor/CodeEdit/index.tsx
View file @
767bca8d
...
...
@@ -73,9 +73,7 @@ const CodeEdit = (props: CodeEditFormProps & connect) => {
height
=
'100%'
,
// if null or undefined, set default value
width
=
'100%'
,
// if null or undefined, set default value
language
,
// edit language
options
=
{
...
MonacoEditorOptions
// set default options
},
options
,
onChange
,
// edit change callback
code
,
// content
readOnly
=
false
,
// is readOnly
...
...
@@ -215,7 +213,7 @@ const CodeEdit = (props: CodeEditFormProps & connect) => {
};
const
finalEditorOptions
=
{
...
options
,
...
MonacoEditorOptions
,
// set default options
tabCompletion
:
'on'
,
// tab 补全
cursorSmoothCaretAnimation
:
true
,
// 光标动画
screenReaderAnnounceInlineSuggestion
:
true
,
// 屏幕阅读器提示
...
...
@@ -293,9 +291,9 @@ const CodeEdit = (props: CodeEditFormProps & connect) => {
},
wordWrap
:
autoWrap
,
autoDetectHighContrast
:
true
,
lineNumbers
lineNumbers
,
...
options
,
};
return
(
<>
<
div
className=
{
'monaco-float'
}
>
...
...
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