From 7b3ab01e8c0c8a357ca266c2f91f2ef851fe4b90 Mon Sep 17 00:00:00 2001 From: gongzijian Date: Sat, 25 May 2019 10:50:49 +0800 Subject: [PATCH 1/7] edit udp.vue --- escheduler-ui/.env | 6 ++++-- .../conf/home/pages/dag/_source/udp/udp.vue | 20 +++++++++---------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/escheduler-ui/.env b/escheduler-ui/.env index d83fa8435d..58ed53fa30 100644 --- a/escheduler-ui/.env +++ b/escheduler-ui/.env @@ -1,5 +1,7 @@ # 后端接口地址 -API_BASE = http://192.168.xx.xx:12345 +#API_BASE = http://192.168.221.188:12345 + +API_BASE = http://192.168.220.154:12345 # 本地开发如需ip访问项目把"#"号去掉 -#DEV_HOST = 192.168.xx.xx \ No newline at end of file +#DEV_HOST = 192.168.xx.xx diff --git a/escheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue b/escheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue index 76aaccdd93..8e11dca356 100644 --- a/escheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue +++ b/escheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue @@ -84,6 +84,8 @@ desc: '', // Global custom parameters udpList: [], + // Global custom parameters + udpListCache: [], // Whether to update the process definition syncDefine: true, // Timeout alarm @@ -159,11 +161,7 @@ * Close the popup */ close () { - // Storage global globalParams - this._accuStore() - setTimeout(() => { - this.$emit('close') - }) + this.$emit('close') } }, watch: { @@ -175,11 +173,13 @@ } }, created () { - this.udpList = this.store.state.dag.globalParams - this.name = this.store.state.dag.name - this.desc = this.store.state.dag.desc - this.syncDefine = this.store.state.dag.syncDefine - this.timeout = this.store.state.dag.timeout || 0 + const dag = _.cloneDeep(this.store.state.dag) + this.udpList = dag.globalParams + this.udpListCache = dag.globalParams + this.name = dag.name + this.desc = dag.desc + this.syncDefine = dag.syncDefine + this.timeout = dag.timeout || 0 this.checkedTimeout = this.timeout !== 0 }, mounted () {}, From 3b4c32514f44064f28415864ef595dd95f781716 Mon Sep 17 00:00:00 2001 From: gongzijian Date: Sat, 25 May 2019 11:16:37 +0800 Subject: [PATCH 2/7] add remove Timing --- escheduler-ui/.env | 4 +- .../definition/pages/list/_source/list.vue | 3 +- .../pages/definition/timing/_source/list.vue | 47 ++++++++++++++++++- .../src/js/conf/home/store/dag/actions.js | 12 +++++ 4 files changed, 61 insertions(+), 5 deletions(-) diff --git a/escheduler-ui/.env b/escheduler-ui/.env index 58ed53fa30..d58671abd7 100644 --- a/escheduler-ui/.env +++ b/escheduler-ui/.env @@ -1,7 +1,7 @@ # 后端接口地址 -#API_BASE = http://192.168.221.188:12345 +API_BASE = http://192.168.221.188:12345 -API_BASE = http://192.168.220.154:12345 +#API_BASE = http://192.168.220.154:12345 # 本地开发如需ip访问项目把"#"号去掉 #DEV_HOST = 192.168.xx.xx diff --git a/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue b/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue index 310cc22727..e8e99bb535 100644 --- a/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue +++ b/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue @@ -32,7 +32,7 @@ - + {{parseInt(pageNo === 1 ? ($index + 1) : (($index + 1) + (pageSize * (pageNo - 1))))}} @@ -79,6 +79,7 @@ type="error" shape="circle" size="xsmall" + :disabled="item.releaseState === 'OFFLINE'" data-toggle="tooltip" :title="$t('delete')" v-ps="['GENERAL_USER']"> diff --git a/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue b/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue index 22a9dee15f..4f4692ef59 100644 --- a/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue +++ b/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue @@ -35,7 +35,7 @@ {{$t('Update Time')}} - + {{$t('Operation')}} @@ -98,6 +98,28 @@ @click="_offline(item)" v-if="item.releaseState === 'ONLINE'"> + +

{{$t('Delete?')}}

+
+ {{$t('Cancel')}} + {{$t('Confirm')}} +
+ +
@@ -135,7 +157,28 @@ props: { }, methods: { - ...mapActions('dag', ['getScheduleList', 'scheduleOffline', 'scheduleOnline', 'getReceiver']), + ...mapActions('dag', ['getScheduleList', 'scheduleOffline', 'scheduleOnline', 'getReceiver','deleteTiming']), + /** + * delete + */ + _delete (item, i) { + this.deleteTiming({ + scheduleId: item.id + }).then(res => { + this.$refs[`poptip-delete-${i}`][0].doClose() + this.$message.success(res.msg) + this.$router.push({ name: 'projects-definition-list' }) + }).catch(e => { + this.$refs[`poptip-delete-${i}`][0].doClose() + this.$message.error(e.msg || '') + }) + }, + /** + * Close the delete layer + */ + _closeDelete (i) { + this.$refs[`poptip-delete-${i}`][0].doClose() + }, /** * return state */ diff --git a/escheduler-ui/src/js/conf/home/store/dag/actions.js b/escheduler-ui/src/js/conf/home/store/dag/actions.js index 5e34925f9c..e41e4be760 100644 --- a/escheduler-ui/src/js/conf/home/store/dag/actions.js +++ b/escheduler-ui/src/js/conf/home/store/dag/actions.js @@ -589,5 +589,17 @@ export default { reject(e) }) }) + }, + /** + * remove timing + */ + deleteTiming({ state }, payload){ + return new Promise((resolve, reject) => { + io.get(`projects/${state.projectName}/schedule/delete`, payload, res => { + resolve(res) + }).catch(e => { + reject(e) + }) + }) } } From 6628259bedceabd5573e2ec37ae52d5f58d42d59 Mon Sep 17 00:00:00 2001 From: gongzijian Date: Sat, 25 May 2019 11:21:24 +0800 Subject: [PATCH 3/7] .env --- escheduler-ui/.env | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/escheduler-ui/.env b/escheduler-ui/.env index d58671abd7..9018a5d4e2 100644 --- a/escheduler-ui/.env +++ b/escheduler-ui/.env @@ -1,7 +1,5 @@ # 后端接口地址 -API_BASE = http://192.168.221.188:12345 - -#API_BASE = http://192.168.220.154:12345 +API_BASE = http://192.168.xx.xx:12345 # 本地开发如需ip访问项目把"#"号去掉 #DEV_HOST = 192.168.xx.xx From e3faf58aa79e3b3eb25c0b38f4dc51bb0d8a2171 Mon Sep 17 00:00:00 2001 From: gongzijian Date: Sat, 25 May 2019 14:15:47 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=85=A8=E9=80=89=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/pages/list/_source/list.vue | 35 ++++++++++++++++--- .../instance/pages/list/_source/list.vue | 28 +++++++++++++-- 2 files changed, 56 insertions(+), 7 deletions(-) diff --git a/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue b/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue index e8e99bb535..129aa8f166 100644 --- a/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue +++ b/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue @@ -61,8 +61,8 @@ - - + + - 删除 + +

{{$t('Delete?')}}

+
+ {{$t('Cancel')}} + {{$t('Confirm')}} +
+ +
+