diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index d2dbb2acb..ac93bd90a 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -14,23 +14,23 @@
- {{ notification }}
+ v-model="snackbar"
+ :color="notificationColor"
+ :timeout="notificationTimeout"
+ top
+ >
+ {{ notification }}
-
-
- Close
-
-
+
+
+ Close
+
+
diff --git a/frontend/src/components/domains/DNSStatusChip.vue b/frontend/src/components/domains/DNSStatusChip.vue
new file mode 100644
index 000000000..42b0b50ea
--- /dev/null
+++ b/frontend/src/components/domains/DNSStatusChip.vue
@@ -0,0 +1,45 @@
+
+
+ {{ label }}
+
+
+
+
diff --git a/frontend/src/components/domains/DomainDNSConfig.vue b/frontend/src/components/domains/DomainDNSConfig.vue
new file mode 100644
index 000000000..128055312
--- /dev/null
+++ b/frontend/src/components/domains/DomainDNSConfig.vue
@@ -0,0 +1,76 @@
+
+
+
+
+ DNS configuration for {{ domain.name }}
+
+
+
+ Here is an example of DNS configuration (bind format). Replace values between [ ] by the appropriate ones.
+
+ MX
+
+mail.{{ domain.name }}. IN A [IP address of your Modoboa server]
+@ IN MX 10 mail.{{ domain.name }}.
+
+
+ SPF
+
+@ IN TXT "v=spf1 mx ~all"
+
+
+
+ DMARC
+
+_dmarc.{{ domain.name }}. IN TXT "v=DMARC1; p=quarantine; pct=100"
+
+
+ Auto configuration
+
+ autoconfig.{{ domain.name }}. IN CNAME [hostname of your automx server]
+autodiscover.{{ domain.name }}. IN CNAME [hostname of your automx server]
+
+
+
+
+
+ Close
+
+
+
+
+
+
diff --git a/frontend/src/components/domains/DomainDNSSummary.vue b/frontend/src/components/domains/DomainDNSSummary.vue
new file mode 100644
index 000000000..2786d8cf7
--- /dev/null
+++ b/frontend/src/components/domains/DomainDNSSummary.vue
@@ -0,0 +1,64 @@
+
+
+
+ DNS
+
+ mdi-information-outline
+
+
+
+
+
+ Status
+
+
+
+
+
+ DKIM key
+
+
+
+ Show key
+
+ mdi-refresh
+
+ Not generated
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/components/domains/DomainList.vue b/frontend/src/components/domains/DomainList.vue
index c553cbe8f..abd6f2f71 100644
--- a/frontend/src/components/domains/DomainList.vue
+++ b/frontend/src/components/domains/DomainList.vue
@@ -39,9 +39,10 @@
-
+
{{ item.name }}
+ (disabled)
|
{{ item.domainalias_count }} aliases
@@ -54,11 +55,7 @@
|
-
- {{ getDNSLabel(item.dns_global_status) }}
-
+
|
@@ -94,7 +91,12 @@
-
+
+
+
@@ -134,6 +136,7 @@ import domainApi from '@/api/domains'
import AdministratorList from './AdministratorList'
import ConfirmDialog from '@/components/layout/ConfirmDialog'
import DNSDetail from '@/components/domains/DNSDetail'
+import DNSStatusChip from './DNSStatusChip'
import DomainAliasForm from '@/components/domains/DomainAliasForm'
import DomainForm from '@/components/domains/DomainForm'
import MenuItems from '@/components/tools/MenuItems'
@@ -143,6 +146,7 @@ export default {
AdministratorList,
ConfirmDialog,
'dns-detail': DNSDetail,
+ 'dns-status-chip': DNSStatusChip,
DomainAliasForm,
DomainForm,
MenuItems
@@ -158,13 +162,14 @@ export default {
{ label: this.$gettext('Delete'), icon: 'mdi-delete-outline', onClick: this.deleteDomain, color: 'red' }
],
headers: [
- { text: 'Name', value: 'name' },
- { text: 'Aliases', value: 'domainalias_count' },
- { text: 'DNS status', value: 'dns_global_status', sortable: false, align: 'center' },
- { text: 'Sending limit', value: 'message_limit' },
- { text: 'Quota', value: 'allocated_quota_in_percent' },
+ { text: this.$gettext('Name'), value: 'name' },
+ { text: this.$gettext('Aliases'), value: 'domainalias_count' },
+ { text: this.$gettext('DNS status'), value: 'dns_global_status', sortable: false, align: 'center' },
+ { text: this.$gettext('Sending limit'), value: 'message_limit' },
+ { text: this.$gettext('Quota'), value: 'allocated_quota_in_percent' },
{ text: this.$gettext('Actions'), value: 'actions', sortable: false, align: 'right' }
],
+ keepDomainFolder: false,
selectedDomain: null,
selectedDomainAlias: null,
showAdminList: false,
@@ -200,8 +205,10 @@ export default {
if (!confirm) {
return
}
- this.$store.dispatch('domains/deleteDomain', { id: domain.pk }).then(resp => {
- bus.$emit('notification', { msg: this.$gettext('Domain delete') })
+ const data = { keep_folder: this.keepDomainFolder }
+ this.$store.dispatch('domains/deleteDomain', { id: domain.pk, data }).then(resp => {
+ bus.$emit('notification', { msg: this.$gettext('Domain deleted') })
+ this.keepDomainFolder = false
})
},
domainAliasDeleted () {
@@ -220,36 +227,6 @@ export default {
this.selectedDomainAlias = alias
this.showAliasForm = true
},
- getDNSLabel (value) {
- if (value === 'disabled') {
- return this.$gettext('Disabled')
- }
- if (value === 'pending') {
- return this.$gettext('Pending')
- }
- if (value === 'critical') {
- return this.$gettext('Problem')
- }
- if (value === 'ok') {
- return this.$gettext('Valid')
- }
- return this.$gettext('Unknown')
- },
- getDNSTagType (value) {
- if (value === 'disabled') {
- return ''
- }
- if (value === 'pending') {
- return 'info'
- }
- if (value === 'critical') {
- return 'error'
- }
- if (value === 'ok') {
- return 'success'
- }
- return 'warning'
- },
loadAliases ({ item, value }) {
if (!value) {
return
@@ -277,4 +254,7 @@ export default {
.v-text-field--outlined >>> fieldset {
border-color: #BFC5D2;
}
+.v-input--checkbox >>> .v-label {
+ font-size: 0.875rem !important;
+}
diff --git a/frontend/src/components/domains/DomainSummary.vue b/frontend/src/components/domains/DomainSummary.vue
new file mode 100644
index 000000000..f488f0902
--- /dev/null
+++ b/frontend/src/components/domains/DomainSummary.vue
@@ -0,0 +1,40 @@
+
+
+
+
+ Creation date
+ {{ domain.creation|date }}
+
+
+ Last modification date
+ {{ domain.last_modification|date }}
+
+
+ Quota
+ {{ domain.quota }} MB
+
+
+ Default mailbox quota
+ {{ domain.default_mailbox_quota }} MB
+
+
+ Daily sending limit
+ {{ domain.sending_limit }} messages
+
+
+ Mailboxes
+ {{ domain.mailbox_count }}
+
+
+ Aliases
+ {{ domain.mbalias_count }}
+
+
+
+
+
+
diff --git a/frontend/src/components/layout/ConfirmDialog.vue b/frontend/src/components/layout/ConfirmDialog.vue
index ca47183c9..60e8c8ae9 100644
--- a/frontend/src/components/layout/ConfirmDialog.vue
+++ b/frontend/src/components/layout/ConfirmDialog.vue
@@ -14,18 +14,20 @@
+ >
+ {{ message }}
+
+
{{ options.cancelLabel }}
{{ options.agreeLabel }}
diff --git a/frontend/src/components/parameters/ParametersForm.vue b/frontend/src/components/parameters/ParametersForm.vue
index ea01a2b2e..1171e6c99 100644
--- a/frontend/src/components/parameters/ParametersForm.vue
+++ b/frontend/src/components/parameters/ParametersForm.vue
@@ -15,24 +15,32 @@
-
+
diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js
index 35376f61f..e802aa136 100644
--- a/frontend/src/router/index.js
+++ b/frontend/src/router/index.js
@@ -25,6 +25,14 @@ const routes = [
requiresAuth: true
}
},
+ {
+ path: '/domains/:id',
+ name: 'DomainDetail',
+ component: () => import('../views/Domain.vue'),
+ meta: {
+ requiresAuth: true
+ }
+ },
{
path: '/parameters/:app',
name: 'ParametersEdit',
diff --git a/frontend/src/views/Domain.vue b/frontend/src/views/Domain.vue
new file mode 100644
index 000000000..34214799b
--- /dev/null
+++ b/frontend/src/views/Domain.vue
@@ -0,0 +1,70 @@
+
+
+
+ Domain {{ domain.name }}
+ mdi-circle-edit-outline
+
+ mdi-account-supervisor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modoboa/admin/api/v1/serializers.py b/modoboa/admin/api/v1/serializers.py
index a9fdc57bc..e93115678 100644
--- a/modoboa/admin/api/v1/serializers.py
+++ b/modoboa/admin/api/v1/serializers.py
@@ -52,12 +52,13 @@ class DomainSerializer(serializers.ModelSerializer):
"enable_dkim", "dkim_key_selector", "dkim_key_length",
"dkim_public_key", "dkim_private_key_path",
"mailbox_count", "mbalias_count", "domainalias_count",
- "dns_global_status", "message_limit"
+ "dns_global_status", "message_limit", "creation",
+ "last_modification"
)
read_only_fields = (
"pk", "dkim_public_key", "dns_global_status", "allocated_quota_in_percent"
"mailbox_count", "mbalias_count", "domainalias_count",
- "enable_dns_checks"
+ "enable_dns_checks", "creation", "last_modification"
)
def validate_name(self, value):
diff --git a/modoboa/admin/app_settings.py b/modoboa/admin/app_settings.py
index 016c5064d..aa0302b6f 100644
--- a/modoboa/admin/app_settings.py
+++ b/modoboa/admin/app_settings.py
@@ -334,13 +334,6 @@ GLOBAL_PARAMETERS_STRUCT = collections.OrderedDict([
" renamed or removed within Modoboa"
)
}),
- ("mailboxes_owner", {
- "label": ugettext_lazy("Mailboxes owner"),
- "display": "handle_mailboxes=true",
- "help_text": ugettext_lazy(
- "The UNIX account who owns mailboxes on the filesystem"
- )
- }),
("default_domain_quota", {
"label": ugettext_lazy("Default domain quota"),
"help_text": ugettext_lazy(
|