Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
pentaLiker
DolphinScheduler
提交
6e5742ff
DolphinScheduler
项目概览
pentaLiker
/
DolphinScheduler
与 Fork 源项目一致
Fork自
apache / DolphinScheduler
通知
1
Star
1
Fork
0
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
6e5742ff
编写于
5月 24, 2019
作者:
B
baoliang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add depend item interval "today"
上级
488c3959
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
35 addition
and
0 deletion
+35
-0
escheduler-common/src/main/java/cn/escheduler/common/utils/DependentUtils.java
.../main/java/cn/escheduler/common/utils/DependentUtils.java
+3
-0
escheduler-common/src/main/java/cn/escheduler/common/utils/dependent/DependentDateUtils.java
...escheduler/common/utils/dependent/DependentDateUtils.java
+15
-0
escheduler-common/src/test/java/cn/escheduler/common/utils/DependentUtilsTest.java
...t/java/cn/escheduler/common/utils/DependentUtilsTest.java
+11
-0
escheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/commcon.js
...home/pages/dag/_source/formModel/tasks/_source/commcon.js
+4
-0
escheduler-ui/src/js/module/i18n/locale/en_US.js
escheduler-ui/src/js/module/i18n/locale/en_US.js
+1
-0
escheduler-ui/src/js/module/i18n/locale/zh_CN.js
escheduler-ui/src/js/module/i18n/locale/zh_CN.js
+1
-0
未找到文件。
escheduler-common/src/main/java/cn/escheduler/common/utils/DependentUtils.java
浏览文件 @
6e5742ff
...
...
@@ -80,6 +80,9 @@ public class DependentUtils {
case
"last3Hours"
:
result
=
DependentDateUtils
.
getLastHoursInterval
(
businessDate
,
3
);
break
;
case
"today"
:
result
=
DependentDateUtils
.
getTodayInterval
(
businessDate
);
break
;
case
"last1Days"
:
result
=
DependentDateUtils
.
getLastDayInterval
(
businessDate
,
1
);
break
;
...
...
escheduler-common/src/main/java/cn/escheduler/common/utils/dependent/DependentDateUtils.java
浏览文件 @
6e5742ff
...
...
@@ -42,6 +42,21 @@ public class DependentDateUtils {
return
dateIntervals
;
}
/**
* get today day interval list
* @param businessDate
* @return
*/
public
static
List
<
DateInterval
>
getTodayInterval
(
Date
businessDate
){
List
<
DateInterval
>
dateIntervals
=
new
ArrayList
<>();
Date
beginTime
=
DateUtils
.
getStartOfDay
(
businessDate
);
Date
endTime
=
DateUtils
.
getEndOfDay
(
businessDate
);
dateIntervals
.
add
(
new
DateInterval
(
beginTime
,
endTime
));
return
dateIntervals
;
}
/**
* get last day interval list
* @param businessDate
...
...
escheduler-common/src/test/java/cn/escheduler/common/utils/DependentUtilsTest.java
浏览文件 @
6e5742ff
...
...
@@ -52,6 +52,10 @@ public class DependentUtilsTest {
public
void
getDateIntervalList
()
{
Date
curDay
=
DateUtils
.
stringToDate
(
"2019-02-05 00:00:00"
);
DateInterval
diCur
=
new
DateInterval
(
DateUtils
.
getStartOfDay
(
curDay
),
DateUtils
.
getEndOfDay
(
curDay
));
Date
day1
=
DateUtils
.
stringToDate
(
"2019-02-04 00:00:00"
);
DateInterval
di1
=
new
DateInterval
(
DateUtils
.
getStartOfDay
(
day1
),
DateUtils
.
getEndOfDay
(
day1
));
...
...
@@ -70,6 +74,13 @@ public class DependentUtilsTest {
Assert
.
assertEquals
(
dateIntervals
.
get
(
1
),
di1
);
Assert
.
assertEquals
(
dateIntervals
.
get
(
0
),
di2
);
dateValue
=
"today"
;
dateIntervals
=
DependentUtils
.
getDateIntervalList
(
curDay
,
dateValue
);
Assert
.
assertEquals
(
dateIntervals
.
get
(
0
),
diCur
);
}
@Test
...
...
escheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/commcon.js
浏览文件 @
6e5742ff
...
...
@@ -42,6 +42,10 @@ const dateValueList = {
}
],
'
day
'
:
[
{
value
:
'
today
'
,
label
:
`
${
i18n
.
$t
(
'
today
'
)}
`
},
{
value
:
'
last1Days
'
,
label
:
`
${
i18n
.
$t
(
'
Last1Days
'
)}
`
...
...
escheduler-ui/src/js/module/i18n/locale/en_US.js
浏览文件 @
6e5742ff
...
...
@@ -390,6 +390,7 @@ export default {
'
Last1Hour
'
:
'
Last1Hour
'
,
'
Last2Hours
'
:
'
Last2Hours
'
,
'
Last3Hours
'
:
'
Last3Hours
'
,
'
today
'
:
'
today
'
,
'
Last1Days
'
:
'
Last1Days
'
,
'
Last2Days
'
:
'
Last2Days
'
,
'
Last3Days
'
:
'
Last3Days
'
,
...
...
escheduler-ui/src/js/module/i18n/locale/zh_CN.js
浏览文件 @
6e5742ff
...
...
@@ -390,6 +390,7 @@ export default {
'
Last1Hour
'
:
'
前1小时
'
,
'
Last2Hours
'
:
'
前2小时
'
,
'
Last3Hours
'
:
'
前3小时
'
,
'
today
'
:
'
今天
'
,
'
Last1Days
'
:
'
昨天
'
,
'
Last2Days
'
:
'
前两天
'
,
'
Last3Days
'
:
'
前三天
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录