diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue index a5098a010b25b60451180ddb760716ad2db3e607..e7962da7e44a282e2ecf0fe200b03325d90a4599 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue @@ -170,6 +170,10 @@ // DAG automatic layout dagAutomaticLayout() { + if(this.store.state.dag.isEditDag) { + this.$message.warning(`${i18n.$t('Please save the DAG before formatting')}`) + return false + } $('#canvas').html('') // Destroy round robin diff --git a/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js b/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js index 09d51b91dd24ed570a44387ab47ee9933ba194b8..e2f3f2b9dc1828f5a5eda3cf5c9835731c0d31cd 100644 --- a/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js +++ b/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js @@ -230,6 +230,7 @@ export default { id: payload }, res => { resolve(res) + state.isEditDag = false }).catch(e => { reject(e) }) diff --git a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js index 657dcef0bb9bc4bb4be2bddfeee606215b5789e3..504534eb34534e73303b6d1a753bacfdec3d285e 100755 --- a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js +++ b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js @@ -599,5 +599,6 @@ export default { zkDirectory: 'zkDirectory', 'Directory detail': 'Directory detail', 'Connection name': 'Connection name', - 'Current connection settings': 'Current connection settings' + 'Current connection settings': 'Current connection settings', + 'Please save the DAG before formatting': 'Please save the DAG before formatting' } diff --git a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js index 8f38f343523500528414b0fa38be9f8b748124c4..f84f41b023bea0cd96df91158387d43baece43bf 100755 --- a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js +++ b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js @@ -604,5 +604,6 @@ export default { zkDirectory: 'zk注册目录', 'Directory detail': '查看目录详情', 'Connection name': '连线名', - 'Current connection settings': '当前连线设置' + 'Current connection settings': '当前连线设置', + 'Please save the DAG before formatting': '格式化前请先保存DAG' }