- Implemented file upload functionality for datasets using multipart requests. - Added file size and type validation using VineJS. - Added file name length validation. - Added file scan to remove infected files. - Implemented aggregated upload limit to prevent exceeding the server's capacity. - Added error handling for file upload failures, including temporary file cleanup. - Updated the `DatasetController` to handle file uploads, validation, and database transactions. - Updated the `bodyparser.ts` config to process the file upload manually. - Updated the `api.ts` routes to fetch the statistic data. - Updated the `main.ts` store to fetch the statistic data. - Updated the `Dashboard.vue` to display the submitters only for administrator role. - Updated the `CardBoxWidget.vue` to display the submitters. - Updated the `ServerError.vue` to use the LayoutGuest.vue. - Updated the `AuthController.ts` and `start/routes.ts` to handle the database connection errors. - Updated the `app/exceptions/handler.ts` to handle the database connection errors. - Updated the `package.json` to use the correct version of the `@adonisjs/bodyparser`.
67 lines
1.8 KiB
Vue
67 lines
1.8 KiB
Vue
<script lang="ts" setup>
|
|
import { mdiCog } from '@mdi/js';
|
|
import CardBox from '@/Components/CardBox.vue';
|
|
import NumberDynamic from '@/Components/NumberDynamic.vue';
|
|
import BaseIcon from '@/Components/BaseIcon.vue';
|
|
import BaseLevel from '@/Components/BaseLevel.vue';
|
|
import PillTagTrend from '@/Components/PillTagTrend.vue';
|
|
import BaseButton from '@/Components/BaseButton.vue';
|
|
|
|
defineProps({
|
|
number: {
|
|
type: Number,
|
|
default: 0,
|
|
},
|
|
icon: {
|
|
type: String,
|
|
default: null,
|
|
},
|
|
prefix: {
|
|
type: String,
|
|
default: null,
|
|
},
|
|
suffix: {
|
|
type: String,
|
|
default: null,
|
|
},
|
|
label: {
|
|
type: String,
|
|
default: null,
|
|
},
|
|
color: {
|
|
type: String,
|
|
default: null,
|
|
},
|
|
trend: {
|
|
type: String,
|
|
default: null,
|
|
},
|
|
trendType: {
|
|
type: String,
|
|
default: null,
|
|
},
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<CardBox>
|
|
<BaseLevel v-if="trend" class="mb-3" mobile>
|
|
<PillTagTrend :trend="trend" :trend-type="trendType" small />
|
|
<BaseButton :icon="mdiCog" icon-w="w-4" icon-h="h-4" color="white" small />
|
|
</BaseLevel>
|
|
<BaseLevel v-else class="mb-3" mobile>
|
|
<BaseIcon v-if="icon" :path="icon" size="48" w="w-4" h="h-4" :class="color" />
|
|
</BaseLevel>
|
|
<BaseLevel mobile>
|
|
<div>
|
|
<h3 class="text-lg leading-tight text-gray-500 dark:text-slate-400">
|
|
{{ label }}
|
|
</h3>
|
|
<h1 class="text-3xl leading-tight font-semibold">
|
|
<NumberDynamic :value="number" :prefix="prefix" :suffix="suffix" />
|
|
</h1>
|
|
</div>
|
|
<BaseIcon v-if="icon" :path="icon" size="48" w="" h="h-16" :class="color" />
|
|
</BaseLevel>
|
|
</CardBox>
|
|
</template>
|