feat(ftp): support upload, download and PASV rebind (#13)

Co-authored-by: E99p1ant <[email protected]>
This commit is contained in:
Li4n0
2021-05-05 12:59:50 +08:00
committed by GitHub
co-authored by E99p1ant
parent 3d8507e682
commit b39ee101f9
15 changed files with 374 additions and 146 deletions
+34 -1
View File
@@ -39,6 +39,18 @@
type="search"
:style="{ color: filtered ? '#108ee9' : undefined }"
/>
<span slot="method" slot-scope="method">
<a-tag v-if="method" :color="method==='UPLOAD'?'#eb2f96':'#02a7ff'">{{ method }}</a-tag>
</span>
<span slot="file" slot-scope="file">
<a-tag
v-if="file.id"
color="#f5222d"
><a target="_blank" :href="'/revsuit/api/file/ftp/'+file.id">TRUE</a> </a-tag>
<a-tag v-else color="#722ed1">
FALSE
</a-tag>
</span>
<span slot="time" slot-scope="time">
{{ new Date(time).format("yyyy-MM-dd hh:mm:ss") }}
@@ -65,7 +77,7 @@ import FilterDropdown from '@/components/FilterDropdown'
const colors = {
"CRASHED": "#f50",
"FINISHED": "#87d068"
"FINISHED": "#52c41a"
}
const columns = [
@@ -128,6 +140,24 @@ const columns = [
filterIcon: 'filterIcon',
},
},
{
title: 'METHOD',
dataIndex: 'method',
key: 'method',
scopedSlots: {
customRender: 'method',
filterDropdown: 'selectDropdown',
filterIcon: 'filterIcon',
},
},
{
title: 'FILE',
dataIndex: 'file',
key: 'file',
scopedSlots: {
customRender: 'file'
},
},
{
title: 'STATUS',
dataIndex: 'status',
@@ -169,6 +199,9 @@ export default {
};
},
methods: {
aa(file) {
console.log(file)
},
handleTableChange(pagination, filters, sorter) {
const pager = {...this.pagination};
pager.current = pagination.current;