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()); WorkerGroup workerGroup = workerGroupMapper.queryById(processInstance.getWorkerGroupId());
processInstance.setWorkerGroupName(workerGroup.getName()); processInstance.setWorkerGroupName(workerGroup.getName());
} }
ProcessDefinition processDefinition = processDao.findProcessDefineById(processInstance.getProcessDefinitionId());
processInstance.setReceivers(processDefinition.getReceivers());
processInstance.setReceiversCc(processDefinition.getReceiversCc());
result.put(Constants.DATA_LIST, processInstance); result.put(Constants.DATA_LIST, processInstance);
putMsg(result, Status.SUCCESS); 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; private String workerGroupName;
/**
* receivers for api
*/
private String receivers;
/**
* receivers cc for api
*/
private String receiversCc;
public ProcessInstance(){ public ProcessInstance(){
} }
@ -554,7 +564,6 @@ public class ProcessInstance {
", dependenceScheduleTimes='" + dependenceScheduleTimes + '\'' + ", dependenceScheduleTimes='" + dependenceScheduleTimes + '\'' +
", duration=" + duration + ", duration=" + duration +
", timeout=" + timeout + ", timeout=" + timeout +
", workerGroupName=" + workerGroupName +
", processInstancePriority=" + processInstancePriority + ", processInstancePriority=" + processInstancePriority +
'}'; '}';
} }
@ -574,4 +583,20 @@ public class ProcessInstance {
public void setWorkerGroupName(String workerGroupName) { public void setWorkerGroupName(String workerGroupName) {
this.workerGroupName = 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" shape="circle"
size="xsmall" size="xsmall"
data-toggle="tooltip" 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)" @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> :disabled="item.state !== 'RUNNING_EXEUTION' && item.state != 'STOP'"></x-button>
<x-button type="warning" <x-button type="warning"
shape="circle" shape="circle"
@ -105,7 +105,7 @@
data-toggle="tooltip" data-toggle="tooltip"
:title="item.state === 'PAUSE' ? $t('Recovery Suspend') : $t('Pause')" :title="item.state === 'PAUSE' ? $t('Recovery Suspend') : $t('Pause')"
@click="_suspend(item,$index)" @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> :disabled="item.state !== 'RUNNING_EXEUTION' && item.state !== 'PAUSE'"></x-button>
<x-poptip <x-poptip
:ref="'poptip-delete-' + $index" :ref="'poptip-delete-' + $index"
@ -155,7 +155,7 @@
shape="circle" shape="circle"
size="xsmall" size="xsmall"
disabled="true"> disabled="true">
{{item.count}}s {{item.count}}
</x-button> </x-button>
<x-button <x-button
v-show="buttonType !== 'run'" v-show="buttonType !== 'run'"
@ -173,7 +173,7 @@
shape="circle" shape="circle"
size="xsmall" size="xsmall"
disabled="true"> disabled="true">
{{item.count}}s {{item.count}}
</x-button> </x-button>
<x-button <x-button
v-show="buttonType !== 'store'" v-show="buttonType !== 'store'"
@ -185,26 +185,26 @@
</x-button> </x-button>
<!--Stop--> <!--Stop-->
<x-button <!--<x-button-->
type="error" <!--type="error"-->
shape="circle" <!--shape="circle"-->
size="xsmall" <!--size="xsmall"-->
icon="iconfont icon-zanting1" <!--icon="iconfont icon-zanting1"-->
disabled="true"> <!--disabled="true">-->
</x-button> <!--</x-button>-->
<!--倒计时 => Recovery Suspend/Pause--> <!--倒计时 => Recovery Suspend/Pause-->
<x-button <x-button
v-show="item.state === 'PAUSE' && buttonType === 'suspend'" v-show="(item.state === 'PAUSE' || item.state == 'STOP') && buttonType === 'suspend'"
type="warning" type="warning"
shape="circle" shape="circle"
size="xsmall" size="xsmall"
disabled="true"> disabled="true">
{{item.count}}s {{item.count}}
</x-button> </x-button>
<!--Recovery Suspend--> <!--Recovery Suspend-->
<x-button <x-button
v-show="item.state === 'PAUSE' && buttonType !== 'suspend'" v-show="(item.state === 'PAUSE' || item.state == 'STOP') && buttonType !== 'suspend'"
type="warning" type="warning"
shape="circle" shape="circle"
size="xsmall" size="xsmall"
@ -217,6 +217,15 @@
type="warning" type="warning"
shape="circle" shape="circle"
size="xsmall" 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" icon="iconfont icon-zanting"
disabled="true"> disabled="true">
</x-button> </x-button>
@ -392,7 +401,7 @@
} else { } else {
this._upExecutorsState({ this._upExecutorsState({
processInstanceId: item.id, processInstanceId: item.id,
executeType: item.state === 'PAUSE' ? 'RECOVER_SUSPENDED_PROCESS' : 'PAUSE' executeType: 'PAUSE'
}) })
} }
}, },
@ -444,7 +453,7 @@
if (data.length) { if (data.length) {
_.map(data, v => { _.map(data, v => {
v.disabled = true v.disabled = true
v.count = 10 v.count = 9
}) })
} }
return data return data

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

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

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

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

Loading…
Cancel
Save