This is an automated email from the ASF dual-hosted git repository.
kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new e8c9c33 [Fix-5055][UI] Fix can not upload file to correct dir (#5056)
e8c9c33 is described below
commit e8c9c33d7e45b361c3c25085b01d3d78b6b11d90
Author: JuFeng Li <[email protected]>
AuthorDate: Thu Apr 1 20:57:46 2021 +0800
[Fix-5055][UI] Fix can not upload file to correct dir (#5056)
* fix udf resource can not upload to the correct dir,and when delete udf
resource can not refresh page
Co-authored-by: 李巨丰 <[email protected]>
---
.../home/pages/resource/pages/file/pages/subdirectory/_source/list.vue | 1 +
.../conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue | 1 +
.../pages/resource/pages/udf/pages/subUdfDirectory/_source/list.vue | 2 --
.../conf/home/pages/resource/pages/udf/pages/subUdfDirectory/index.vue | 1 +
.../src/js/module/components/fileUpdate/fileChildUpdate.vue | 2 +-
.../src/js/module/components/fileUpdate/resourceChildUpdate.vue | 2 +-
6 files changed, 5 insertions(+), 4 deletions(-)
diff --git
a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/list.vue
b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/list.vue
index f009857..c51aded 100755
---
a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/list.vue
+++
b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/list.vue
@@ -115,6 +115,7 @@
_go (item) {
localStore.setItem('file', `${item.alias}|${item.size}`)
if (item.directory) {
+ localStore.setItem('pid', `${item.id}`)
localStore.setItem('currentDir', `${item.fullName}`)
this.$router.push({ path: `/resource/file/subdirectory/${item.id}` })
} else {
diff --git
a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue
b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue
index f25178c..24bf712 100644
---
a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue
+++
b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue
@@ -116,6 +116,7 @@
_go (item) {
localStore.setItem('file', `${item.alias}|${item.size}`)
if (item.directory) {
+ localStore.setItem('pid', `${item.id}`)
localStore.setItem('currentDir', `${item.fullName}`)
this.$router.push({ path: `/resource/udf/subUdfDirectory/${item.id}`
})
}
diff --git
a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/list.vue
b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/list.vue
index 8522190..17d0d2a 100755
---
a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/list.vue
+++
b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/list.vue
@@ -127,11 +127,9 @@
this.deleteResource({
id: item.id
}).then(res => {
- this.$refs[`poptip-${i}`][0].doClose()
this.$emit('on-update')
this.$message.success(res.msg)
}).catch(e => {
- this.$refs[`poptip-${i}`][0].doClose()
this.$message.error(e.msg || '')
})
},
diff --git
a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/index.vue
b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/index.vue
index 5de6fdb..654d5fb 100755
---
a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/index.vue
+++
b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/index.vue
@@ -121,6 +121,7 @@
this.isLeft = true
}
this.isLoading = !flag
+ this.searchParams.id = this.$route.params.id
this.getResourcesListP(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1
diff --git
a/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildUpdate.vue
b/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildUpdate.vue
index a984af6..369a161 100644
---
a/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildUpdate.vue
+++
b/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildUpdate.vue
@@ -174,7 +174,7 @@
formData.append('file', this.file)
formData.append('type', this.type)
formData.append('name', this.name)
- formData.append('pid', this.pid)
+ formData.append('pid', this.id)
formData.append('currentDir', this.currentDir)
formData.append('description', this.description)
io.post('resources/create', res => {
diff --git
a/dolphinscheduler-ui/src/js/module/components/fileUpdate/resourceChildUpdate.vue
b/dolphinscheduler-ui/src/js/module/components/fileUpdate/resourceChildUpdate.vue
index 4bc438f..fedb2b2 100755
---
a/dolphinscheduler-ui/src/js/module/components/fileUpdate/resourceChildUpdate.vue
+++
b/dolphinscheduler-ui/src/js/module/components/fileUpdate/resourceChildUpdate.vue
@@ -174,7 +174,7 @@
formData.append('file', this.file)
formData.append('type', this.type)
formData.append('name', this.name)
- formData.append('pid', this.pid)
+ formData.append('pid', this.id)
formData.append('currentDir', this.currentDir)
formData.append('description', this.description)
io.post('resources/create', res => {