Browse Source

When modifying the dag, if the DAG is not saved, it cannot be formatted

pull/3/MERGE
break60 4 years ago
parent
commit
1c16c4f968
  1. 4
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
  2. 1
      dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
  3. 3
      dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
  4. 3
      dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

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

@ -181,6 +181,10 @@
// DAG automatic layout // DAG automatic layout
dagAutomaticLayout() { dagAutomaticLayout() {
if(this.store.state.dag.isEditDag) {
this.$message.warning(`${i18n.$t('Please save the DAG before formatting')}`)
return false
}
$('#canvas').html('') $('#canvas').html('')
// Destroy round robin // Destroy round robin

1
dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js

@ -230,6 +230,7 @@ export default {
id: payload id: payload
}, res => { }, res => {
resolve(res) resolve(res)
state.isEditDag = false
}).catch(e => { }).catch(e => {
reject(e) reject(e)
}) })

3
dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js

@ -620,5 +620,6 @@ export default {
zkDirectory: 'zkDirectory', zkDirectory: 'zkDirectory',
'Directory detail': 'Directory detail', 'Directory detail': 'Directory detail',
'Connection name': 'Connection name', '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'
} }

3
dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

@ -619,5 +619,6 @@ export default {
zkDirectory: 'zk注册目录', zkDirectory: 'zk注册目录',
'Directory detail': '查看目录详情', 'Directory detail': '查看目录详情',
'Connection name': '连线名', 'Connection name': '连线名',
'Current connection settings': '当前连线设置' 'Current connection settings': '当前连线设置',
'Please save the DAG before formatting': '格式化前请先保存DAG'
} }

Loading…
Cancel
Save