Browse Source

Merge branch 'dev' into fix_alert_error

pull/3/MERGE
Kirs 4 years ago committed by GitHub
parent
commit
78b865c8c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/runner/AlertSender.java
  2. 8
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java
  3. 28
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
  4. 9
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js

4
dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/runner/AlertSender.java

@ -107,8 +107,8 @@ public class AlertSender {
List<AlertPluginInstance> alertInstanceList = alertDao.listInstanceByAlertGroupId(alertGroupId); List<AlertPluginInstance> alertInstanceList = alertDao.listInstanceByAlertGroupId(alertGroupId);
AlertData alertData = new AlertData(); AlertData alertData = new AlertData();
alertData.setContent(title) alertData.setContent(content)
.setTitle(content); .setTitle(title);
boolean sendResponseStatus = true; boolean sendResponseStatus = true;
List<AlertSendResponseResult> sendResponseResults = new ArrayList<>(); List<AlertSendResponseResult> sendResponseResults = new ArrayList<>();

8
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java

@ -103,11 +103,14 @@ public class WorkerServer {
public void run() { public void run() {
logger.info("start worker server..."); logger.info("start worker server...");
//alert-server client registry
alertClientService = new AlertClientService(workerConfig.getAlertListenHost(),Constants.ALERT_RPC_PORT);
//init remoting server //init remoting server
NettyServerConfig serverConfig = new NettyServerConfig(); NettyServerConfig serverConfig = new NettyServerConfig();
serverConfig.setListenPort(workerConfig.getListenPort()); serverConfig.setListenPort(workerConfig.getListenPort());
this.nettyRemotingServer = new NettyRemotingServer(serverConfig); this.nettyRemotingServer = new NettyRemotingServer(serverConfig);
this.nettyRemotingServer.registerProcessor(CommandType.TASK_EXECUTE_REQUEST, new TaskExecuteProcessor()); this.nettyRemotingServer.registerProcessor(CommandType.TASK_EXECUTE_REQUEST, new TaskExecuteProcessor(alertClientService));
this.nettyRemotingServer.registerProcessor(CommandType.TASK_KILL_REQUEST, new TaskKillProcessor()); this.nettyRemotingServer.registerProcessor(CommandType.TASK_KILL_REQUEST, new TaskKillProcessor());
this.nettyRemotingServer.registerProcessor(CommandType.DB_TASK_ACK, new DBTaskAckProcessor()); this.nettyRemotingServer.registerProcessor(CommandType.DB_TASK_ACK, new DBTaskAckProcessor());
this.nettyRemotingServer.registerProcessor(CommandType.DB_TASK_RESPONSE, new DBTaskResponseProcessor()); this.nettyRemotingServer.registerProcessor(CommandType.DB_TASK_RESPONSE, new DBTaskResponseProcessor());
@ -116,9 +119,6 @@ public class WorkerServer {
// worker registry // worker registry
this.workerRegistry.registry(); this.workerRegistry.registry();
//alert-server client registry
alertClientService = new AlertClientService(workerConfig.getAlertListenHost(),Constants.ALERT_RPC_PORT);
// retry report task status // retry report task status
this.retryReportTaskStatusThread.start(); this.retryReportTaskStatusThread.start();

28
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue

@ -34,23 +34,22 @@
<div class="dag-contect"> <div class="dag-contect">
<div class="dag-toolbar"> <div class="dag-toolbar">
<div class="assist-btn"> <div class="assist-btn">
<el-tooltip :content="$t('View variables')" placement="top" :enterable="false">
<span>
<el-button <el-button
style="vertical-align: middle;" style="vertical-align: middle;"
data-toggle="tooltip"
:title="$t('View variables')"
data-container="body"
type="primary" type="primary"
size="mini" size="mini"
:disabled="$route.name !== 'projects-instance-details'" :disabled="$route.name !== 'projects-instance-details'"
@click="_toggleView" @click="_toggleView"
icon="el-icon-c-scale-to-original"> icon="el-icon-c-scale-to-original">
</el-button> </el-button>
</span>
</el-tooltip>
<el-tooltip :content="$t('Startup parameter')" placement="top" :enterable="false">
<span> <span>
<el-button <el-button
style="vertical-align: middle;" style="vertical-align: middle;"
data-toggle="tooltip"
:title="$t('Startup parameter')"
data-container="body"
type="primary" type="primary"
size="mini" size="mini"
:disabled="$route.name !== 'projects-instance-details'" :disabled="$route.name !== 'projects-instance-details'"
@ -58,6 +57,7 @@
icon="el-icon-arrow-right"> icon="el-icon-arrow-right">
</el-button> </el-button>
</span> </span>
</el-tooltip>
<span class="name">{{name}}</span> <span class="name">{{name}}</span>
&nbsp; &nbsp;
<span v-if="name" class="copy-name" @click="_copyName" :data-clipboard-text="name"><em class="el-icon-copy-document" data-container="body" data-toggle="tooltip" :title="$t('Copy name')" ></em></span> <span v-if="name" class="copy-name" @click="_copyName" :data-clipboard-text="name"><em class="el-icon-copy-document" data-container="body" data-toggle="tooltip" :title="$t('Copy name')" ></em></span>
@ -70,23 +70,26 @@
:id="item.code" :id="item.code"
:key="$index" :key="$index"
@click="_ckOperation(item,$event)"> @click="_ckOperation(item,$event)">
<el-button type="text" class="operBtn" data-container="body" :icon="item.icon" v-tooltip.light="item.desc"></el-button> <el-tooltip :content="item.desc" placement="top" :enterable="false">
<span><el-button type="text" class="operBtn" :icon="item.icon"></el-button></span>
</el-tooltip>
</a> </a>
</div> </div>
<el-tooltip :content="$t('Format DAG')" placement="top" :enterable="false">
<span>
<el-button <el-button
type="primary" type="primary"
v-tooltip.light="$t('Format DAG')"
icon="el-icon-caret-right" icon="el-icon-caret-right"
size="mini" size="mini"
data-container="body"
v-if="(type === 'instance' || 'definition') && urlParam.id !=undefined" v-if="(type === 'instance' || 'definition') && urlParam.id !=undefined"
style="vertical-align: middle;" style="vertical-align: middle;"
@click="dagAutomaticLayout"> @click="dagAutomaticLayout">
</el-button> </el-button>
</span>
</el-tooltip>
<el-tooltip :content="$t('Refresh DAG status')" placement="top" :enterable="false">
<span> <span>
<el-button <el-button
v-tooltip.light="$t('Refresh DAG status')"
data-container="body"
style="vertical-align: middle;" style="vertical-align: middle;"
icon="el-icon-refresh" icon="el-icon-refresh"
type="primary" type="primary"
@ -96,6 +99,7 @@
size="mini" > size="mini" >
</el-button> </el-button>
</span> </span>
</el-tooltip>
<el-button <el-button
v-if="isRtTasks" v-if="isRtTasks"
style="vertical-align: middle;" style="vertical-align: middle;"
@ -108,10 +112,8 @@
<span> <span>
<el-button <el-button
type="primary" type="primary"
v-tooltip.light="$t('Close')"
icon="el-icon-switch-button" icon="el-icon-switch-button"
size="mini" size="mini"
data-container="body"
v-if="(type === 'instance' || 'definition') " v-if="(type === 'instance' || 'definition') "
style="vertical-align: middle;" style="vertical-align: middle;"
@click="_closeDAG"> @click="_closeDAG">

9
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js

@ -627,6 +627,7 @@ JSP.prototype.saveStore = function () {
tasks.push(tasksParam) tasks.push(tasksParam)
} }
}) })
if (store.state.dag.connects.length === this.JspInstance.getConnections().length) { if (store.state.dag.connects.length === this.JspInstance.getConnections().length) {
_.map(store.state.dag.connects, u => { _.map(store.state.dag.connects, u => {
connects.push({ connects.push({
@ -658,6 +659,14 @@ JSP.prototype.saveStore = function () {
label: v._jsPlumb.overlays.label.canvas.innerText label: v._jsPlumb.overlays.label.canvas.innerText
}) })
}) })
} else if (store.state.dag.connects.length > this.JspInstance.getConnections().length) {
_.map(this.JspInstance.getConnections(), v => {
connects.push({
endPointSourceId: v.sourceId,
endPointTargetId: v.targetId,
label: v._jsPlumb.overlays.label.canvas.innerText
})
})
} }
_.map(tasksAll(), v => { _.map(tasksAll(), v => {

Loading…
Cancel
Save