Browse Source

Replace fileUrl with url

pull/2096/head
Hironsan 1 year ago
parent
commit
fdbdf26eee
8 changed files with 37 additions and 38 deletions
  1. 8
      frontend/components/example/AudioList.vue
  2. 8
      frontend/components/example/ImageList.vue
  3. 3
      frontend/domain/models/example/example.ts
  4. 12
      frontend/pages/projects/_id/image-captioning/index.vue
  5. 4
      frontend/pages/projects/_id/image-classification/index.vue
  6. 16
      frontend/pages/projects/_id/object-detection/index.vue
  7. 16
      frontend/pages/projects/_id/segmentation/index.vue
  8. 8
      frontend/pages/projects/_id/speech-to-text/index.vue

8
frontend/components/example/AudioList.vue

@ -34,8 +34,8 @@
{{ item.isConfirmed ? 'Finished' : 'In progress' }}
</v-chip>
</template>
<template #[`item.fileUrl`]="{ item }">
<audio controls :src="item.fileUrl" class="mt-2">
<template #[`item.url`]="{ item }">
<audio controls :src="item.url" class="mt-2">
Your browser does not support the
<code>audio</code> element.
</audio>
@ -55,8 +55,8 @@
</template>
<script lang="ts">
import Vue, { PropType } from 'vue'
import { mdiMagnify } from '@mdi/js'
import Vue, { PropType } from 'vue'
import { DataOptions } from 'vuetify/types'
import { ExampleDTO } from '~/services/application/example/exampleData'
@ -107,7 +107,7 @@ export default Vue.extend({
},
{
text: 'Audio',
value: 'fileUrl',
value: 'url',
sortable: false
},
{

8
frontend/components/example/ImageList.vue

@ -34,9 +34,9 @@
{{ item.isConfirmed ? 'Finished' : 'In progress' }}
</v-chip>
</template>
<template #[`item.fileUrl`]="{ item }">
<template #[`item.url`]="{ item }">
<v-img
:src="item.fileUrl"
:src="item.url"
aspect-ratio="1"
height="150"
max-height="150"
@ -59,8 +59,8 @@
</template>
<script lang="ts">
import Vue, { PropType } from 'vue'
import { mdiMagnify } from '@mdi/js'
import Vue, { PropType } from 'vue'
import { DataOptions } from 'vuetify/types'
import { ExampleDTO } from '~/services/application/example/exampleData'
@ -111,7 +111,7 @@ export default Vue.extend({
},
{
text: 'Image',
value: 'fileUrl',
value: 'url',
sortable: false
},
{

3
frontend/domain/models/example/example.ts

@ -12,8 +12,7 @@ export class ExampleItem {
get url() {
const l = this.fileUrl.indexOf('media/')
const r = this.fileUrl.indexOf('media/', l + 1)
return this.fileUrl.slice(0, l) + this.fileUrl.slice(r)
return this.fileUrl.slice(l - 1)
}
}

12
frontend/pages/projects/_id/image-captioning/index.vue

@ -24,7 +24,7 @@
</template>
<template #content>
<v-card>
<v-img contain :src="image.fileUrl" :max-height="imageSize.height" class="grey lighten-2" />
<v-img contain :src="image.url" :max-height="imageSize.height" class="grey lighten-2" />
<seq2seq-box
:annotations="annotations"
@delete:annotation="remove"
@ -41,15 +41,15 @@
</template>
<script>
import _ from 'lodash'
import { mdiText, mdiFormatListBulleted } from '@mdi/js'
import { toRefs, useContext } from '@nuxtjs/composition-api'
import LayoutText from '@/components/tasks/layout/LayoutText'
import ListMetadata from '@/components/tasks/metadata/ListMetadata'
import AnnotationProgress from '@/components/tasks/sidebar/AnnotationProgress.vue'
import ToolbarLaptop from '@/components/tasks/toolbar/ToolbarLaptop'
import ToolbarMobile from '@/components/tasks/toolbar/ToolbarMobile'
import { useLabelList } from '@/composables/useLabelList'
import AnnotationProgress from '@/components/tasks/sidebar/AnnotationProgress.vue'
import { mdiFormatListBulleted, mdiText } from '@mdi/js'
import { toRefs, useContext } from '@nuxtjs/composition-api'
import _ from 'lodash'
import Seq2seqBox from '~/components/tasks/seq2seq/Seq2seqBox'
export default {
@ -202,7 +202,7 @@ export default {
self.imageSize.height = this.height
self.imageSize.width = this.width
}
img.src = val.fileUrl
img.src = val.url
}
}
}

4
frontend/pages/projects/_id/image-classification/index.vue

@ -43,7 +43,7 @@
/>
</v-card-title>
<v-divider />
<v-img contain :src="image.fileUrl" :max-height="imageSize.height" class="grey lighten-2" />
<v-img contain :src="image.url" :max-height="imageSize.height" class="grey lighten-2" />
</v-card>
</template>
<template #sidebar>
@ -210,7 +210,7 @@ export default {
self.imageSize.height = this.height
self.imageSize.width = this.width
}
img.src = val.fileUrl
img.src = val.url
}
}
}

