Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
DolphinScheduler
提交
3186545d
DolphinScheduler
项目概览
apache
/
DolphinScheduler
上一次同步 接近 2 年
通知
707
Star
9572
Fork
3514
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
DolphinScheduler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
3186545d
编写于
3月 04, 2020
作者:
Z
zhukai
提交者:
GitHub
3月 04, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1. add input cache for datax task (#2034)
2. add cache for codemirror component, include python, shell and sql task.
上级
3277b906
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
145 addition
and
11 deletion
+145
-11
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/datax.vue
.../js/conf/home/pages/dag/_source/formModel/tasks/datax.vue
+48
-1
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue
...js/conf/home/pages/dag/_source/formModel/tasks/python.vue
+29
-5
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/shell.vue
.../js/conf/home/pages/dag/_source/formModel/tasks/shell.vue
+26
-3
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sql.vue
...rc/js/conf/home/pages/dag/_source/formModel/tasks/sql.vue
+42
-2
未找到文件。
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/datax.vue
浏览文件 @
3186545d
...
...
@@ -232,6 +232,8 @@
* Processing code highlighting
*/
_handlerEditor
()
{
this
.
_destroyEditor
()
// editor
editor
=
codemirror
(
'
code-sql-mirror
'
,
{
mode
:
'
sql
'
,
...
...
@@ -249,9 +251,34 @@
// Monitor keyboard
editor
.
on
(
'
keypress
'
,
this
.
keypress
)
editor
.
on
(
'
changes
'
,
()
=>
{
this
.
_cacheParams
()
})
editor
.
setValue
(
this
.
sql
)
return
editor
},
_cacheParams
()
{
this
.
$emit
(
'
on-cache-params
'
,
{
dsType
:
this
.
dsType
,
dataSource
:
this
.
rtDatasource
,
dtType
:
this
.
dtType
,
dataTarget
:
this
.
rtDatatarget
,
sql
:
editor
?
editor
.
getValue
():
''
,
targetTable
:
this
.
targetTable
,
jobSpeedByte
:
this
.
jobSpeedByte
*
1024
,
jobSpeedRecord
:
this
.
jobSpeedRecord
,
preStatements
:
this
.
preStatements
,
postStatements
:
this
.
postStatements
});
},
_destroyEditor
()
{
if
(
editor
)
{
editor
.
toTextArea
()
// Uninstall
editor
.
off
(
$
(
'
.code-sql-mirror
'
),
'
keypress
'
,
this
.
keypress
)
editor
.
off
(
$
(
'
.code-sql-mirror
'
),
'
changes
'
,
this
.
changes
)
}
}
},
created
()
{
...
...
@@ -286,7 +313,27 @@
editor
.
off
(
$
(
'
.code-sql-mirror
'
),
'
keypress
'
,
this
.
keypress
)
}
},
computed
:
{},
watch
:
{
//Watch the cacheParams
cacheParams
(
val
)
{
this
.
_cacheParams
();
}
},
computed
:
{
cacheParams
()
{
return
{
dsType
:
this
.
dsType
,
dataSource
:
this
.
rtDatasource
,
dtType
:
this
.
dtType
,
dataTarget
:
this
.
rtDatatarget
,
targetTable
:
this
.
targetTable
,
jobSpeedByte
:
this
.
jobSpeedByte
*
1024
,
jobSpeedRecord
:
this
.
jobSpeedRecord
,
preStatements
:
this
.
preStatements
,
postStatements
:
this
.
postStatements
}
}
},
components
:
{
mListBox
,
mDatasource
,
mLocalParams
,
mStatementList
,
mSelectInput
}
}
</
script
>
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue
浏览文件 @
3186545d
...
...
@@ -129,6 +129,8 @@
* Processing code highlighting
*/
_handlerEditor
()
{
this
.
_destroyEditor
()
// editor
editor
=
codemirror
(
'
code-python-mirror
'
,
{
mode
:
'
python
'
,
...
...
@@ -143,26 +145,45 @@
}
}
this
.
changes
=
()
=>
{
this
.
_cacheParams
()
}
// Monitor keyboard
editor
.
on
(
'
keypress
'
,
this
.
keypress
)
editor
.
on
(
'
changes
'
,
this
.
changes
)
editor
.
setValue
(
this
.
rawScript
)
return
editor
},
_cacheParams
()
{
this
.
$emit
(
'
on-cache-params
'
,
{
resourceList
:
this
.
cacheResourceList
,
localParams
:
this
.
localParams
,
rawScript
:
editor
?
editor
.
getValue
()
:
''
});
},
_destroyEditor
()
{
if
(
editor
)
{
editor
.
toTextArea
()
// Uninstall
editor
.
off
(
$
(
'
.code-python-mirror
'
),
'
keypress
'
,
this
.
keypress
)
editor
.
off
(
$
(
'
.code-python-mirror
'
),
'
changes
'
,
this
.
changes
)
}
}
},
watch
:
{
//Watch the cacheParams
cacheParams
(
val
)
{
this
.
$emit
(
'
on-cache-params
'
,
val
);
this
.
_cacheParams
()
}
},
computed
:
{
cacheParams
()
{
return
{
resourceList
:
this
.
cacheResourceList
,
localParams
:
this
.
localParams
,
rawScript
:
editor
?
editor
.
getValue
()
:
''
localParams
:
this
.
localParams
}
}
},
...
...
@@ -193,8 +214,11 @@
},
200
)
},
destroyed
()
{
editor
.
toTextArea
()
// Uninstall
editor
.
off
(
$
(
'
.code-python-mirror
'
),
'
keypress
'
,
this
.
keypress
)
if
(
editor
)
{
editor
.
toTextArea
()
// Uninstall
editor
.
off
(
$
(
'
.code-python-mirror
'
),
'
keypress
'
,
this
.
keypress
)
editor
.
off
(
$
(
'
.code-python-mirror
'
),
'
changes
'
,
this
.
changes
)
}
},
components
:
{
mLocalParams
,
mListBox
,
mResources
}
}
...
...
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/shell.vue
浏览文件 @
3186545d
...
...
@@ -163,6 +163,8 @@
* Processing code highlighting
*/
_handlerEditor
()
{
this
.
_destroyEditor
()
// editor
editor
=
codemirror
(
'
code-shell-mirror
'
,
{
mode
:
'
shell
'
,
...
...
@@ -177,25 +179,45 @@
}
}
this
.
changes
=
()
=>
{
this
.
_cacheParams
()
}
// Monitor keyboard
editor
.
on
(
'
keypress
'
,
this
.
keypress
)
editor
.
on
(
'
changes
'
,
this
.
changes
)
editor
.
setValue
(
this
.
rawScript
)
return
editor
},
_cacheParams
()
{
this
.
$emit
(
'
on-cache-params
'
,
{
resourceList
:
this
.
cacheResourceList
,
localParams
:
this
.
localParams
,
rawScript
:
editor
?
editor
.
getValue
()
:
''
});
},
_destroyEditor
()
{
if
(
editor
)
{
editor
.
toTextArea
()
// Uninstall
editor
.
off
(
$
(
'
.code-sql-mirror
'
),
'
keypress
'
,
this
.
keypress
)
editor
.
off
(
$
(
'
.code-sql-mirror
'
),
'
changes
'
,
this
.
changes
)
}
}
},
watch
:
{
//Watch the cacheParams
cacheParams
(
val
)
{
this
.
$emit
(
'
on-cache-params
'
,
val
);
this
.
_cacheParams
()
}
},
computed
:
{
cacheParams
()
{
return
{
resourceList
:
this
.
cacheResourceList
,
localParams
:
this
.
localParams
,
rawScript
:
editor
?
editor
.
getValue
()
:
''
localParams
:
this
.
localParams
}
}
},
...
...
@@ -229,6 +251,7 @@
if
(
editor
)
{
editor
.
toTextArea
()
// Uninstall
editor
.
off
(
$
(
'
.code-shell-mirror
'
),
'
keypress
'
,
this
.
keypress
)
editor
.
off
(
$
(
'
.code-shell-mirror
'
),
'
changes
'
,
this
.
changes
)
}
},
components
:
{
mLocalParams
,
mListBox
,
mResources
,
mScriptBox
}
...
...
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sql.vue
浏览文件 @
3186545d
...
...
@@ -318,6 +318,8 @@
* Processing code highlighting
*/
_handlerEditor
()
{
this
.
_destroyEditor
()
// editor
editor
=
codemirror
(
'
code-sql-mirror
'
,
{
mode
:
'
sql
'
,
...
...
@@ -332,9 +334,15 @@
}
}
this
.
changes
=
()
=>
{
this
.
_cacheParams
()
}
// Monitor keyboard
editor
.
on
(
'
keypress
'
,
this
.
keypress
)
editor
.
on
(
'
changes
'
,
this
.
changes
)
editor
.
setValue
(
this
.
sql
)
return
editor
...
...
@@ -351,6 +359,38 @@
this
.
receivers
=
res
.
receivers
&&
res
.
receivers
.
split
(
'
,
'
)
||
[]
this
.
receiversCc
=
res
.
receiversCc
&&
res
.
receiversCc
.
split
(
'
,
'
)
||
[]
})
},
_cacheParams
()
{
this
.
$emit
(
'
on-cache-params
'
,
{
type
:
this
.
type
,
datasource
:
this
.
rtDatasource
,
sql
:
editor
?
editor
.
getValue
()
:
''
,
udfs
:
this
.
udfs
,
sqlType
:
this
.
sqlType
,
title
:
this
.
title
,
receivers
:
this
.
receivers
.
join
(
'
,
'
),
receiversCc
:
this
.
receiversCc
.
join
(
'
,
'
),
showType
:
(()
=>
{
let
showType
=
this
.
showType
if
(
showType
.
length
===
2
&&
showType
[
0
]
===
'
ATTACHMENT
'
)
{
return
[
showType
[
1
],
showType
[
0
]].
join
(
'
,
'
)
}
else
{
return
showType
.
join
(
'
,
'
)
}
})(),
localParams
:
this
.
localParams
,
connParams
:
this
.
connParams
,
preStatements
:
this
.
preStatements
,
postStatements
:
this
.
postStatements
});
},
_destroyEditor
()
{
if
(
editor
)
{
editor
.
toTextArea
()
// Uninstall
editor
.
off
(
$
(
'
.code-sql-mirror
'
),
'
keypress
'
,
this
.
keypress
)
editor
.
off
(
$
(
'
.code-sql-mirror
'
),
'
changes
'
,
this
.
changes
)
}
}
},
watch
:
{
...
...
@@ -373,7 +413,7 @@
},
//Watch the cacheParams
cacheParams
(
val
)
{
this
.
$emit
(
'
on-cache-params
'
,
val
);
this
.
_cacheParams
()
}
},
created
()
{
...
...
@@ -418,6 +458,7 @@
if
(
editor
)
{
editor
.
toTextArea
()
// Uninstall
editor
.
off
(
$
(
'
.code-sql-mirror
'
),
'
keypress
'
,
this
.
keypress
)
editor
.
off
(
$
(
'
.code-sql-mirror
'
),
'
changes
'
,
this
.
changes
)
}
},
computed
:
{
...
...
@@ -425,7 +466,6 @@
return
{
type
:
this
.
type
,
datasource
:
this
.
rtDatasource
,
sql
:
editor
?
editor
.
getValue
()
:
''
,
udfs
:
this
.
udfs
,
sqlType
:
this
.
sqlType
,
title
:
this
.
title
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录