Skip to content

Commit

Permalink
Add downtime monitoring to site settings (#98250)
Browse files Browse the repository at this point in the history
* Add downtime monitoring to site settings

* Add downtime monitoring to server settings

* Revert "Add downtime monitoring to server settings"

This reverts commit 01a79c5.

* Reapply "Add downtime monitoring to server settings"

This reverts commit a0ae9ba.

* Revert "Add downtime monitoring to site settings"

This reverts commit c207080.
  • Loading branch information
lsl authored Jan 14, 2025
1 parent b6527c8 commit bef0800
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions client/hosting/server-settings/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -101,13 +102,15 @@ type AllCardsProps = {
isBusinessTrial?: boolean;
siteId: number | null;
siteSlug: string | null;
isJetpack: boolean | null;
};

const AllCards = ( {
isAdvancedHostingDisabled,
isBasicHostingDisabled,
siteId,
siteSlug,
isJetpack,
}: AllCardsProps ) => {
const allCards: CardEntry[] = [
{
Expand Down Expand Up @@ -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 ) {
Expand Down Expand Up @@ -282,6 +293,7 @@ const ServerSettings = ( { fetchUpdatedData }: ServerSettingsProps ) => {
isBusinessTrial={ isBusinessTrial && ! hasTransfer }
siteId={ siteId }
siteSlug={ siteSlug }
isJetpack={ isJetpack }
/>
</MasonryGrid>
</WrapperComponent>
Expand Down
13 changes: 13 additions & 0 deletions client/hosting/server-settings/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit bef0800

Please sign in to comment.