16
frontend/pages/projects/_id/object-detection/index.vue

@ -42,7 +42,7 @@
<v-bounding-box
:rectangles="filteredRegions"
:highlight-id="highlightId"
:image-url="image.fileUrl"
:image-url="image.url"
:labels="bboxLabels"
:selected-label="selectedLabel"
:scale="scale"
@ -71,18 +71,18 @@
</template>
<script>
import _ from 'lodash'
import { mdiText, mdiFormatListBulleted } from '@mdi/js'
import { toRefs, useContext } from '@nuxtjs/composition-api'
import VBoundingBox from '@/components/tasks/boundingBox/VBoundingBox.vue'
import RegionList from '@/components/tasks/image/RegionList.vue'
import LayoutText from '@/components/tasks/layout/LayoutText'
import ListMetadata from '@/components/tasks/metadata/ListMetadata'
import AnnotationProgress from '@/components/tasks/sidebar/AnnotationProgress.vue'
import ButtonZoom from '@/components/tasks/toolbar/buttons/ButtonZoom.vue'
import ToolbarLaptop from '@/components/tasks/toolbar/ToolbarLaptop'
import ToolbarMobile from '@/components/tasks/toolbar/ToolbarMobile'
import { useLabelList } from '@/composables/useLabelList'
import AnnotationProgress from '@/components/tasks/sidebar/AnnotationProgress.vue'
import VBoundingBox from '@/components/tasks/boundingBox/VBoundingBox.vue'
import RegionList from '@/components/tasks/image/RegionList.vue'
import ButtonZoom from '@/components/tasks/toolbar/buttons/ButtonZoom.vue'
import { mdiFormatListBulleted, mdiText } from '@mdi/js'
import { toRefs, useContext } from '@nuxtjs/composition-api'
import _ from 'lodash'
export default {
components: {

16
frontend/pages/projects/_id/segmentation/index.vue

@ -41,7 +41,7 @@
<v-divider />
<v-segmentation
:highlight-id="highlightId"
:image-url="image.fileUrl"
:image-url="image.url"
:labels="bboxLabels"
:polygons="filteredRegions"
:selected-label="selectedLabel"
@ -71,18 +71,18 @@
</template>
<script>
import _ from 'lodash'
import { mdiText, mdiFormatListBulleted } from '@mdi/js'
import { toRefs, useContext } from '@nuxtjs/composition-api'
import RegionList from '@/components/tasks/image/RegionList.vue'
import LayoutText from '@/components/tasks/layout/LayoutText'
import ListMetadata from '@/components/tasks/metadata/ListMetadata'
import VSegmentation from '@/components/tasks/segmentation/VSegmentation.vue'
import AnnotationProgress from '@/components/tasks/sidebar/AnnotationProgress.vue'
import ButtonZoom from '@/components/tasks/toolbar/buttons/ButtonZoom.vue'
import ToolbarLaptop from '@/components/tasks/toolbar/ToolbarLaptop'
import ToolbarMobile from '@/components/tasks/toolbar/ToolbarMobile'
import { useLabelList } from '@/composables/useLabelList'
import AnnotationProgress from '@/components/tasks/sidebar/AnnotationProgress.vue'
import VSegmentation from '@/components/tasks/segmentation/VSegmentation.vue'
import RegionList from '@/components/tasks/image/RegionList.vue'
import ButtonZoom from '@/components/tasks/toolbar/buttons/ButtonZoom.vue'
import { mdiFormatListBulleted, mdiText } from '@mdi/js'
import { toRefs, useContext } from '@nuxtjs/composition-api'
import _ from 'lodash'
export default {
components: {

8
frontend/pages/projects/_id/speech-to-text/index.vue

@ -17,7 +17,7 @@
<v-overlay :value="isLoading">
<v-progress-circular indeterminate size="64" />
</v-overlay>
<audio-viewer :source="item.fileUrl" class="mb-5" />
<audio-viewer :source="item.url" class="mb-5" />
<seq2seq-box
:text="item.text"
:annotations="annotations"
@ -34,14 +34,14 @@
</template>
<script>
import _ from 'lodash'
import LayoutText from '@/components/tasks/layout/LayoutText'
import ListMetadata from '@/components/tasks/metadata/ListMetadata'
import AnnotationProgress from '@/components/tasks/sidebar/AnnotationProgress.vue'
import ToolbarLaptop from '@/components/tasks/toolbar/ToolbarLaptop'
import ToolbarMobile from '@/components/tasks/toolbar/ToolbarMobile'
import AnnotationProgress from '@/components/tasks/sidebar/AnnotationProgress.vue'
import Seq2seqBox from '~/components/tasks/seq2seq/Seq2seqBox'
import _ from 'lodash'
import AudioViewer from '~/components/tasks/audio/AudioViewer'
import Seq2seqBox from '~/components/tasks/seq2seq/Seq2seqBox'
export default {
components: {

Loading…
Cancel
Save