diff --git a/x-pack/solutions/observability/plugins/observability_shared/public/components/page_template/page_template.tsx b/x-pack/solutions/observability/plugins/observability_shared/public/components/page_template/page_template.tsx index 1b7b0eac214f..93a827d951bd 100644 --- a/x-pack/solutions/observability/plugins/observability_shared/public/components/page_template/page_template.tsx +++ b/x-pack/solutions/observability/plugins/observability_shared/public/components/page_template/page_template.tsx @@ -24,6 +24,7 @@ import type { KibanaPageTemplateKibanaDependencies, } from '@kbn/shared-ux-page-kibana-template'; +import type { SpacesPluginStart } from '@kbn/spaces-plugin/public'; import { NavNameWithBadge, hideBadge } from './nav_name_with_badge'; import { NavNameWithBetaBadge } from './nav_name_with_beta_badge'; @@ -111,7 +112,16 @@ export function ObservabilityPageTemplate({ const currentAppId = useObservable(currentAppId$, undefined); const { pathname: currentPath } = useLocation(); - const { services } = useKibana(); + const { services } = useKibana<{ spaces?: SpacesPluginStart }>(); + + const areAnnouncementsEnabled = services.notifications?.tours.isEnabled(); + const canManageSpaces = services.application?.capabilities.spaces?.manage; + + const SolutionViewSwitchCallout = services.spaces?.ui?.components?.getSolutionViewSwitchCallout; + const solutionNavFooter = + areAnnouncementsEnabled && canManageSpaces && SolutionViewSwitchCallout ? ( + + ) : undefined; const sideNavItems = useMemo>>( () => @@ -196,6 +206,7 @@ export function ObservabilityPageTemplate({ icon: 'logoObservability', items: sideNavItems, name: sideNavTitle, + footer: solutionNavFooter, } : undefined }