From bef0800c6a40f27cc4c33a5e373ae1c50fc17abc Mon Sep 17 00:00:00 2001 From: Louis Laugesen <louis.laugesen@gmail.com> Date: Tue, 14 Jan 2025 15:53:38 +1100 Subject: [PATCH] Add downtime monitoring to site settings (#98250) * Add downtime monitoring to site settings * Add downtime monitoring to server settings * Revert "Add downtime monitoring to server settings" This reverts commit 01a79c535c3f7340a322f54e033100c05a71ee13. * Reapply "Add downtime monitoring to server settings" This reverts commit a0ae9ba2618251f61b66aa96763bf7ec92fe64d6. * Revert "Add downtime monitoring to site settings" This reverts commit c207080e40276130c641fb8713693705f2700dab. --- client/hosting/server-settings/main.tsx | 12 ++++++++++++ client/hosting/server-settings/style.scss | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/client/hosting/server-settings/main.tsx b/client/hosting/server-settings/main.tsx index bf5eeac4f369d..a530fcfda3c8f 100644 --- a/client/hosting/server-settings/main.tsx +++ b/client/hosting/server-settings/main.tsx @@ -29,6 +29,7 @@ import TrackComponentView from 'calypso/lib/analytics/track-component-view'; import { TrialAcknowledgeModal } from 'calypso/my-sites/plans/trials/trial-acknowledge/acknowlege-modal'; import { WithOnclickTrialRequest } from 'calypso/my-sites/plans/trials/trial-acknowledge/with-onclick-trial-request'; import TrialBanner from 'calypso/my-sites/plans/trials/trial-banner'; +import JetpackMonitor from 'calypso/my-sites/site-settings/form-jetpack-monitor'; import SiteAdminInterface from 'calypso/my-sites/site-settings/site-admin-interface'; import CacheCard from 'calypso/sites/settings/caching/form'; import DefensiveModeCard from 'calypso/sites/settings/web-server/defensive-mode-form'; @@ -101,6 +102,7 @@ type AllCardsProps = { isBusinessTrial?: boolean; siteId: number | null; siteSlug: string | null; + isJetpack: boolean | null; }; const AllCards = ( { @@ -108,6 +110,7 @@ const AllCards = ( { isBasicHostingDisabled, siteId, siteSlug, + isJetpack, }: AllCardsProps ) => { const allCards: CardEntry[] = [ { @@ -154,6 +157,14 @@ const AllCards = ( { type: 'advanced', } ); + if ( isJetpack && siteId ) { + allCards.push( { + feature: 'jetpack-monitor', + content: <JetpackMonitor />, + type: 'basic', + } ); + } + const availableTypes: CardEntry[ 'type' ][] = []; if ( ! isAdvancedHostingDisabled ) { @@ -282,6 +293,7 @@ const ServerSettings = ( { fetchUpdatedData }: ServerSettingsProps ) => { isBusinessTrial={ isBusinessTrial && ! hasTransfer } siteId={ siteId } siteSlug={ siteSlug } + isJetpack={ isJetpack } /> </MasonryGrid> </WrapperComponent> diff --git a/client/hosting/server-settings/style.scss b/client/hosting/server-settings/style.scss index 6993bcedad66d..053bc6cdf779f 100644 --- a/client/hosting/server-settings/style.scss +++ b/client/hosting/server-settings/style.scss @@ -97,3 +97,16 @@ transform: rotate(360deg); } } + +// Jetpack downtime monitoring hack: Duplicates style from site-settings/style.scss +.site-settings__child-settings { + margin: 16px 48px 0; +} + +// Jetpack downtime monitoring hack: Duplicates style from site-settings/style.scss +.support-info + .jetpack-module-toggle, +.support-info + .components-toggle-control, +.support-info + .custom-content-types__module-settings, +.support-info + .verbum-comments-toggle { + display: flex; +} \ No newline at end of file