From af53c71a41120a1bef01bf4098aa814b1a2a935f Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Fri, 13 May 2022 18:54:15 +0200 Subject: [PATCH] Added DKIM key display in new UI. fix #2506 --- frontend/src/api/domains.js | 3 + .../src/components/domains/DKIMKeyViewer.vue | 29 ++++++++++ frontend/src/components/domains/DNSDetail.vue | 40 ++++++++++--- .../src/components/domains/DomainDKIMKey.vue | 57 +++++++++++++++++++ .../components/domains/DomainDNSConfig.vue | 30 ++++------ 5 files changed, 133 insertions(+), 26 deletions(-) create mode 100644 frontend/src/components/domains/DKIMKeyViewer.vue create mode 100644 frontend/src/components/domains/DomainDKIMKey.vue diff --git a/frontend/src/api/domains.js b/frontend/src/api/domains.js index 7482b05a9..94fba0a0a 100644 --- a/frontend/src/api/domains.js +++ b/frontend/src/api/domains.js @@ -35,6 +35,9 @@ export default { updateDomain (domainId, data) { return repository.put(`/${domainResource}/${domainId}/`, data) }, + patchDomain (domainId, data) { + return repository.patch(`/${domainResource}/${domainId}/`, data) + }, deleteDomain (domainId, data) { return repository.post(`/${domainResource}/${domainId}/delete/`, data) }, diff --git a/frontend/src/components/domains/DKIMKeyViewer.vue b/frontend/src/components/domains/DKIMKeyViewer.vue new file mode 100644 index 000000000..ece7b7d23 --- /dev/null +++ b/frontend/src/components/domains/DKIMKeyViewer.vue @@ -0,0 +1,29 @@ + + + diff --git a/frontend/src/components/domains/DNSDetail.vue b/frontend/src/components/domains/DNSDetail.vue index 303e533ec..d1b10d4d8 100644 --- a/frontend/src/components/domains/DNSDetail.vue +++ b/frontend/src/components/domains/DNSDetail.vue @@ -101,14 +101,16 @@ - - DKIM key - -
- + + DKIM key + +
+ Show key - mdi-refresh + + mdi-refresh +
Not generated
@@ -120,16 +122,25 @@ > + + + diff --git a/frontend/src/components/domains/DomainDNSConfig.vue b/frontend/src/components/domains/DomainDNSConfig.vue index c26b446d1..4707d1469 100644 --- a/frontend/src/components/domains/DomainDNSConfig.vue +++ b/frontend/src/components/domains/DomainDNSConfig.vue @@ -6,7 +6,7 @@ -

Here is an example of DNS configuration (bind format). Replace values between [ ] by the appropriate ones.

+

Here is an example of DNS configuration (bind format). Replace values between [ ] by the appropriate ones.

[IP address of your Modoboa serv dense >
DKIM
-
-{{ domain.dkim_key_selector }}._domain_key.{{ domain.name }}. IN TXT (
-  {{ splitKey(`v=DKIM1;k=rsa;p=${domain.dkim_public_key}`) }}
+
elevation="2" dense > -
Auto configuration
+
Auto configuration
 autoconfig.{{ domain.name }}. IN CNAME [hostname of your automx server]
 autodiscover.{{ domain.name }}. IN CNAME [hostname of your automx server]
@@ -78,24 +76,18 @@ autodiscover.{{ domain.name }}. IN CNAME [hostname of your au