/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */ (window.apm_bundle_jsonpfunction=window.apm_bundle_jsonpfunction||[]).push([[31],{1034:function(e,t,a){"use strict";a.r(t);var n=a(17),i=a(0),l=a(1),r=a.n(l),s=a(40);const o=a.n(s).a.div.withConfig({displayName:"CentralizedContainer",componentId:"sc-4qu9rk-0"})(["display:flex;justify-content:center;align-items:center;"]);t.default=function({http:e,basePath:t,isDarkTheme:a,kibanaVersion:s}){const[u,c]=Object(l.useState)(),[p,m]=Object(l.useState)(!1);Object(l.useEffect)((()=>{!async function(){m(!0);try{const t=await e.get("/internal/apm/fleet/migration_check");c(t)}catch(e){m(!1),console.error("Error while fetching fleet details.",e)}m(!1)}()}),[e]);const g=!(null==u||!u.has_apm_integrations),d=!(null==u||!u.cloud_apm_migration_enabled),f=!(null==u||!u.has_cloud_agent_policy),E=!!(null==u?void 0:u.cloud_apm_package_policy),h=!(null==u||!u.has_required_role),_=d&&f&&!E&&h?`${t}/app/apm/settings/schema`:`${t}/app/integrations#/detail/apm/overview`;return p?r.a.createElement(o,null,r.a.createElement(n.EuiLoadingSpinner,null)):g?r.a.createElement(n.EuiButton,{"data-test-subj":"apmTutorialFleetInstructionsManageApmIntegrationInFleetButton",iconType:"gear",fill:!0,href:`${t}/app/integrations/detail/apm/policies`},i.i18n.translate("xpack.apm.tutorial.apmServer.fleet.manageApmIntegration.button",{defaultMessage:"Manage APM integration in Fleet"})):r.a.createElement(n.EuiPanel,null,r.a.createElement(n.EuiFlexGroup,null,r.a.createElement(n.EuiFlexItem,{grow:7},r.a.createElement(n.EuiCard,{display:"plain",textAlign:"left",title:i.i18n.translate("xpack.apm.tutorial.apmServer.fleet.title",{defaultMessage:"Elastic APM now available in Fleet!"}),description:i.i18n.translate("xpack.apm.tutorial.apmServer.fleet.message",{defaultMessage:"The APM integration installs Elasticsearch templates and ingest pipelines for APM data."}),footer:r.a.createElement(r.a.Fragment,null,r.a.createElement(n.EuiButton,{"data-test-subj":"apmTutorialFleetInstructionsApmIntegrationButton",iconType:"analyzeEvent",color:"success",href:_},i.i18n.translate("xpack.apm.tutorial.apmServer.fleet.apmIntegration.button",{defaultMessage:"APM integration"})),r.a.createElement(n.EuiSpacer,{size:"m"}),r.a.createElement(n.EuiText,{size:"s"},r.a.createElement("p",null,i.i18n.translate("xpack.apm.tutorial.apmServer.fleet.apmIntegration.description",{defaultMessage:"Fleet allows you to centrally manage Elastic Agents running the APM integration. The default option is to install a Fleet Server on a dedicated host. For setups without a dedicated host, we recommend following the instructions to install the standalone APM Server for your operating system by selecting the respective tab above."}))))})),r.a.createElement(n.EuiFlexItem,{grow:3},r.a.createElement(n.EuiImage,{src:`${t}/plugins/kibanaReact/assets/${a?"illustration_integrations_darkmode.svg":"illustration_integrations_lightmode.svg"}`,alt:"Illustration"}))))}}}]);