mirror of https://github.com/doccano/doccano.git
Browse Source
Merge pull request #1679 from doccano/enhancement/progress
Merge pull request #1679 from doccano/enhancement/progress
[Enhancement] Show progresspull/1681/head
Hiroki Nakayama
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 141 additions and 16 deletions
Split View
Diff Options
-
5backend/metrics/views.py
-
46frontend/components/tasks/sidebar/AnnotationProgress.vue
-
9frontend/composables/useExampleItem.ts
-
6frontend/domain/models/metrics/metrics.ts
-
3frontend/domain/models/metrics/metricsRepository.ts
-
14frontend/pages/projects/_id/image-classification/index.vue
-
12frontend/pages/projects/_id/intent-detection-and-slot-filling/index.vue
-
12frontend/pages/projects/_id/sequence-labeling/index.vue
-
14frontend/pages/projects/_id/sequence-to-sequence/index.vue
-
14frontend/pages/projects/_id/speech-to-text/index.vue
-
8frontend/pages/projects/_id/text-classification/index.vue
-
8frontend/repositories/metrics/apiMetricsRepository.ts
-
6frontend/services/application/metrics/metricsApplicationService.ts
@ -0,0 +1,46 @@ |
|||
<template> |
|||
<v-card> |
|||
<v-card-title>Progress</v-card-title> |
|||
<v-card-text> |
|||
<v-list class="pt-0" dense> |
|||
<v-list-item class="pa-0"> |
|||
<v-list-item-title>Total</v-list-item-title> |
|||
<v-list-item-subtitle class="text-right" v-text="progress.total" /> |
|||
</v-list-item> |
|||
<v-list-item class="pa-0"> |
|||
<v-list-item-title>Complete</v-list-item-title> |
|||
<v-list-item-subtitle class="text-right" v-text="progress.complete" /> |
|||
</v-list-item> |
|||
</v-list> |
|||
<v-progress-linear |
|||
:value="percentage" |
|||
color="success" |
|||
height="25" |
|||
> |
|||
<template #default="{ value }"> |
|||
<strong>{{ value }}%</strong> |
|||
</template> |
|||
</v-progress-linear> |
|||
</v-card-text> |
|||
</v-card> |
|||
</template> |
|||
|
|||
<script lang="ts"> |
|||
import Vue, { PropType } from 'vue' |
|||
import { MyProgress } from '@/domain/models/metrics/metrics' |
|||
|
|||
export default Vue.extend({ |
|||
props: { |
|||
progress: { |
|||
type: Object as PropType<MyProgress>, |
|||
required: true |
|||
}, |
|||
}, |
|||
|
|||
computed: { |
|||
percentage(): number { |
|||
return Math.ceil(this.progress.complete / this.progress.total * 100) |
|||
} |
|||
} |
|||
}) |
|||
</script> |
@ -1,7 +1,8 @@ |
|||
import { Distribution, Progress } from '~/domain/models/metrics/metrics' |
|||
import { Distribution, Progress, MyProgress } from '~/domain/models/metrics/metrics' |
|||
|
|||
export interface MetricsRepository { |
|||
fetchCategoryDistribution(projectId: string): Promise<Distribution> |
|||
fetchSpanDistribution(projectId: string): Promise<Distribution> |
|||
fetchMemberProgress(projectId: string): Promise<Progress> |
|||
fetchMyProgress(projectId: string): Promise<MyProgress> |
|||
} |
Write
Preview
Loading…
Cancel
Save