Skip to content

Commit

Permalink
[Feture-3327][ui]Add the function of re-uploading files in the resour…
Browse files Browse the repository at this point in the history
…ce center (#3394)

* Before creating a workflow, clear the canvas

* [Fix-3256][ui] herry pick commit from dev for Fix admin user info update error (#3306)

* [Feture-3327][ui]Add the function of re-uploading files in the resource center

Co-authored-by: wuchunfu <319355703@qq.com>
  • Loading branch information
break60 and wuchunfu authored Aug 4, 2020
1 parent 811fd48 commit 78672b0
Show file tree
Hide file tree
Showing 9 changed files with 814 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)">
</x-button>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<th scope="col" width="140">
<span>{{$t('Update Time')}}</span>
</th>
<th scope="col" width="140">
<th scope="col" width="160">
<span>{{$t('Operation')}}</span>
</th>
</tr>
Expand Down Expand Up @@ -79,6 +79,18 @@
@click="_edit(item,$index)"
icon="ans-icon-edit">
</x-button>

<x-button
type="info"
shape="circle"
size="xsmall"
data-toggle="tooltip"
:title="$t('ReUpload File')"
:disabled="item.directory? true: false"
@click="_reUpload(item)"
icon="ans-icon-upload">
</x-button>

<x-button
type="info"
shape="circle"
Expand Down Expand Up @@ -132,6 +144,7 @@
import { mapActions } from 'vuex'
import { filtTypeArr } from '../../_source/common'
import { bytesToSize } from '@/module/util/util'
import { findComponentDownward } from '@/module/util'
import { downloadFile } from '@/module/download'
import localStore from '@/module/util/localStorage'
export default {
Expand Down Expand Up @@ -161,6 +174,9 @@
this.$router.push({ path: `/resource/file/list/${item.id}` })
}
},
_reUpload (item) {
findComponentDownward(this.$root, 'roof-nav')._fileReUpload('FILE',item)
},
_downloadFile (item) {
downloadFile('/dolphinscheduler/resources/download', {
id: item.id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<th scope="col" width="140">
<span>{{$t('Update Time')}}</span>
</th>
<th scope="col" width="140">
<th scope="col" width="160">
<span>{{$t('Operation')}}</span>
</th>
</tr>
Expand Down Expand Up @@ -79,6 +79,18 @@
@click="_edit(item,$index)"
icon="ans-icon-edit">
</x-button>

<x-button
type="info"
shape="circle"
size="xsmall"
data-toggle="tooltip"
:title="$t('ReUpload File')"
:disabled="item.directory? true: false"
@click="_childReUpload(item)"
icon="ans-icon-upload">
</x-button>

<x-button
type="info"
shape="circle"
Expand Down Expand Up @@ -132,6 +144,7 @@
import { mapActions } from 'vuex'
import { filtTypeArr } from '../../_source/common'
import { bytesToSize } from '@/module/util/util'
import { findComponentDownward } from '@/module/util'
import { downloadFile } from '@/module/download'
import localStore from '@/module/util/localStorage'
Expand Down Expand Up @@ -162,6 +175,9 @@
this.$router.push({ path: `/resource/file/list/${item.id}` })
}
},
_childReUpload (item) {
findComponentDownward(this.$root, 'roof-nav')._fileChildReUpload('FILE',item,this.$route.params.id)
},
_downloadFile (item) {
downloadFile('/dolphinscheduler/resources/download', {
id: item.id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<th scope="col" width="140">
<span>{{$t('Update Time')}}</span>
</th>
<th scope="col" width="110">
<th scope="col" width="130">
<span>{{$t('Operation')}}</span>
</th>
</tr>
Expand Down Expand Up @@ -76,6 +76,16 @@
<span v-else>-</span>
</td>
<td>
<x-button
type="info"
shape="circle"
size="xsmall"
data-toggle="tooltip"
:title="$t('ReUpload File')"
:disabled="item.directory? true: false"
@click="_reUpload(item)"
icon="ans-icon-upload">
</x-button>
<x-button
type="info"
shape="circle"
Expand Down Expand Up @@ -127,6 +137,7 @@
import mRename from './rename'
import { downloadFile } from '@/module/download'
import { bytesToSize } from '@/module/util/util'
import { findComponentDownward } from '@/module/util'
import localStore from '@/module/util/localStorage'
export default {
name: 'udf-manage-list',
Expand Down Expand Up @@ -154,6 +165,12 @@
this.$router.push({ path: `/resource/udf/subUdfDirectory/${item.id}` })
}
},
/**
* File Upload
*/
_reUpload (item) {
findComponentDownward(this.$root, 'roof-nav')._fileReUpload('UDF', item)
},
_rtSize (val) {
return bytesToSize(parseInt(val))
},
Expand Down
Loading

0 comments on commit 78672b0

Please sign in to comment.