Browse Source

[Fix-6139][UI] Fix missing relationship issue (#6258)

* the relationship is missing in kinship

* Fix missing environmentCode parameter issue when modifying the process
2.0.7-release
Wangyizhi1 3 years ago committed by GitHub
parent
commit
69a153c5f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/relatedEnvironment.vue
  2. 9
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
  3. 1
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/_source/graphGridOption.js
  4. 8
      dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js

9
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/relatedEnvironment.vue

@ -49,6 +49,9 @@
}, },
workerGroup: { workerGroup: {
type: String type: String
},
isNewCreate: {
type: Boolean
} }
}, },
model: { model: {
@ -70,6 +73,7 @@
}, },
_initEnvironmentOptions (workerGroup) { _initEnvironmentOptions (workerGroup) {
this.environmentOptions = [] this.environmentOptions = []
this.selectedValue = ''
if (this.environmentList && workerGroup) { if (this.environmentList && workerGroup) {
this.environmentList.forEach(item => { this.environmentList.forEach(item => {
if (item.workerGroups && item.workerGroups.length > 0) { if (item.workerGroups && item.workerGroups.length > 0) {
@ -85,10 +89,11 @@
if (this.environmentOptions.length > 0) { if (this.environmentOptions.length > 0) {
/// default to select this environment when only have one environment /// default to select this environment when only have one environment
if (this.environmentOptions.length === 1 && this.selectedValue === '') { /// automatically select only when creating a new task
if (this.isNewCreate && this.environmentOptions.length === 1 && this.selectedValue === '') {
this.selectedValue = this.environmentOptions[0].code this.selectedValue = this.environmentOptions[0].code
this.$emit('environmentCodeEvent', this.selectedValue)
} }
this.$emit('environmentCodeEvent', this.selectedValue)
} else { } else {
this.selectedValue = '' this.selectedValue = ''
this.$emit('environmentCodeEvent', this.selectedValue) this.$emit('environmentCodeEvent', this.selectedValue)

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

@ -118,6 +118,7 @@
<m-related-environment <m-related-environment
v-model="environmentCode" v-model="environmentCode"
:workerGroup="workerGroup" :workerGroup="workerGroup"
:isNewCreate="isNewCreate"
v-on:environmentCodeEvent="_onUpdateEnvironmentCode" v-on:environmentCodeEvent="_onUpdateEnvironmentCode"
></m-related-environment> ></m-related-environment>
</div> </div>
@ -512,7 +513,9 @@
postTasks: [], postTasks: [],
prevTasks: [], prevTasks: [],
// refresh part of the formModel, after set backfillItem outside // refresh part of the formModel, after set backfillItem outside
backfillRefresh: true backfillRefresh: true,
// whether this is a new Task
isNewCreate: true
} }
}, },
provide () { provide () {
@ -560,7 +563,8 @@
}, },
type: task.taskType, type: task.taskType,
waitStartTimeout: task.taskParams.waitStartTimeout, waitStartTimeout: task.taskParams.waitStartTimeout,
workerGroup: task.workerGroup workerGroup: task.workerGroup,
environmentCode: task.environmentCode
} }
}, },
/** /**
@ -902,6 +906,7 @@
const backfillItem = this.taskToBackfillItem(task) const backfillItem = this.taskToBackfillItem(task)
o = backfillItem o = backfillItem
this.backfillItem = backfillItem this.backfillItem = backfillItem
this.isNewCreate = false
} }
}) })
} }

1
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/_source/graphGridOption.js

@ -41,6 +41,7 @@ export default function (locations, links, sourceWorkFlowCode, isShowLabel) {
const { color, category } = getCategory(categoryDic, item, sourceWorkFlowCode) const { color, category } = getCategory(categoryDic, item, sourceWorkFlowCode)
return { return {
...item, ...item,
id: item.code,
emphasis: { emphasis: {
itemStyle: { itemStyle: {
color color

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

@ -143,7 +143,7 @@ export default {
state.globalParams = res.data.processDefinition.globalParamList state.globalParams = res.data.processDefinition.globalParamList
// timeout // timeout
state.timeout = res.data.processDefinition.timeout state.timeout = res.data.processDefinition.timeout
// tenantId // tenantCode
state.tenantCode = res.data.processDefinition.tenantCode || 'default' state.tenantCode = res.data.processDefinition.tenantCode || 'default'
// tasks info // tasks info
state.tasks = res.data.taskDefinitionList.map(task => _.pick(task, [ state.tasks = res.data.taskDefinitionList.map(task => _.pick(task, [
@ -161,7 +161,8 @@ export default {
'failRetryInterval', 'failRetryInterval',
'timeoutFlag', 'timeoutFlag',
'timeoutNotifyStrategy', 'timeoutNotifyStrategy',
'timeout' 'timeout',
'environmentCode'
])) ]))
resolve(res.data) resolve(res.data)
}).catch(res => { }).catch(res => {
@ -257,7 +258,8 @@ export default {
'failRetryInterval', 'failRetryInterval',
'timeoutFlag', 'timeoutFlag',
'timeoutNotifyStrategy', 'timeoutNotifyStrategy',
'timeout' 'timeout',
'environmentCode'
])) ]))
// startup parameters // startup parameters
state.startup = _.assign(state.startup, _.pick(res.data, ['commandType', 'failureStrategy', 'processInstancePriority', 'workerGroup', 'warningType', 'warningGroupId', 'receivers', 'receiversCc'])) state.startup = _.assign(state.startup, _.pick(res.data, ['commandType', 'failureStrategy', 'processInstancePriority', 'workerGroup', 'warningType', 'warningGroupId', 'receivers', 'receiversCc']))

Loading…
Cancel
Save