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 070b280 fix api error in dependent task (#6238)
070b280 is described below
commit 070b280f567a158a00887f9c2f5484e34b4543f6
Author: Wangyizhi1 <[email protected]>
AuthorDate: Fri Sep 17 15:29:15 2021 +0800
fix api error in dependent task (#6238)
---
.../formModel/tasks/_source/dependItemList.vue | 25 ++++++++++++++++++----
.../src/js/conf/home/store/dag/actions.js | 2 +-
2 files changed, 22 insertions(+), 5 deletions(-)
diff --git
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue
index fa27494..82822ab 100644
---
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue
+++
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue
@@ -86,6 +86,10 @@
// add task list
let projectCode = this.projectList[0].value
this._getProcessByProjectCode(projectCode).then(definitionList => {
+ if (!definitionList || definitionList.length === 0) {
+ this.$emit('dependItemListEvent', _.concat(this.dependItemList,
this._rtNewParams('', [], ['ALL'], projectCode)))
+ return
+ }
// dependItemList index
let is = (value) => _.some(this.dependItemList, { definitionCode:
value })
let noArr = _.filter(definitionList, v => !is(v.value))
@@ -158,6 +162,15 @@
*/
_onChangeProjectCode (value, itemIndex) {
this._getProcessByProjectCode(value).then(definitionList => {
+ if (!definitionList || definitionList.length === 0) {
+ this.$set(this.dependItemList, itemIndex, this._cpOldParams(value,
'', [], ['ALL'], {
+ cycle: 'day',
+ dateValue: 'today',
+ state: '',
+ depTasks: 'ALL'
+ }))
+ return
+ }
/* this.$set(this.dependItemList, itemIndex,
this._dlOldParams(value, definitionList, item)) */
let definitionCode = definitionList[0].value
this._getDependItemList(definitionCode).then(depTasksList => {
@@ -246,10 +259,14 @@
if (!this.projectList.length) return
let projectCode = this.projectList[0].value
this._getProcessByProjectCode(projectCode).then(definitionList => {
- let value = definitionList[0].value
- this._getDependItemList(value).then(depTasksList => {
- this.$emit('dependItemListEvent', _.concat(this.dependItemList,
this._rtNewParams(value, definitionList, depTasksList, projectCode)))
- })
+ if (definitionList && definitionList.length > 0) {
+ let definitionCode = definitionList[0].value
+ this._getDependItemList(definitionCode).then(depTasksList => {
+ this.$emit('dependItemListEvent',
_.concat(this.dependItemList, this._rtNewParams(definitionCode, definitionList,
depTasksList || ['ALL'], projectCode)))
+ })
+ } else {
+ this.$emit('dependItemListEvent', _.concat(this.dependItemList,
this._rtNewParams('', [], ['ALL'], projectCode)))
+ }
})
} else {
// get definitionCode codes
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 161cfd4..5bd9980 100644
--- a/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
+++ b/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
@@ -375,7 +375,7 @@ export default {
resolve()
return
}
- io.get('projects/list', payload, res => {
+ io.get('projects/created-and-authed', payload, res => {
state.projectListS = res.data
resolve(res.data)
}).catch(res => {