mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-18 09:53:56 +01:00
Added global monitoring section in new UI
It also includes a graphic about accounts creation and global parameters for maillog app.
This commit is contained in:
@@ -184,9 +184,14 @@ export default {
|
||||
},
|
||||
{
|
||||
icon: 'mdi-history',
|
||||
text: this.$gettext('Logs'),
|
||||
text: this.$gettext('Monitoring'),
|
||||
roles: ['SuperAdmins', 'Resellers', 'DomainAdmins'],
|
||||
children: [
|
||||
{
|
||||
text: this.$gettext('Statistics'),
|
||||
to: { name: 'Statistics' },
|
||||
roles: ['SuperAdmins']
|
||||
},
|
||||
{
|
||||
text: this.$gettext('Audit trail'),
|
||||
to: { name: 'AuditTrail' },
|
||||
|
||||
@@ -65,7 +65,14 @@ export default {
|
||||
apexchart: VueApexCharts,
|
||||
DateField
|
||||
},
|
||||
props: ['domain', 'graphicSet', 'graphicName'],
|
||||
props: {
|
||||
domain: {
|
||||
type: Object,
|
||||
required: false
|
||||
},
|
||||
graphicSet: String,
|
||||
graphicName: String
|
||||
},
|
||||
computed: {
|
||||
title () {
|
||||
if (this.statistics) {
|
||||
@@ -133,8 +140,10 @@ export default {
|
||||
const args = {
|
||||
graphSet: this.graphicSet,
|
||||
period: this.period,
|
||||
graphicName: this.graphicName,
|
||||
searchQuery: this.domain.name
|
||||
graphicName: this.graphicName
|
||||
}
|
||||
if (this.domain) {
|
||||
args.searchQuery = this.domain.name
|
||||
}
|
||||
if (this.period === 'custom') {
|
||||
args.start = this.start
|
||||
@@ -149,7 +158,7 @@ export default {
|
||||
this.fetchStatistics()
|
||||
},
|
||||
watch: {
|
||||
graphicName (newValue) {
|
||||
graphicName () {
|
||||
this.$set(this.options, 'colors', this.getColors())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,18 +152,27 @@ const routes = [
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/logs/audit_trail',
|
||||
name: 'AuditTrail',
|
||||
component: () => import('../views/logs/AuditTrail.vue'),
|
||||
path: '/monitoring/statistics',
|
||||
name: 'Statistics',
|
||||
component: () => import('../views/monitoring/Statistics.vue'),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
allowedRoles: ['SuperAdmins']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/logs/messages',
|
||||
path: '/monitoring/audit_trail',
|
||||
name: 'AuditTrail',
|
||||
component: () => import('../views/monitoring/AuditTrail.vue'),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
allowedRoles: ['SuperAdmins']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/monitoring/messages',
|
||||
name: 'MessageLog',
|
||||
component: () => import('../views/logs/Messages.vue'),
|
||||
component: () => import('../views/monitoring/Messages.vue'),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
allowedRoles: ['DomainAdmins', 'SuperAdmins']
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-toolbar flat>
|
||||
<v-toolbar-title><translate>Statistics</translate></v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-layout class="pa-2">
|
||||
<v-row class="mt-2">
|
||||
<v-col cols="12">
|
||||
<time-serie-chart
|
||||
graphic-set="mailtraffic"
|
||||
graphic-name="averagetraffic"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<time-serie-chart
|
||||
graphic-set="mailtraffic"
|
||||
graphic-name="averagetrafficsize"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<time-serie-chart
|
||||
graphic-set="accountgraphicset"
|
||||
graphic-name="accountcreationgraphic"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-layout>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TimeSerieChart from '@/components/tools/TimeSerieChart'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
TimeSerieChart
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.v-toolbar {
|
||||
background-color: #f7f8fa !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user