diff --git a/x-pack/plugins/observability_solution/apm/public/components/routing/templates/apm_main_template/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/routing/templates/apm_main_template/index.tsx index e536ed9456801..f4ef2044a38c7 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/routing/templates/apm_main_template/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/routing/templates/apm_main_template/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiFlexGroup, EuiFlexItem, EuiPageHeaderProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiPageHeaderProps } from '@elastic/eui'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { entityCentricExperience } from '@kbn/observability-plugin/common'; import { ObservabilityPageTemplateProps } from '@kbn/observability-shared-plugin/public'; @@ -132,35 +132,24 @@ export function ApmMainTemplate({ noDataConfig, }); - const rightSideItems = [...(showServiceGroupSaveButton ? [] : [])]; - const sanitizedPath = getPathForFeedback(window.location.pathname); - const pageHeaderTitle = ( - - {pageHeader?.pageTitle ?? pageTitle} - - - - - - - {environmentFilter && } - - - - ); + const rightSideItems = [ + ...(showServiceGroupSaveButton ? [] : []), + ...(environmentFilter ? [] : []), + , + ]; const [dismissedEntitiesInventoryCallout, setdismissedEntitiesInventoryCallout] = useLocalStorage( `apm.dismissedEntitiesInventoryCallout`, @@ -180,7 +169,7 @@ export function ApmMainTemplate({ pageHeader={{ rightSideItems, ...pageHeader, - pageTitle: pageHeaderTitle, + pageTitle: pageHeader?.pageTitle ?? pageTitle, children: ( {showEntitiesInventoryCallout ? (