Browse Source

Delete import/export pages

pull/341/head
Hironsan 5 years ago
parent
commit
151d5db3a2
3 changed files with 0 additions and 151 deletions
  1. 4
      frontend/components/organisms/TheSideBar.vue
  2. 27
      frontend/pages/projects/_id/download/index.vue
  3. 120
      frontend/pages/projects/_id/upload/index.vue

4
frontend/components/organisms/TheSideBar.vue

@ -34,10 +34,6 @@ export default {
{ icon: 'mdi-database', text: 'Dataset', link: 'dataset' },
{ icon: 'label', text: 'Labels', link: 'labels' },
{ icon: 'person', text: 'Members', link: 'members' },
{ divider: true },
{ icon: 'backup', text: 'Import', link: 'upload' },
{ icon: 'archive', text: 'Export', link: 'download' },
{ divider: true },
{ icon: 'settings', text: 'Guideline', link: 'guideline' },
{ icon: 'chat_bubble', text: 'Statistics', link: 'statistics' }
]

27
frontend/pages/projects/_id/download/index.vue

@ -1,27 +0,0 @@
<template>
<v-card>
<v-card-title>
Export
</v-card-title>
<v-card-text>
<a :href="url" download="docs.json">Download</a>
</v-card-text>
</v-card>
</template>
<script>
export default {
layout: 'project',
computed: {
url() {
const projectId = this.$route.params.id
return `/v1/projects/${projectId}/docs/download`
}
},
validate({ params }) {
return /^\d+$/.test(params.id)
}
}
</script>

120
frontend/pages/projects/_id/upload/index.vue

@ -1,120 +0,0 @@
<template>
<v-content>
<v-container
fluid
fill-height
>
<v-layout>
<v-flex>
<v-form
ref="form"
lazy-validation
>
<v-card>
<v-card flat>
<v-card-title>
Objective
</v-card-title>
<v-card-text>
<v-radio-group v-model="selectedTask">
<v-radio
v-for="(task, i) in tasks"
:key="i"
:label="task"
:value="task"
/>
</v-radio-group>
</v-card-text>
</v-card>
<v-card flat max-width="800">
<v-card-title>
Import text items
</v-card-title>
<v-card-text>
<v-radio-group v-model="selectedFormat">
<v-radio
v-for="(format, i) in formats"
:key="i"
:label="format.text"
:value="format"
/>
</v-radio-group>
<v-sheet color="black white--text" class="pa-3">
{{ selectedFormat }}
</v-sheet>
</v-card-text>
</v-card>
<v-card flat max-width="500">
<v-card-title>
Select file
</v-card-title>
<v-card-text>
<v-file-input :accept="acceptType" label="File input" />
</v-card-text>
</v-card>
<v-card-actions>
<v-btn>
Import Dataset
</v-btn>
</v-card-actions>
</v-card>
</v-form>
</v-flex>
</v-layout>
</v-container>
</v-content>
</template>
<script>
export default {
layout: 'project',
data() {
return {
selectedTask: null,
selectedFormat: null,
tasks: [
'Text Classification',
'Sequence Labeling',
'Seq2seq'
],
formats: [
{
type: 'csv',
text: 'Upload a CSV file from your computer',
accept: '.csv'
},
{
type: 'plain',
text: 'Upload text items from your computer',
accept: '.txt'
},
{
type: 'json',
text: 'Upload a JSON file from your computer',
accept: '.json,.jsonl'
}
]
}
},
computed: {
acceptType() {
if (this.selectedFormat) {
return this.selectedFormat.accept
} else {
return '.txt,.csv,.json,.jsonl'
}
}
},
methods: {
}
}
</script>
<style scoped>
body pre {
color: white;
}
</style>
Loading…
Cancel
Save