Unverified Commit 767bca8d authored by gaoyan's avatar gaoyan Committed by GitHub

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
......@@ -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());
}
......
......@@ -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'}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment