WIP: amavis quarantine frontend

This commit is contained in:
Antoine Nguyen
2025-09-05 13:32:00 +02:00
parent 4b1a6b6166
commit 33005248c9
12 changed files with 144 additions and 5 deletions
+7
View File
@@ -0,0 +1,7 @@
import repository from './repository'
export default {
getQuarantineContent(params) {
return repository.get('/amavis/quarantine/', { params })
},
}
@@ -0,0 +1,49 @@
<template>
<v-card class="mt-6">
<v-data-table-server
v-model="selected"
:headers="headers"
:items="messages"
:search="search"
:loading="loading"
:items-length="totalMessages"
:page="currentPage"
:items-per-page="itemsPerPageR"
item-value="pk"
elevation="0"
show-select
:sort-by="sortByR"
@update:options="updatedOptions"
>
<template #top>
<v-text-field
v-model="search"
prepend-inner-icon="mdi-magnify"
:placeholder="$gettext('Search in messages')"
variant="outlined"
single-line
flat
hide-details
density="compact"
class="flex-grow-0 w-33 mr-4"
clearable
@click:clear="fetchContent"
@keyup.enter="submitSearch"
></v-text-field>
</template>
</v-data-table-server>
</v-card>
</template>
<script setup>
import { ref } from 'vue'
import api from '@/api/amavis'
const messages = ref([])
const search = ref('')
const totalMessages = ref(0)
const fetchContent = () => {}
const submitSearch = () => {}
</script>
+17
View File
@@ -426,6 +426,23 @@ const routes = [
},
],
},
{
path: 'quarantine',
component: () => import('@/layouts/user/UserLayout.vue'),
meta: {
requiresAuth: true,
},
children: [
{
path: '',
name: 'QuarantineView',
component: () => import('@/views/quarantine/QuarantineView.vue'),
meta: {
requiresAuth: true,
},
},
],
},
],
},
{
@@ -0,0 +1,11 @@
<template>
<div class="text-h5 ml-4">
{{ $gettext('Quarantine') }}
</div>
<QuarantineList />
</template>
<script setup>
import QuarantineList from '@/components/quarantine/QuarantineList'
</script>