Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
淡淡忧伤的程序员
DolphinScheduler
提交
9ddc9a04
DolphinScheduler
项目概览
淡淡忧伤的程序员
/
DolphinScheduler
与 Fork 源项目一致
Fork自
apache / DolphinScheduler
通知
48
Star
0
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,发现更多精彩内容 >>
提交
9ddc9a04
编写于
7月 01, 2019
作者:
leon-baoliang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of
https://github.com/analysys/EasyScheduler
into dev-up
上级
94bf5bb4
e869a8b7
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
120 addition
and
17 deletion
+120
-17
README.md
README.md
+1
-1
escheduler-api/src/main/java/cn/escheduler/api/controller/ExecutorController.java
...java/cn/escheduler/api/controller/ExecutorController.java
+42
-9
escheduler-common/src/main/java/cn/escheduler/common/utils/IpUtils.java
...mon/src/main/java/cn/escheduler/common/utils/IpUtils.java
+70
-0
escheduler-server/src/main/java/cn/escheduler/server/master/MasterServer.java
...c/main/java/cn/escheduler/server/master/MasterServer.java
+1
-1
escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/master.vue
...i/src/js/conf/home/pages/monitor/pages/servers/master.vue
+2
-2
escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/worker.vue
...i/src/js/conf/home/pages/monitor/pages/servers/worker.vue
+2
-2
escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/util.js
...ages/projects/pages/definition/pages/list/_source/util.js
+1
-1
escheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue
...nf/home/pages/security/pages/users/_source/createUser.vue
+1
-1
未找到文件。
README.md
浏览文件 @
9ddc9a04
...
...
@@ -50,7 +50,7 @@ Easy Scheduler
### 近期研发计划
EasyScheduler的工作计划:
<a
href=
"https://github.com/analysys/EasyScheduler/projects/1"
target=
"_blank"
>
研发计划
</a>
,其中 In Develop卡片下是1.
0.2
版本的功能,TODO卡片是待做事项(包括 feature ideas)
EasyScheduler的工作计划:
<a
href=
"https://github.com/analysys/EasyScheduler/projects/1"
target=
"_blank"
>
研发计划
</a>
,其中 In Develop卡片下是1.
1.0
版本的功能,TODO卡片是待做事项(包括 feature ideas)
### 贡献代码
...
...
escheduler-api/src/main/java/cn/escheduler/api/controller/ExecutorController.java
浏览文件 @
9ddc9a04
...
...
@@ -24,7 +24,7 @@ import cn.escheduler.api.utils.Constants;
import
cn.escheduler.api.utils.Result
;
import
cn.escheduler.common.enums.*
;
import
cn.escheduler.dao.model.User
;
import
io.swagger.annotations.
Api
;
import
io.swagger.annotations.
*
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -38,9 +38,9 @@ import static cn.escheduler.api.enums.Status.*;
/**
* execute
task
controller
* execute
process
controller
*/
@Api
Ignore
@Api
(
tags
=
"PROCESS_INSTANCE_EXECUTOR_TAG"
,
position
=
1
)
@RestController
@RequestMapping
(
"projects/{projectName}/executors"
)
public
class
ExecutorController
extends
BaseController
{
...
...
@@ -53,10 +53,27 @@ public class ExecutorController extends BaseController {
/**
* execute process instance
*/
@ApiOperation
(
value
=
"startProcessInstance"
,
notes
=
"RUN_PROCESS_INSTANCE_NOTES"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"processDefinitionId"
,
value
=
"PROCESS_DEFINITION_ID"
,
required
=
true
,
dataType
=
"Int"
,
example
=
"100"
),
@ApiImplicitParam
(
name
=
"scheduleTime"
,
value
=
"SCHEDULE_TIME"
,
required
=
true
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"failureStrategy"
,
value
=
"FAILURE_STRATEGY"
,
required
=
true
,
dataType
=
"FailureStrategy"
),
@ApiImplicitParam
(
name
=
"startNodeList"
,
value
=
"START_NODE_LIST"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"taskDependType"
,
value
=
"TASK_DEPEND_TYPE"
,
dataType
=
"TaskDependType"
),
@ApiImplicitParam
(
name
=
"execType"
,
value
=
"COMMAND_TYPE"
,
dataType
=
"CommandType"
),
@ApiImplicitParam
(
name
=
"warningType"
,
value
=
"WARNING_TYPE"
,
required
=
true
,
dataType
=
"WarningType"
),
@ApiImplicitParam
(
name
=
"warningGroupId"
,
value
=
"WARNING_GROUP_ID"
,
required
=
true
,
dataType
=
"Int"
,
example
=
"100"
),
@ApiImplicitParam
(
name
=
"receivers"
,
value
=
"RECEIVERS"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"receiversCc"
,
value
=
"RECEIVERS_CC"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"runMode"
,
value
=
"RUN_MODE"
,
dataType
=
"RunMode"
),
@ApiImplicitParam
(
name
=
"processInstancePriority"
,
value
=
"PROCESS_INSTANCE_PRIORITY"
,
required
=
true
,
dataType
=
"Priority"
),
@ApiImplicitParam
(
name
=
"workerGroupId"
,
value
=
"WORKER_GROUP_ID"
,
dataType
=
"Int"
,
example
=
"100"
),
@ApiImplicitParam
(
name
=
"timeout"
,
value
=
"TIMEOUT"
,
dataType
=
"Int"
,
example
=
"100"
),
})
@PostMapping
(
value
=
"start-process-instance"
)
@ResponseStatus
(
HttpStatus
.
OK
)
public
Result
startProcessInstance
(
@RequestAttribute
(
value
=
Constants
.
SESSION_USER
)
User
loginUser
,
@PathVariable
String
projectName
,
public
Result
startProcessInstance
(
@
ApiIgnore
@
RequestAttribute
(
value
=
Constants
.
SESSION_USER
)
User
loginUser
,
@
ApiParam
(
name
=
"projectName"
,
value
=
"PROJECT_NAME"
,
required
=
true
)
@
PathVariable
String
projectName
,
@RequestParam
(
value
=
"processDefinitionId"
)
int
processDefinitionId
,
@RequestParam
(
value
=
"scheduleTime"
,
required
=
false
)
String
scheduleTime
,
@RequestParam
(
value
=
"failureStrategy"
,
required
=
true
)
FailureStrategy
failureStrategy
,
...
...
@@ -102,10 +119,15 @@ public class ExecutorController extends BaseController {
* @param processInstanceId
* @return
*/
@ApiOperation
(
value
=
"execute"
,
notes
=
"EXECUTE_ACTION_TO_PROCESS_INSTANCE_NOTES"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"processInstanceId"
,
value
=
"PROCESS_INSTANCE_ID"
,
required
=
true
,
dataType
=
"Int"
,
example
=
"100"
),
@ApiImplicitParam
(
name
=
"executeType"
,
value
=
"EXECUTE_TYPE"
,
required
=
true
,
dataType
=
"ExecuteType"
)
})
@PostMapping
(
value
=
"/execute"
)
@ResponseStatus
(
HttpStatus
.
OK
)
public
Result
execute
(
@RequestAttribute
(
value
=
Constants
.
SESSION_USER
)
User
loginUser
,
@PathVariable
String
projectName
,
public
Result
execute
(
@
ApiIgnore
@
RequestAttribute
(
value
=
Constants
.
SESSION_USER
)
User
loginUser
,
@ApiParam
(
name
=
"projectName"
,
value
=
"PROJECT_NAME"
,
required
=
true
)
@PathVariable
String
projectName
,
@RequestParam
(
"processInstanceId"
)
Integer
processInstanceId
,
@RequestParam
(
"executeType"
)
ExecuteType
executeType
)
{
...
...
@@ -127,9 +149,13 @@ public class ExecutorController extends BaseController {
* @param processDefinitionId
* @return
*/
@ApiOperation
(
value
=
"startCheckProcessDefinition"
,
notes
=
"START_CHECK_PROCESS_DEFINITION_NOTES"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"processDefinitionId"
,
value
=
"PROCESS_DEFINITION_ID"
,
required
=
true
,
dataType
=
"Int"
,
example
=
"100"
)
})
@PostMapping
(
value
=
"/start-check"
)
@ResponseStatus
(
HttpStatus
.
OK
)
public
Result
startCheckProcessDefinition
(
@RequestAttribute
(
value
=
Constants
.
SESSION_USER
)
User
loginUser
,
public
Result
startCheckProcessDefinition
(
@
ApiIgnore
@
RequestAttribute
(
value
=
Constants
.
SESSION_USER
)
User
loginUser
,
@RequestParam
(
value
=
"processDefinitionId"
)
int
processDefinitionId
)
{
logger
.
info
(
"login user {}, check process definition"
,
loginUser
.
getUserName
(),
processDefinitionId
);
try
{
...
...
@@ -149,9 +175,16 @@ public class ExecutorController extends BaseController {
* @param processDefinitionId
* @return
*/
@ApiIgnore
@ApiOperation
(
value
=
"getReceiverCc"
,
notes
=
"GET_RECEIVER_CC_NOTES"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"processDefinitionId"
,
value
=
"PROCESS_DEFINITION_ID"
,
required
=
true
,
dataType
=
"Int"
,
example
=
"100"
),
@ApiImplicitParam
(
name
=
"processInstanceId"
,
value
=
"PROCESS_INSTANCE_ID"
,
required
=
true
,
dataType
=
"Int"
,
example
=
"100"
)
})
@GetMapping
(
value
=
"/get-receiver-cc"
)
@ResponseStatus
(
HttpStatus
.
OK
)
public
Result
getReceiverCc
(
@RequestAttribute
(
value
=
Constants
.
SESSION_USER
)
User
loginUser
,
public
Result
getReceiverCc
(
@
ApiIgnore
@
RequestAttribute
(
value
=
Constants
.
SESSION_USER
)
User
loginUser
,
@RequestParam
(
value
=
"processDefinitionId"
,
required
=
false
)
Integer
processDefinitionId
,
@RequestParam
(
value
=
"processInstanceId"
,
required
=
false
)
Integer
processInstanceId
)
{
logger
.
info
(
"login user {}, get process definition receiver and cc"
,
loginUser
.
getUserName
());
...
...
escheduler-common/src/main/java/cn/escheduler/common/utils/IpUtils.java
0 → 100644
浏览文件 @
9ddc9a04
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
cn.escheduler.common.utils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
/**
* http utils
*/
public
class
IpUtils
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
IpUtils
.
class
);
public
static
final
String
DOT
=
"."
;
/**
* ip str to long <p>
*
* @param ipStr ip string
*/
public
static
Long
ipToLong
(
String
ipStr
)
{
String
[]
ipSet
=
ipStr
.
split
(
"\\"
+
DOT
);
return
Long
.
parseLong
(
ipSet
[
0
])
<<
24
|
Long
.
parseLong
(
ipSet
[
1
])
<<
16
|
Long
.
parseLong
(
ipSet
[
2
])
<<
8
|
Long
.
parseLong
(
ipSet
[
3
]);
}
/**
* long to ip
* @param ipLong the long number converted from IP
* @return String
*/
public
static
String
longToIp
(
long
ipLong
)
{
long
[]
ipNumbers
=
new
long
[
4
];
long
tmp
=
0xFF
;
ipNumbers
[
0
]
=
ipLong
>>
24
&
tmp
;
ipNumbers
[
1
]
=
ipLong
>>
16
&
tmp
;
ipNumbers
[
2
]
=
ipLong
>>
8
&
tmp
;
ipNumbers
[
3
]
=
ipLong
&
tmp
;
StringBuilder
sb
=
new
StringBuilder
(
16
);
sb
.
append
(
ipNumbers
[
0
]).
append
(
DOT
)
.
append
(
ipNumbers
[
1
]).
append
(
DOT
)
.
append
(
ipNumbers
[
2
]).
append
(
DOT
)
.
append
(
ipNumbers
[
3
]);
return
sb
.
toString
();
}
public
static
void
main
(
String
[]
args
){
long
ipLong
=
ipToLong
(
"11.3.4.5"
);
logger
.
info
(
longToIp
(
ipLong
));
}
}
escheduler-server/src/main/java/cn/escheduler/server/master/MasterServer.java
浏览文件 @
9ddc9a04
...
...
@@ -216,7 +216,7 @@ public class MasterServer implements CommandLineRunner, IStoppable {
if
(
Stopper
.
isRunning
())
{
// send heartbeat to zk
if
(
StringUtils
.
isBlank
(
zkMasterClient
.
getMasterZNode
()))
{
logger
.
error
(
"master send heartbeat to zk failed"
);
logger
.
error
(
"master send heartbeat to zk failed
: can't find zookeeper regist path of master server
"
);
return
;
}
...
...
escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/master.vue
浏览文件 @
9ddc9a04
...
...
@@ -6,7 +6,7 @@
<div
class=
"row-title"
>
<div
class=
"left"
>
<span
class=
"sp"
>
IP:
{{
item
.
host
}}
</span>
<span
class=
"sp"
>
{{
$t
(
'
P
ort
'
)
}}
:
{{
item
.
port
}}
</span>
<span
class=
"sp"
>
{{
$t
(
'
P
rocess Pid
'
)
}}
:
{{
item
.
port
}}
</span>
<span
class=
"sp"
>
{{
$t
(
'
Zk registration directory
'
)
}}
:
{{
item
.
zkDirectory
}}
</span>
</div>
<div
class=
"right"
>
...
...
@@ -93,4 +93,4 @@
</
script
>
<
style
lang=
"scss"
rel=
"stylesheet/scss"
>
@import
"./servers"
;
</
style
>
\ No newline at end of file
</
style
>
escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/worker.vue
浏览文件 @
9ddc9a04
...
...
@@ -6,7 +6,7 @@
<div
class=
"row-title"
>
<div
class=
"left"
>
<span
class=
"sp"
>
IP:
{{
item
.
host
}}
</span>
<span
class=
"sp"
>
{{
$t
(
'
P
ort
'
)
}}
:
{{
item
.
port
}}
</span>
<span
class=
"sp"
>
{{
$t
(
'
P
rocess Pid
'
)
}}
:
{{
item
.
port
}}
</span>
<span
class=
"sp"
>
{{
$t
(
'
Zk registration directory
'
)
}}
:
{{
item
.
zkDirectory
}}
</span>
</div>
<div
class=
"right"
>
...
...
@@ -94,4 +94,4 @@
</
script
>
<
style
lang=
"scss"
rel=
"stylesheet/scss"
>
@import
"./servers"
;
</
style
>
\ No newline at end of file
</
style
>
escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/util.js
浏览文件 @
9ddc9a04
...
...
@@ -37,7 +37,7 @@ let warningTypeList = [
]
const
isEmial
=
(
val
)
=>
{
let
regEmail
=
/^
([
a-zA-Z0-9
]
+
[
_|
\
_
|
\.]?)
*
[
a-zA-Z0-9
]
+@
([
a-zA-Z0-9
]
+
[
_|
\_
|
\.]?)
*
[
a-zA-Z0-9
]
+
\.[
a-zA-Z
]{2,3}
$/
// eslint-disable-line
let
regEmail
=
/^
([
a-zA-Z0-9
]
+
[
_|
\
-
|
\.]?)
*
[
a-zA-Z0-9
]
+@
([
a-zA-Z0-9
]
+
[
_|
\-
|
\.]?)
*
[
a-zA-Z0-9
]
+
\.[
a-zA-Z
]{2,3}
$/
// eslint-disable-line
return
regEmail
.
test
(
val
)
}
...
...
escheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue
浏览文件 @
9ddc9a04
...
...
@@ -129,7 +129,7 @@
}
},
_verification
()
{
let
regEmail
=
/^
([
a-zA-Z0-9
]
+
[
_|
\
_
|
\.]?)
*
[
a-zA-Z0-9
]
+@
([
a-zA-Z0-9
]
+
[
_|
\_
|
\.]?)
*
[
a-zA-Z0-9
]
+
\.[
a-zA-Z
]{2,3}
$/
// eslint-disable-line
let
regEmail
=
/^
([
a-zA-Z0-9
]
+
[
_|
\
-
|
\.]?)
*
[
a-zA-Z0-9
]
+@
([
a-zA-Z0-9
]
+
[
_|
\-
|
\.]?)
*
[
a-zA-Z0-9
]
+
\.[
a-zA-Z
]{2,3}
$/
// eslint-disable-line
// Mobile phone number regular
let
regPhone
=
/^1
(
3|4|5|6|7|8
)\d{9}
$/
;
// eslint-disable-line
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录