From 4c1e796a564d9c11c454b970ab9260fd35b691e3 Mon Sep 17 00:00:00 2001 From: Tristan WAGNER Date: Wed, 27 Nov 2024 16:46:08 +0100 Subject: [PATCH] feat(zimbra): intialize diagnostics page ref: MANAGER-16089 Signed-off-by: Tristan WAGNER --- .../translations/domains/Messages_fr_FR.json | 3 +- .../domains/diagnostic/Messages_fr_FR.json | 72 ++++----- .../layout-helpers/Dashboard/Dashboard.tsx | 5 +- .../apps/zimbra/src/hooks/useDomain.ts | 25 ++- .../Domains/ActionButtonDomain.component.tsx | 15 ++ .../dashboard/Domains/Diagnostics.page.tsx | 142 ++++++++++++++++++ .../src/pages/dashboard/Domains/Domains.tsx | 32 ---- .../ModalDiagnosticDnsRecord.component.tsx | 2 +- .../Domains/ModalEditDomain.component.tsx | 6 +- .../zimbra/src/routes/routes.constants.ts | 5 +- .../manager/apps/zimbra/src/routes/routes.tsx | 40 +++++ .../zimbra/src/utils/iamAction.constants.ts | 1 + .../manager/apps/zimbra/src/utils/index.ts | 10 +- 13 files changed, 273 insertions(+), 85 deletions(-) create mode 100644 packages/manager/apps/zimbra/src/pages/dashboard/Domains/Diagnostics.page.tsx diff --git a/packages/manager/apps/zimbra/public/translations/domains/Messages_fr_FR.json b/packages/manager/apps/zimbra/public/translations/domains/Messages_fr_FR.json index 67aa9374151e..9045052a5b91 100644 --- a/packages/manager/apps/zimbra/public/translations/domains/Messages_fr_FR.json +++ b/packages/manager/apps/zimbra/public/translations/domains/Messages_fr_FR.json @@ -1,14 +1,13 @@ { "zimbra_domains_add_domain_title": "Ajouter un domaine", "zimbra_domains_datagrid_account_label": "Nombre de comptes", - "zimbra_domains_datagrid_diagnostic_label": "Diagnostique", "zimbra_domains_datagrid_diagnostic_configuration_ok": "Configuration OK", - "zimbra_domains_datagrid_diagnostic_tooltip_title": "Diagnostic {{ diagType }}", "zimbra_domains_datagrid_domain_label": "Domaine", "zimbra_domains_datagrid_organization_label": "Organisation", "zimbra_domains_datagrid_status_label": "Statut", "zimbra_domains_datagrid_account_number": "Nombre de comptes", "zimbra_domains_tooltip_configure": "Configurer", "zimbra_domains_tooltip_delete": "Supprimer", + "zimbra_domains_tooltip_diagnostics": "Diagnostiques", "zimbra_domains_tooltip_need_organization": "Veuillez d'abord configurer une organisation" } diff --git a/packages/manager/apps/zimbra/public/translations/domains/diagnostic/Messages_fr_FR.json b/packages/manager/apps/zimbra/public/translations/domains/diagnostic/Messages_fr_FR.json index ded8a920ff98..334aa9f84b5c 100644 --- a/packages/manager/apps/zimbra/public/translations/domains/diagnostic/Messages_fr_FR.json +++ b/packages/manager/apps/zimbra/public/translations/domains/diagnostic/Messages_fr_FR.json @@ -1,37 +1,39 @@ { - "zimbra_domain_modal_diagnostic_guide": "guide", - "zimbra_domain_modal_diagnostic_srv_title": "Diagnostique SRV", - "zimbra_domain_modal_diagnostic_srv_content_header": "Pour faciliter la configuration des boites mails sur vos terminaux, veuillez ajouter cette configuration à votre DNS (consulter notre )", - "zimbra_domain_modal_diagnostic_srv_content_header_ovh_hosted_domain_part1": "La configuration SRV permet la configuration automatique de vos boites mails sur vos clients de messagerie.", - "zimbra_domain_modal_diagnostic_srv_content_header_ovh_hosted_domain_part2": "Votre domaine est hébergé chez OVH Cloud, nous allons procéder à la configuration de votre champ SRV.", - "zimbra_domain_modal_diagnostic_srv_domain": "Domaine", - "zimbra_domain_modal_diagnostic_fields": "Champs", - "zimbra_domain_modal_diagnostic_srv_action_validate": "Valider", - "zimbra_domain_modal_diagnostic_srv_action_cancel": "Annuler", - "zimbra_domain_modal_diagnostic_srv_action_close": "Fermer", - "zimbra_domain_modal_diagnostic_field_subdomain": "Sous domaine :", - "zimbra_domain_modal_diagnostic_field_priority": "Priorité :", - "zimbra_domain_modal_diagnostic_field_weight": "Poids :", - "zimbra_domain_modal_diagnostic_field_port": "Port :", - "zimbra_domain_modal_diagnostic_field_target": "Cible :", - "zimbra_domain_modal_diagnostic_mx_title": "Diagnostique MX", - "zimbra_domain_modal_diagnostic_mx_content_header_part1": "La configuration de l'enregistrement MX permet de recevoir vos emails dans vos boites mail.", - "zimbra_domain_modal_diagnostic_mx_content_header_part2": "Votre domaine n'étant pas géré par OVH Cloud, cette action doit être effectuée manuellement.", - "zimbra_domain_modal_diagnostic_mx_content_header_part3": "Veuillez créer les champs MX sur ce domaine en donnant les mêmes informations que ci-dessous.", - "zimbra_domain_modal_diagnostic_mx_content_header_ovh_hosted_domain_part1": "La configuration de l'enregistrement MX permet de recevoir vos emails dans vos boites mail.", - "zimbra_domain_modal_diagnostic_mx_content_header_ovh_hosted_domain_part2": "Votre domaine étant hébergé chez OVH Cloud, nous allons effectuer la configuration pour vous.", - "zimbra_domain_modal_diagnostic_mx_content_header_ovh_hosted_domain_part3": "Souhaitez-vous commencer à recevoir les mails du domaine {{domain}} sur ce service ?", - "zimbra_domain_modal_diagnostic_mx_content_footer": "En cas de problème, consultez la documentation de votre fournisseur de domaine.", - "zimbra_domain_modal_diagnostic_mx_action_validate": "Confirmer", - "zimbra_domain_modal_diagnostic_mx_action_test": "Tester", - "zimbra_domain_modal_diagnostic_mx_action_cancel": "Annuler", - "zimbra_domain_modal_diagnostic_mx_action_close": "Fermer", - "zimbra_domain_modal_diagnostic_spf_title": "Diagnostique SPF", - "zimbra_domain_modal_diagnostic_spf_content_header": "Si le domaine n'est pas géré par le même identifiant client que le service Exchange ou si votre domaine n'est pas hébergé chez OVHcloud, la configuration automatique n'est pas possible. Veuillez créer le champ SPF sur ce domaine manuellement en donnant les mêmes informations que ci-dessous.", - "zimbra_domain_modal_diagnostic_spf_content_header_ovh_hosted_domain_part1": "SPF permet de valider qu'OVHCloud est un émetteur légitime de mails avec votre nom de domaine.", - "zimbra_domain_modal_diagnostic_spf_content_header_ovh_hosted_domain_part2": "Votre domaine étant hébergé chez OVHCloud, nous pouvons procéder à la configuration automatique.", - "zimbra_domain_modal_diagnostic_spf_content_header_ovh_hosted_domain_part3": "Souhaitez-vous effectuer la configuration ?", - "zimbra_domain_modal_diagnostic_spf_action_cancel": "Annuler", - "zimbra_domain_modal_diagnostic_spf_action_close": "Fermer", - "zimbra_domain_modal_diagnostic_spf_action_validate": "Ok" + "zimbra_domain_diagnostic_cta_back": "Retour aux domaines", + "zimbra_domain_diagnostic_guide": "guide", + "zimbra_domain_diagnostic_subtitle": "Diagnostiques du domaine {{domain}}", + "zimbra_domain_diagnostic_srv_title": "Diagnostique SRV", + "zimbra_domain_diagnostic_srv_content_header": "Pour faciliter la configuration des boites mails sur vos terminaux, veuillez ajouter cette configuration à votre DNS (consulter notre )", + "zimbra_domain_diagnostic_srv_content_header_ovh_hosted_domain_part1": "La configuration SRV permet la configuration automatique de vos boites mails sur vos clients de messagerie.", + "zimbra_domain_diagnostic_srv_content_header_ovh_hosted_domain_part2": "Votre domaine est hébergé chez OVH Cloud, nous allons procéder à la configuration de votre champ SRV.", + "zimbra_domain_diagnostic_srv_domain": "Domaine", + "zimbra_domain_diagnostic_fields": "Champs", + "zimbra_domain_diagnostic_srv_action_validate": "Valider", + "zimbra_domain_diagnostic_srv_action_cancel": "Annuler", + "zimbra_domain_diagnostic_srv_action_close": "Fermer", + "zimbra_domain_diagnostic_field_subdomain": "Sous domaine :", + "zimbra_domain_diagnostic_field_priority": "Priorité :", + "zimbra_domain_diagnostic_field_weight": "Poids :", + "zimbra_domain_diagnostic_field_port": "Port :", + "zimbra_domain_diagnostic_field_target": "Cible :", + "zimbra_domain_diagnostic_mx_title": "Diagnostique MX", + "zimbra_domain_diagnostic_mx_content_header_part1": "La configuration de l'enregistrement MX permet de recevoir vos emails dans vos boites mail.", + "zimbra_domain_diagnostic_mx_content_header_part2": "Votre domaine n'étant pas géré par OVH Cloud, cette action doit être effectuée manuellement.", + "zimbra_domain_diagnostic_mx_content_header_part3": "Veuillez créer les champs MX sur ce domaine en donnant les mêmes informations que ci-dessous.", + "zimbra_domain_diagnostic_mx_content_header_ovh_hosted_domain_part1": "La configuration de l'enregistrement MX permet de recevoir vos emails dans vos boites mail.", + "zimbra_domain_diagnostic_mx_content_header_ovh_hosted_domain_part2": "Votre domaine étant hébergé chez OVH Cloud, nous allons effectuer la configuration pour vous.", + "zimbra_domain_diagnostic_mx_content_header_ovh_hosted_domain_part3": "Souhaitez-vous commencer à recevoir les mails du domaine {{domain}} sur ce service ?", + "zimbra_domain_diagnostic_mx_content_footer": "En cas de problème, consultez la documentation de votre fournisseur de domaine.", + "zimbra_domain_diagnostic_mx_action_validate": "Confirmer", + "zimbra_domain_diagnostic_mx_action_test": "Tester", + "zimbra_domain_diagnostic_mx_action_cancel": "Annuler", + "zimbra_domain_diagnostic_mx_action_close": "Fermer", + "zimbra_domain_diagnostic_spf_title": "Diagnostique SPF", + "zimbra_domain_diagnostic_spf_content_header": "Si le domaine n'est pas géré par le même identifiant client que le service Exchange ou si votre domaine n'est pas hébergé chez OVHcloud, la configuration automatique n'est pas possible. Veuillez créer le champ SPF sur ce domaine manuellement en donnant les mêmes informations que ci-dessous.", + "zimbra_domain_diagnostic_spf_content_header_ovh_hosted_domain_part1": "SPF permet de valider qu'OVHCloud est un émetteur légitime de mails avec votre nom de domaine.", + "zimbra_domain_diagnostic_spf_content_header_ovh_hosted_domain_part2": "Votre domaine étant hébergé chez OVHCloud, nous pouvons procéder à la configuration automatique.", + "zimbra_domain_diagnostic_spf_content_header_ovh_hosted_domain_part3": "Souhaitez-vous effectuer la configuration ?", + "zimbra_domain_diagnostic_spf_action_cancel": "Annuler", + "zimbra_domain_diagnostic_spf_action_close": "Fermer", + "zimbra_domain_diagnostic_spf_action_validate": "Ok" } diff --git a/packages/manager/apps/zimbra/src/components/layout-helpers/Dashboard/Dashboard.tsx b/packages/manager/apps/zimbra/src/components/layout-helpers/Dashboard/Dashboard.tsx index fd7890dff4f1..25004a83822f 100644 --- a/packages/manager/apps/zimbra/src/components/layout-helpers/Dashboard/Dashboard.tsx +++ b/packages/manager/apps/zimbra/src/components/layout-helpers/Dashboard/Dashboard.tsx @@ -89,7 +89,10 @@ export const Dashboard: React.FC = () => { urls.domains, urls.domainsEdit, urls.domainsDelete, - urls.domains_diagnostic, + urls.domains_diagnostic_mx, + urls.domains_diagnostic_spf, + urls.domains_diagnostic_srv, + urls.domains_diagnostic_dkim, ], platformId, ), diff --git a/packages/manager/apps/zimbra/src/hooks/useDomain.ts b/packages/manager/apps/zimbra/src/hooks/useDomain.ts index b94ffe06f7b5..32ba6ead19d4 100644 --- a/packages/manager/apps/zimbra/src/hooks/useDomain.ts +++ b/packages/manager/apps/zimbra/src/hooks/useDomain.ts @@ -1,18 +1,33 @@ -import { useQuery } from '@tanstack/react-query'; +import { + useQuery, + UseQueryOptions, + UseQueryResult, +} from '@tanstack/react-query'; import { usePlatform } from '@/hooks'; import { + DomainType, getZimbraPlatformDomainDetail, getZimbraPlatformDomainQueryKey, } from '@/api/domain'; -export const useDomain = (domainId: string, noCache?: boolean) => { +type UseDomainParams = Omit & { + domainId: string; +}; + +export const useDomain = (params: UseDomainParams) => { + const { domainId, ...options } = params; const { platformId } = usePlatform(); return useQuery({ queryKey: getZimbraPlatformDomainQueryKey(platformId, domainId), queryFn: () => getZimbraPlatformDomainDetail(platformId, domainId), - enabled: !!platformId && !!domainId, - gcTime: noCache ? 0 : 5000, - }); + enabled: (query) => + (typeof options.enabled === 'function' + ? options.enabled(query) + : typeof options.enabled !== 'boolean' || options.enabled) && + !!platformId && + !!domainId, + ...options, + }) as UseQueryResult; }; diff --git a/packages/manager/apps/zimbra/src/pages/dashboard/Domains/ActionButtonDomain.component.tsx b/packages/manager/apps/zimbra/src/pages/dashboard/Domains/ActionButtonDomain.component.tsx index c71eb5bd0c53..55b551f1d607 100644 --- a/packages/manager/apps/zimbra/src/pages/dashboard/Domains/ActionButtonDomain.component.tsx +++ b/packages/manager/apps/zimbra/src/pages/dashboard/Domains/ActionButtonDomain.component.tsx @@ -34,6 +34,14 @@ const ActionButtonDomain: React.FC = ({ navigate(hrefEditDomain); }; + const hrefDiagnosticsDomain = useGenerateUrl('./diagnostics/mx', 'path', { + domainId: domainItem.id, + }); + + const handleDiagnosticsDomainClick = () => { + navigate(hrefDiagnosticsDomain); + }; + const actionItems = [ { id: 1, @@ -44,6 +52,13 @@ const ActionButtonDomain: React.FC = ({ }, { id: 2, + onclick: handleDiagnosticsDomainClick, + label: t('zimbra_domains_tooltip_diagnostics'), + urn: platformUrn, + iamActions: [IAM_ACTIONS.domain.edit /* TODO diagnose */], + }, + { + id: 3, onclick: handleDeleteDomainClick, label: t('zimbra_domains_tooltip_delete'), urn: platformUrn, diff --git a/packages/manager/apps/zimbra/src/pages/dashboard/Domains/Diagnostics.page.tsx b/packages/manager/apps/zimbra/src/pages/dashboard/Domains/Diagnostics.page.tsx new file mode 100644 index 000000000000..4ae66efe1975 --- /dev/null +++ b/packages/manager/apps/zimbra/src/pages/dashboard/Domains/Diagnostics.page.tsx @@ -0,0 +1,142 @@ +import React, { useEffect, useState } from 'react'; +import { + LinkType, + Links, + IconLinkAlignmentType, + Subtitle, +} from '@ovh-ux/manager-react-components'; + +import { useTranslation } from 'react-i18next'; +import { + useLocation, + useMatches, + useNavigate, + useSearchParams, +} from 'react-router-dom'; +import { ODS_LINK_COLOR } from '@ovhcloud/ods-components'; +import { useGenerateUrl, useDomain, usePlatform } from '@/hooks'; +import Loading from '@/components/Loading/Loading'; +import TabsPanel, { + activatedTabs, + computePathMatchers, + TabItemProps, +} from '@/components/layout-helpers/Dashboard/TabsPanel'; +import { urls } from '@/routes/routes.constants'; + +export default function DomainDiagnostics() { + const { t } = useTranslation('domains/diagnostic'); + const { platformId } = usePlatform(); + const location = useLocation(); + const [searchParams] = useSearchParams(); + const params = Object.fromEntries(searchParams.entries()); + const navigate = useNavigate(); + const goBackUrl = useGenerateUrl('../..', 'href'); + const onClose = () => navigate(goBackUrl); + + const matches = useMatches(); + + console.log(matches); + const domainId = searchParams.get('domainId'); + const { data: domain, isLoading } = useDomain({ + domainId, + }); + + const pathMatcherMXTab = computePathMatchers( + [urls.domains_diagnostic_mx], + platformId, + ); + + const pathMatcherSRVTab = computePathMatchers( + [urls.domains_diagnostic_srv], + platformId, + ); + + const pathMatcherSPFTab = computePathMatchers( + [urls.domains_diagnostic_spf], + platformId, + ); + + const pathMatcherDKIMTab = computePathMatchers( + [urls.domains_diagnostic_dkim], + platformId, + ); + + const [isMXTab, setIsMXTab] = useState( + activatedTabs(pathMatcherMXTab, location), + ); + const [isSRVTab, setIsSRVTab] = useState( + activatedTabs(pathMatcherSRVTab, location), + ); + const [isSPFTab, setIsSPFTab] = useState( + activatedTabs(pathMatcherSPFTab, location), + ); + const [isDKIMTab, setIsDKIMTab] = useState( + activatedTabs(pathMatcherDKIMTab, location), + ); + + const tabsList: TabItemProps[] = [ + { + name: 'mx', + title: 'MX', + to: useGenerateUrl('../diagnostics/mx', 'path', params), + pathMatchers: pathMatcherMXTab, + }, + { + name: 'srv', + title: 'SRV', + to: useGenerateUrl('../diagnostics/srv', 'path', params), + pathMatchers: pathMatcherSRVTab, + }, + { + name: 'spf', + title: 'SPF', + to: useGenerateUrl('../diagnostics/spf', 'path', params), + pathMatchers: pathMatcherSPFTab, + }, + { + name: 'dkim', + title: 'DKIM', + to: useGenerateUrl('../diagnostics/dkim', 'path', params), + pathMatchers: pathMatcherDKIMTab, + }, + ]; + + useEffect(() => { + setIsMXTab(activatedTabs(pathMatcherMXTab, location)); + setIsSRVTab(activatedTabs(pathMatcherSRVTab, location)); + setIsSPFTab(activatedTabs(pathMatcherSPFTab, location)); + setIsDKIMTab(activatedTabs(pathMatcherDKIMTab, location)); + console.log(isMXTab, isSRVTab, isSPFTab, isDKIMTab); + }, [location, isLoading]); + + if (isLoading) { + return ; + } + + return ( +
+ + + {t('zimbra_domain_diagnostic_subtitle', { + domain: domain?.currentState.name, + })} + +
+ +
+ {isMXTab &&
MX
} + {isSRVTab &&
SRV
} + {isSPFTab &&
SPF
} + {isDKIMTab &&
DKIM
} +
+ ); +} diff --git a/packages/manager/apps/zimbra/src/pages/dashboard/Domains/Domains.tsx b/packages/manager/apps/zimbra/src/pages/dashboard/Domains/Domains.tsx index c46061b71c2f..bc8c0e64bff2 100644 --- a/packages/manager/apps/zimbra/src/pages/dashboard/Domains/Domains.tsx +++ b/packages/manager/apps/zimbra/src/pages/dashboard/Domains/Domains.tsx @@ -27,11 +27,9 @@ import { IAM_ACTIONS } from '@/utils/iamAction.constants'; import { DATAGRID_REFRESH_INTERVAL, DATAGRID_REFRESH_ON_MOUNT, - DnsRecordType, FEATURE_FLAGS, } from '@/utils'; import Loading from '@/components/Loading/Loading'; -import { DiagnosticBadge } from '@/components/DiagnosticBadge'; import { DomainType } from '@/api/domain/type'; import { AccountStatistics, ResourceStatus } from '@/api/api.type'; import { BadgeStatus } from '@/components/BadgeStatus'; @@ -67,36 +65,6 @@ const columns: DatagridColumn[] = [ ), label: 'zimbra_domains_datagrid_account_number', }, - { - id: 'diagnostic', - cell: (item) => { - return ( -
- - - - -
- ); - }, - label: 'zimbra_domains_datagrid_diagnostic_label', - }, { id: 'status', cell: (item) => , diff --git a/packages/manager/apps/zimbra/src/pages/dashboard/Domains/ModalDiagnosticDnsRecord.component.tsx b/packages/manager/apps/zimbra/src/pages/dashboard/Domains/ModalDiagnosticDnsRecord.component.tsx index 92c6f4d1849f..23bd62dc4723 100644 --- a/packages/manager/apps/zimbra/src/pages/dashboard/Domains/ModalDiagnosticDnsRecord.component.tsx +++ b/packages/manager/apps/zimbra/src/pages/dashboard/Domains/ModalDiagnosticDnsRecord.component.tsx @@ -80,7 +80,7 @@ export default function ModalDiagnosticDnsRecord( ); const [domain, setDomain] = useState(); - const { data, isLoading } = useDomain(domainId); + const { data, isLoading } = useDomain({ domainId }); useEffect(() => { setDomain(data); diff --git a/packages/manager/apps/zimbra/src/pages/dashboard/Domains/ModalEditDomain.component.tsx b/packages/manager/apps/zimbra/src/pages/dashboard/Domains/ModalEditDomain.component.tsx index 9aefa63b7ea4..b6a8e11f61cc 100644 --- a/packages/manager/apps/zimbra/src/pages/dashboard/Domains/ModalEditDomain.component.tsx +++ b/packages/manager/apps/zimbra/src/pages/dashboard/Domains/ModalEditDomain.component.tsx @@ -40,9 +40,9 @@ export default function ModalEditDomain() { const { platformId } = usePlatform(); - const { data: detailDomain, isLoading: isLoadingDomain } = useDomain( - editDomainId, - ); + const { data: detailDomain, isLoading: isLoadingDomain } = useDomain({ + domainId: editDomainId, + }); const { data: organizationsList, isLoading: isLoadingOrganizations, diff --git a/packages/manager/apps/zimbra/src/routes/routes.constants.ts b/packages/manager/apps/zimbra/src/routes/routes.constants.ts index 336e40dadef8..eedbc22dfb28 100644 --- a/packages/manager/apps/zimbra/src/routes/routes.constants.ts +++ b/packages/manager/apps/zimbra/src/routes/routes.constants.ts @@ -8,7 +8,10 @@ export const urls = { domains: '/:serviceName/domains', domainsEdit: '/:serviceName/domains/edit', domainsDelete: '/:serviceName/domains/delete', - domains_diagnostic: '/:serviceName/domains/diagnostic', + domains_diagnostic_mx: '/:serviceName/domains/diagnostics/mx', + domains_diagnostic_srv: '/:serviceName/domains/diagnostics/srv', + domains_diagnostic_spf: '/:serviceName/domains/diagnostics/spf', + domains_diagnostic_dkim: '/:serviceName/domains/diagnostics/dkim', email_accounts: '/:serviceName/email_accounts', email_accounts_add: '/:serviceName/email_accounts/add', email_accounts_edit: '/:serviceName/email_accounts/settings', diff --git a/packages/manager/apps/zimbra/src/routes/routes.tsx b/packages/manager/apps/zimbra/src/routes/routes.tsx index 89880b6aea43..8511b341631b 100644 --- a/packages/manager/apps/zimbra/src/routes/routes.tsx +++ b/packages/manager/apps/zimbra/src/routes/routes.tsx @@ -118,6 +118,46 @@ export const Routes: any = [ breadcrumbLabel: 'zimbra_dashboard_domains_delete', }, }, + { + path: 'diagnostics/mx', + ...lazyRouteConfig(() => + import('@/pages/dashboard/Domains/Diagnostics.page'), + ), + handle: { + isOverridePage: true, + breadcrumbLabel: 'zimbra_dashboard_domains_diagnostics_mx', + }, + }, + { + path: 'diagnostics/srv', + ...lazyRouteConfig(() => + import('@/pages/dashboard/Domains/Diagnostics.page'), + ), + handle: { + isOverridePage: true, + breadcrumbLabel: 'zimbra_dashboard_domains_diagnostics_srv', + }, + }, + { + path: 'diagnostics/spf', + ...lazyRouteConfig(() => + import('@/pages/dashboard/Domains/Diagnostics.page'), + ), + handle: { + isOverridePage: true, + breadcrumbLabel: 'zimbra_dashboard_domains_diagnostics_spf', + }, + }, + { + path: 'diagnostics/dkim', + ...lazyRouteConfig(() => + import('@/pages/dashboard/Domains/Diagnostics.page'), + ), + handle: { + isOverridePage: true, + breadcrumbLabel: 'zimbra_dashboard_domains_diagnostics_dkim', + }, + }, ], }, { diff --git a/packages/manager/apps/zimbra/src/utils/iamAction.constants.ts b/packages/manager/apps/zimbra/src/utils/iamAction.constants.ts index c31fc82f84e1..d43513fb05d1 100644 --- a/packages/manager/apps/zimbra/src/utils/iamAction.constants.ts +++ b/packages/manager/apps/zimbra/src/utils/iamAction.constants.ts @@ -20,6 +20,7 @@ export const IAM_ACTIONS = { create: `${IAM_ACTIONS_PREFIX}domain/create`, delete: `${IAM_ACTIONS_PREFIX}domain/delete`, edit: `${IAM_ACTIONS_PREFIX}domain/edit`, + diagnose: `${IAM_ACTIONS_PREFIX}domain/diagnose`, }, mailingList: { create: `${IAM_ACTIONS_PREFIX}mailingList/create`, diff --git a/packages/manager/apps/zimbra/src/utils/index.ts b/packages/manager/apps/zimbra/src/utils/index.ts index 2914998fdbb9..0b74c460ee3a 100644 --- a/packages/manager/apps/zimbra/src/utils/index.ts +++ b/packages/manager/apps/zimbra/src/utils/index.ts @@ -6,11 +6,11 @@ export * from './date'; export const DATAGRID_REFRESH_INTERVAL = 5_000; export const DATAGRID_REFRESH_ON_MOUNT = 'always'; export const FEATURE_FLAGS = { - ALIAS: false, - REDIRECTIONS: false, - REDIRECTIONS_EDIT: false, - AUTOREPLIES: false, - MAILINGLISTS: false, + ALIAS: true, + REDIRECTIONS: true, + REDIRECTIONS_EDIT: true, + AUTOREPLIES: true, + MAILINGLISTS: true, DOMAIN_DIAGNOSTICS: false, DOMAIN_DNS_CONFIGURATION: false, DOMAIN_NOT_OVH: false,