Browse Source

change stop and pause at ui

add receivers and cc in process instance for api
pull/2/head
lenboo 5 years ago
parent
commit
27c33609dd
  1. 3
      escheduler-api/src/main/java/cn/escheduler/api/service/ProcessInstanceService.java
  2. 27
      escheduler-dao/src/main/java/cn/escheduler/dao/model/ProcessInstance.java
  3. 43
      escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue
  4. 1
      escheduler-ui/src/js/module/i18n/locale/en_US.js
  5. 5
      escheduler-ui/src/js/module/i18n/locale/zh_CN.js

3
escheduler-api/src/main/java/cn/escheduler/api/service/ProcessInstanceService.java

@ -121,6 +121,9 @@ public class ProcessInstanceService extends BaseDAGService {
WorkerGroup workerGroup = workerGroupMapper.queryById(processInstance.getWorkerGroupId());
processInstance.setWorkerGroupName(workerGroup.getName());
}
ProcessDefinition processDefinition = processDao.findProcessDefineById(processInstance.getProcessDefinitionId());
processInstance.setReceivers(processDefinition.getReceivers());
processInstance.setReceiversCc(processDefinition.getReceiversCc());
result.put(Constants.DATA_LIST, processInstance);
putMsg(result, Status.SUCCESS);

27
escheduler-dao/src/main/java/cn/escheduler/dao/model/ProcessInstance.java

@ -199,6 +199,16 @@ public class ProcessInstance {
*/
private String workerGroupName;
/**
* receivers for api
*/
private String receivers;
/**
* receivers cc for api
*/
private String receiversCc;
public ProcessInstance(){
}
@ -554,7 +564,6 @@ public class ProcessInstance {
", dependenceScheduleTimes='" + dependenceScheduleTimes + '\'' +
", duration=" + duration +
", timeout=" + timeout +
", workerGroupName=" + workerGroupName +
", processInstancePriority=" + processInstancePriority +
'}';
}
@ -574,4 +583,20 @@ public class ProcessInstance {
public void setWorkerGroupName(String workerGroupName) {
this.workerGroupName = workerGroupName;
}
public String getReceivers() {
return receivers;
}
public void setReceivers(String receivers) {
this.receivers = receivers;
}
public String getReceiversCc() {
return receiversCc;
}
public void setReceiversCc(String receiversCc) {
this.receiversCc = receiversCc;
}
}

43
escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue

@ -95,9 +95,9 @@
shape="circle"
size="xsmall"
data-toggle="tooltip"
:title="item.state === 'STOP' ? $t('Recovery Stop') : $t('Stop')"
:title="item.state === 'STOP' ? $t('Recovery Suspend') : $t('Stop')"
@click="_stop(item,$index)"
icon="iconfont icon-zanting1"
:icon="item.state === 'STOP' ? 'iconfont icon-ai06' : 'iconfont icon-zanting'"
:disabled="item.state !== 'RUNNING_EXEUTION' && item.state != 'STOP'"></x-button>
<x-button type="warning"
shape="circle"
@ -105,7 +105,7 @@
data-toggle="tooltip"
:title="item.state === 'PAUSE' ? $t('Recovery Suspend') : $t('Pause')"
@click="_suspend(item,$index)"
:icon="item.state === 'PAUSE' ? 'iconfont icon-ai06' : 'iconfont icon-zanting'"
:icon="item.state === 'PAUSE' ? 'iconfont icon-ai06' : 'iconfont icon-zanting1'"
:disabled="item.state !== 'RUNNING_EXEUTION' && item.state !== 'PAUSE'"></x-button>
<x-poptip
:ref="'poptip-delete-' + $index"
@ -155,7 +155,7 @@
shape="circle"
size="xsmall"
disabled="true">
{{item.count}}s
{{item.count}}
</x-button>
<x-button
v-show="buttonType !== 'run'"
@ -173,7 +173,7 @@
shape="circle"
size="xsmall"
disabled="true">
{{item.count}}s
{{item.count}}
</x-button>
<x-button
v-show="buttonType !== 'store'"
@ -185,26 +185,26 @@
</x-button>
<!--Stop-->
<x-button
type="error"
shape="circle"
size="xsmall"
icon="iconfont icon-zanting1"
disabled="true">
</x-button>
<!--<x-button-->
<!--type="error"-->
<!--shape="circle"-->
<!--size="xsmall"-->
<!--icon="iconfont icon-zanting1"-->
<!--disabled="true">-->
<!--</x-button>-->
<!--倒计时 => Recovery Suspend/Pause-->
<x-button
v-show="item.state === 'PAUSE' && buttonType === 'suspend'"
v-show="(item.state === 'PAUSE' || item.state == 'STOP') && buttonType === 'suspend'"
type="warning"
shape="circle"
size="xsmall"
disabled="true">
{{item.count}}s
{{item.count}}
</x-button>
<!--Recovery Suspend-->
<x-button
v-show="item.state === 'PAUSE' && buttonType !== 'suspend'"
v-show="(item.state === 'PAUSE' || item.state == 'STOP') && buttonType !== 'suspend'"
type="warning"
shape="circle"
size="xsmall"
@ -217,6 +217,15 @@
type="warning"
shape="circle"
size="xsmall"
icon="iconfont icon-zanting1"
disabled="true">
</x-button>
<!--Stop-->
<x-button
v-show="item.state !== 'STOP'"
type="warning"
shape="circle"
size="xsmall"
icon="iconfont icon-zanting"
disabled="true">
</x-button>
@ -392,7 +401,7 @@
} else {
this._upExecutorsState({
processInstanceId: item.id,
executeType: item.state === 'PAUSE' ? 'RECOVER_SUSPENDED_PROCESS' : 'PAUSE'
executeType: 'PAUSE'
})
}
},
@ -444,7 +453,7 @@
if (data.length) {
_.map(data, v => {
v.disabled = true
v.count = 10
v.count = 9
})
}
return data

1
escheduler-ui/src/js/module/i18n/locale/en_US.js

@ -238,7 +238,6 @@ export default {
'Stop': 'Stop',
'Pause': 'Pause',
'Recovery Suspend': 'Recovery Suspend',
'Recovery Stop': 'Recovery Stop',
'Gantt': 'Gantt',
'Name': 'Name',
'Node Type': 'Node Type',

5
escheduler-ui/src/js/module/i18n/locale/zh_CN.js

@ -237,8 +237,7 @@ export default {
'Recovery Failed': '恢复失败',
'Stop': '停止',
'Pause': '暂停',
'Recovery Suspend': '恢复暂停',
'Recovery Stop': '恢复停止',
'Recovery Suspend': '恢复运行',
'Gantt': '甘特图',
'Name': '名称',
'Node Type': '节点类型',
@ -283,7 +282,7 @@ export default {
'Start Process': '启动工作流',
'Execute from the current node': '从当前节点开始执行',
'Recover tolerance fault process': '恢复被容错的工作流',
'Resume the suspension process': '恢复暂停流程',
'Resume the suspension process': '恢复运行流程',
'Execute from the failed nodes': '从失败节点开始执行',
'Complement Data': '补数',
'Scheduling execution': '调度执行',

Loading…
Cancel
Save