This is an automated email from the ASF dual-hosted git repository.
leonbao pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 69a153c [Fix-6139][UI] Fix missing relationship issue (#6258)
69a153c is described below
commit 69a153c5f5c9d91b4eececbcfbf9e2fb407f89c4
Author: Wangyizhi1 <[email protected]>
AuthorDate: Sat Sep 18 17:28:03 2021 +0800
[Fix-6139][UI] Fix missing relationship issue (#6258)
* the relationship is missing in kinship
* Fix missing environmentCode parameter issue when modifying the process
---
.../pages/dag/_source/formModel/_source/relatedEnvironment.vue | 9 +++++++--
.../src/js/conf/home/pages/dag/_source/formModel/formModel.vue | 9 +++++++--
.../home/pages/projects/pages/kinship/_source/graphGridOption.js | 1 +
dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js | 8 +++++---
4 files changed, 20 insertions(+), 7 deletions(-)
diff --git
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/relatedEnvironment.vue
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/relatedEnvironment.vue
index a75fe5c..25b5bbf 100644
---
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/relatedEnvironment.vue
+++
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/relatedEnvironment.vue
@@ -49,6 +49,9 @@
},
workerGroup: {
type: String
+ },
+ isNewCreate: {
+ type: Boolean
}
},
model: {
@@ -70,6 +73,7 @@
},
_initEnvironmentOptions (workerGroup) {
this.environmentOptions = []
+ this.selectedValue = ''
if (this.environmentList && workerGroup) {
this.environmentList.forEach(item => {
if (item.workerGroups && item.workerGroups.length > 0) {
@@ -85,10 +89,11 @@
if (this.environmentOptions.length > 0) {
/// 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.$emit('environmentCodeEvent', this.selectedValue)
}
+ this.$emit('environmentCodeEvent', this.selectedValue)
} else {
this.selectedValue = ''
this.$emit('environmentCodeEvent', this.selectedValue)
diff --git
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
index 3d81d3e..911e450 100644
---
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
+++
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
@@ -118,6 +118,7 @@
<m-related-environment
v-model="environmentCode"
:workerGroup="workerGroup"
+ :isNewCreate="isNewCreate"
v-on:environmentCodeEvent="_onUpdateEnvironmentCode"
></m-related-environment>
</div>
@@ -512,7 +513,9 @@
postTasks: [],
prevTasks: [],
// refresh part of the formModel, after set backfillItem outside
- backfillRefresh: true
+ backfillRefresh: true,
+ // whether this is a new Task
+ isNewCreate: true
}
},
provide () {
@@ -560,7 +563,8 @@
},
type: task.taskType,
waitStartTimeout: task.taskParams.waitStartTimeout,
- workerGroup: task.workerGroup
+ workerGroup: task.workerGroup,
+ environmentCode: task.environmentCode
}
},
/**
@@ -902,6 +906,7 @@
const backfillItem = this.taskToBackfillItem(task)
o = backfillItem
this.backfillItem = backfillItem
+ this.isNewCreate = false
}
})
}
diff --git
a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/_source/graphGridOption.js
b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/_source/graphGridOption.js
index ac08521..5ad2408 100644
---
a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/_source/graphGridOption.js
+++
b/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)
return {
...item,
+ id: item.code,
emphasis: {
itemStyle: {
color
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 5bd9980..720bd21 100644
--- a/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
+++ b/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
@@ -143,7 +143,7 @@ export default {
state.globalParams = res.data.processDefinition.globalParamList
// timeout
state.timeout = res.data.processDefinition.timeout
- // tenantId
+ // tenantCode
state.tenantCode = res.data.processDefinition.tenantCode || 'default'
// tasks info
state.tasks = res.data.taskDefinitionList.map(task => _.pick(task, [
@@ -161,7 +161,8 @@ export default {
'failRetryInterval',
'timeoutFlag',
'timeoutNotifyStrategy',
- 'timeout'
+ 'timeout',
+ 'environmentCode'
]))
resolve(res.data)
}).catch(res => {
@@ -257,7 +258,8 @@ export default {
'failRetryInterval',
'timeoutFlag',
'timeoutNotifyStrategy',
- 'timeout'
+ 'timeout',
+ 'environmentCode'
]))
// startup parameters
state.startup = _.assign(state.startup, _.pick(res.data,
['commandType', 'failureStrategy', 'processInstancePriority', 'workerGroup',
'warningType', 'warningGroupId', 'receivers', 'receiversCc']))