import React from 'react' ; import { i18n } from '@kbn/i18n' ; import { CustomAssetsAccordionProps , CustomAssetsAccordion , } from '../../../../fleet/public' ; import { useKibana } from '../../../../../../src/plugins/kibana_react/public' ; import { ApmPluginStartDeps } from '../../plugin' ; export function ApmCustomAssetsExtension ( ) { const { http } = useKibana < ApmPluginStartDeps > ( ) . services ; const basePath = http ?. basePath . get ( ) ; const views = [ { name : i18n . translate ( 'xpack.apm.fleetIntegration.assets.name' , { defaultMessage : 'Services' , } ) , url : `${ basePath }/app/apm` , description : i18n . translate ( 'xpack.apm.fleetIntegration.assets.description' , { defaultMessage : 'View application traces and service maps in APM' } ) , } , ] ; return < CustomAssetsAccordion views = { views } initialIsOpen / > ; }