diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/_source/list.vue index cdcf0b0785..5fd0392ce0 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/_source/list.vue @@ -98,6 +98,7 @@ data-toggle="tooltip" :title="$t('View log')" icon="ans-icon-log" + :disabled="item.taskType==='SUB_PROCESS'? true: false" @click="_refreshLog(item)"> diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue index 4ccfa2eff3..4f256f8563 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue @@ -40,7 +40,7 @@ {{$t('Update Time')}} - + {{$t('Operation')}} @@ -79,6 +79,18 @@ @click="_edit(item,$index)" icon="ans-icon-edit"> + + + + {{$t('Update Time')}} - + {{$t('Operation')}} @@ -79,6 +79,18 @@ @click="_edit(item,$index)" icon="ans-icon-edit"> + + + + {{$t('Update Time')}} - + {{$t('Operation')}} @@ -76,6 +76,16 @@ - + + + + + + + + + diff --git a/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileReUpload.vue b/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileReUpload.vue new file mode 100644 index 0000000000..c0ea678470 --- /dev/null +++ b/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileReUpload.vue @@ -0,0 +1,335 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + + + diff --git a/dolphinscheduler-ui/src/js/module/components/nav/nav.vue b/dolphinscheduler-ui/src/js/module/components/nav/nav.vue index 7c82dc660e..697c3c5889 100644 --- a/dolphinscheduler-ui/src/js/module/components/nav/nav.vue +++ b/dolphinscheduler-ui/src/js/module/components/nav/nav.vue @@ -155,7 +155,9 @@ import { mapState, mapActions } from 'vuex' import { findComponentDownward } from '@/module/util/' import mFileUpdate from '@/module/components/fileUpdate/fileUpdate' + import mFileReUpload from '@/module/components/fileUpdate/fileReUpload' import mFileChildUpdate from '@/module/components/fileUpdate/fileChildUpdate' + import mFileChildReUpdate from '@/module/components/fileUpdate/fileChildReUpdate' import mResourceChildUpdate from '@/module/components/fileUpdate/resourceChildUpdate' import mDefinitionUpdate from '@/module/components/fileUpdate/definitionUpdate' import mProgressBar from '@/module/components/progressBar/progressBar' @@ -262,6 +264,91 @@ } }) }, + /* fileReUpload */ + _fileReUpload (type,item) { + if (this.progress) { + this._toggleArchive() + return + } + let self = this + let modal = this.$modal.dialog({ + closable: false, + showMask: true, + escClose: true, + className: 'update-file-modal', + transitionName: 'opacityp', + render (h) { + return h(mFileReUpload, { + on: { + onProgress (val) { + self.progress = val + }, + onUpdate () { + findComponentDownward(self.$root, `resource-list-index-${type}`)._updateList() + self.isUpdate = false + self.progress = 0 + modal.remove() + }, + onArchive () { + self.isUpdate = true + }, + close () { + self.progress = 0 + modal.remove() + } + }, + props: { + type: type, + fileName: item.fileName, + desc: item.description, + id: item.id + } + }) + } + }) + }, + _fileChildReUpload (type,item,data) { + if (this.progress) { + this._toggleArchive() + return + } + let self = this + let modal = this.$modal.dialog({ + closable: false, + showMask: true, + escClose: true, + className: 'update-file-modal', + transitionName: 'opacityp', + render (h) { + return h(mFileChildReUpdate, { + on: { + onProgress (val) { + self.progress = val + }, + onUpdate () { + findComponentDownward(self.$root, `resource-list-index-${type}`)._updateList(data) + self.isUpdate = false + self.progress = 0 + modal.remove() + }, + onArchive () { + self.isUpdate = true + }, + close () { + self.progress = 0 + modal.remove() + } + }, + props: { + type: type, + fileName: item.fileName, + desc: item.description, + id: item.id + } + }) + } + }) + }, _fileChildUpdate (type,data) { if (this.progress) { this._toggleArchive() @@ -372,7 +459,7 @@ computed: { ...mapState('user', ['userInfo']) }, - components: { mFileUpdate, mProgressBar, mDefinitionUpdate } + components: { mFileUpdate, mProgressBar, mDefinitionUpdate, mFileReUpload, mFileChildReUpdate } } diff --git a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js index 009f2bdac2..170ebbc38d 100755 --- a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js +++ b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js @@ -335,6 +335,7 @@ export default { Delete: 'Delete', 'Please enter keyword': 'Please enter keyword', 'File Upload': 'File Upload', + 'File ReUpload': 'File ReUpload', 'Drag the file into the current upload window': 'Drag the file into the current upload window', 'Drag area upload': 'Drag area upload', Upload: 'Upload', diff --git a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js index c38eac25e5..704b447b12 100755 --- a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js +++ b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js @@ -333,6 +333,7 @@ export default { 'Drag the file into the current upload window': '请将文件拖拽到当前上传窗口内!', 'Drag area upload': '拖动区域上传', Upload: '上传', + 'ReUpload File': '重新上传文件', 'Please enter file name': '请输入文件名', 'Please select the file to upload': '请选择要上传的文件', 'Resources manage': '资源中心',