-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathDataDescription.vue
67 lines (60 loc) · 2.02 KB
/
DataDescription.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<template>
<div class="space-y-4 md:space-y-8">
<DropdownCard>
<template #title> Expected Data Format </template>
<!-- Sample dataset link and instructions -->
<div
class="mb-5 text-left"
v-show="task.displayInformation.sampleDatasetLink !== undefined"
>
<b>Don't have any data?</b> You can download an example dataset
<a
id="data-link-download"
target="_blank"
class="underline text-blue-400"
:href="task.displayInformation.sampleDatasetLink"
>here</a
>. <br /><span
v-html="task.displayInformation.sampleDatasetInstructions"
/><br />
</div>
<div v-if="task.displayInformation.dataFormatInformation !== undefined">
<div v-html="task.displayInformation.dataFormatInformation" />
<br />
</div>
<!-- Tabular data example -->
<div v-if="task.displayInformation.dataExampleText !== undefined">
<span v-html="task.displayInformation.dataExampleText" /><br />
<div
v-if="['tabular', 'text'].includes(task.trainingInformation.dataType)"
class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"
>
<span
v-for="(column, idx) in task.displayInformation.dataExample"
:key="idx"
>
<span class="font-bold">{{ column.columnName }}:</span>
{{ column.columnData }}
</span>
</div>
</div>
<!-- Image data example -->
<div v-if="task.displayInformation.dataExampleImage !== undefined">
<br />
<img
class="mx-auto"
:src="task.displayInformation.dataExampleImage"
alt="Error! Image not found"
/>
</div>
</DropdownCard>
</div>
</template>
<script setup lang="ts">
import type { DataType, Task } from "@epfml/discojs";
import DropdownCard from "@/components/containers/DropdownCard.vue";
interface Props {
task: Task<DataType>;
}
const _ = defineProps<Props>();
</script>