From b227f03fd837598c96e3c562bd65c00be6b22aaa Mon Sep 17 00:00:00 2001 From: Cristina Amico Date: Fri, 15 Apr 2022 18:45:48 +0200 Subject: [PATCH] [8.2] [Fleet] Add missing step showing K8 instructions for managed enrollment (#130295) (#130388) * [Fleet] Add missing step showing K8 instructions for managed enrollment (#130295) * [Fleet] Add missing step showing K85 instructions for managed enrollment * Fix checks * Remove duplicated text and clean up commands * Fix failing check (cherry picked from commit 92db72b7177fbedb48b466b28caa40c496cd3520) # Conflicts: # x-pack/plugins/translations/translations/fr-FR.json # x-pack/plugins/translations/translations/ja-JP.json # x-pack/plugins/translations/translations/zh-CN.json * Fix translations --- .../download_instructions.tsx | 187 ++++++++++++++++++ .../installation_message.tsx | 84 ++++---- .../steps/compute_steps.tsx | 25 ++- .../steps/download_step.tsx | 176 +---------------- .../steps/install_managed_agent_step.tsx | 17 +- .../steps/install_standalone_agent_step.tsx | 20 +- .../enrollment_instructions/index.tsx | 1 + .../install_section.tsx | 37 ++++ .../enrollment_instructions/manual/index.tsx | 50 ++--- .../manual/platform_selector.tsx | 18 +- .../server/services/elastic_agent_manifest.ts | 3 +- .../translations/translations/fr-FR.json | 1 - .../translations/translations/ja-JP.json | 1 - .../translations/translations/zh-CN.json | 1 - 14 files changed, 328 insertions(+), 293 deletions(-) create mode 100644 x-pack/plugins/fleet/public/components/agent_enrollment_flyout/download_instructions.tsx create mode 100644 x-pack/plugins/fleet/public/components/enrollment_instructions/install_section.tsx diff --git a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/download_instructions.tsx b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/download_instructions.tsx new file mode 100644 index 00000000000000..5134c6ff030605 --- /dev/null +++ b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/download_instructions.tsx @@ -0,0 +1,187 @@ +/* + * 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. + */ + +import React, { useEffect, useMemo, useState } from 'react'; +import { + EuiText, + EuiButton, + EuiSpacer, + EuiCode, + EuiFlexGroup, + EuiFlexItem, + EuiCopy, + EuiCodeBlock, +} from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { i18n } from '@kbn/i18n'; +import semverMajor from 'semver/functions/major'; +import semverMinor from 'semver/functions/minor'; +import semverPatch from 'semver/functions/patch'; + +import { useGetSettings, useKibanaVersion, useStartServices } from '../../hooks'; + +import { agentPolicyRouteService } from '../../../common'; + +import { sendGetK8sManifest } from '../../hooks/use_request/k8s'; + +interface Props { + hasFleetServer: boolean; + isK8s?: string; + enrollmentAPIKey?: string; +} + +export const DownloadInstructions: React.FunctionComponent = ({ + hasFleetServer, + isK8s, + enrollmentAPIKey, +}) => { + const kibanaVersion = useKibanaVersion(); + const core = useStartServices(); + const settings = useGetSettings(); + const kibanaVersionURLString = useMemo( + () => + `${semverMajor(kibanaVersion)}-${semverMinor(kibanaVersion)}-${semverPatch(kibanaVersion)}`, + [kibanaVersion] + ); + const { notifications } = core; + + const [yaml, setYaml] = useState(''); + const [fleetServer, setFleetServer] = useState(); + + useEffect(() => { + async function fetchK8sManifest() { + try { + if (isK8s !== 'IS_KUBERNETES') { + return; + } + const fleetServerHosts = settings.data?.item.fleet_server_hosts; + let host = ''; + if (fleetServerHosts !== undefined && fleetServerHosts.length !== 0) { + setFleetServer(fleetServerHosts[0]); + host = fleetServerHosts[0]; + } + const query = { fleetServer: host, enrolToken: enrollmentAPIKey }; + const res = await sendGetK8sManifest(query); + if (res.error) { + throw res.error; + } + + if (!res.data) { + throw new Error('No data while fetching agent manifest'); + } + + setYaml(res.data.item); + } catch (error) { + notifications.toasts.addError(error, { + title: i18n.translate('xpack.fleet.agentEnrollment.loadk8sManifestErrorTitle', { + defaultMessage: 'Error while fetching agent manifest', + }), + }); + } + } + fetchK8sManifest(); + }, [isK8s, notifications.toasts, enrollmentAPIKey, settings.data?.item.fleet_server_hosts]); + + const downloadDescription = hasFleetServer ? ( + + ) : isK8s === 'IS_KUBERNETES' ? ( + FLEET_URL, + FleetTokenVariable: FLEET_ENROLLMENT_TOKEN, + }} + /> + ) : ( + + ); + + const linuxUsers = + isK8s !== 'IS_KUBERNETES' ? ( + + ) : ( + '' + ); + + const k8sCopyYaml = + isK8s === 'IS_KUBERNETES' ? ( + + {(copy) => ( + + + + )} + + ) : ( + '' + ); + + const k8sYaml = + isK8s === 'IS_KUBERNETES' ? ( + + {yaml} + + ) : ( + '' + ); + + const downloadLink = + isK8s === 'IS_KUBERNETES' + ? core.http.basePath.prepend( + `${agentPolicyRouteService.getK8sFullDownloadPath()}?fleetServer=${fleetServer}&enrolToken=${enrollmentAPIKey}` + ) + : `https://www.elastic.co/downloads/past-releases/elastic-agent-${kibanaVersionURLString}`; + + const downloadMsg = + isK8s === 'IS_KUBERNETES' ? ( + + ) : ( + + ); + + return ( + <> + {downloadDescription} + + + <>{linuxUsers} + + + + + + <>{downloadMsg} + + + + <>{k8sCopyYaml} + + + + <>{k8sYaml} + + ); +}; diff --git a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/installation_message.tsx b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/installation_message.tsx index 6bb178921c2a95..81404df2eeabd6 100644 --- a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/installation_message.tsx +++ b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/installation_message.tsx @@ -5,7 +5,7 @@ * 2.0. */ import React, { useMemo } from 'react'; -import { EuiText, EuiLink } from '@elastic/eui'; +import { EuiText, EuiLink, EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import semverMajor from 'semver/functions/major'; @@ -14,7 +14,13 @@ import semverPatch from 'semver/functions/patch'; import { useKibanaVersion } from '../../hooks'; -export const InstallationMessage: React.FunctionComponent = () => { +import type { K8sMode } from './types'; + +interface Props { + isK8s?: K8sMode; +} + +export const InstallationMessage: React.FunctionComponent = ({ isK8s }) => { const kibanaVersion = useKibanaVersion(); const kibanaVersionURLString = useMemo( () => @@ -23,37 +29,47 @@ export const InstallationMessage: React.FunctionComponent = () => { ); return ( - - - - - ), - installationLink: ( - - - - ), - }} - /> - + <> + + {isK8s === 'IS_KUBERNETES' ? ( + + ) : ( + + + + ), + installationLink: ( + + + + ), + }} + /> + )} + + + ); }; diff --git a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/compute_steps.tsx b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/compute_steps.tsx index ad2451e023f159..8ce582a0b24f02 100644 --- a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/compute_steps.tsx +++ b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/compute_steps.tsx @@ -16,7 +16,7 @@ import type { FullAgentPolicy } from '../../../../common/types/models/agent_poli import { fullAgentPolicyToYaml, agentPolicyRouteService } from '../../../services'; -import { StandaloneInstructions } from '../../enrollment_instructions/standalone'; +import { StandaloneInstructions, ManualInstructions } from '../../enrollment_instructions'; import { useGetOneEnrollmentAPIKey, @@ -45,6 +45,7 @@ import { AgentEnrollmentConfirmationStep, InstallManagedAgentStep, IncomingDataConfirmationStep, + DownloadStep, } from '.'; export const StandaloneSteps: React.FunctionComponent = ({ @@ -163,7 +164,6 @@ export const StandaloneSteps: React.FunctionComponent = ({ InstallStandaloneAgentStep({ installCommand: standaloneInstallCommands, isK8s, - selectedPolicyId: selectedPolicy?.id, }) ); @@ -203,7 +203,9 @@ export const ManagedSteps: React.FunctionComponent = ({ onClickViewAgents, isK8s, installedPackagePolicy, + isFleetServerPolicySelected, }) => { + const kibanaVersion = useKibanaVersion(); const core = useStartServices(); const { docLinks } = core; const link = docLinks.links.fleet.troubleshooting; @@ -211,11 +213,14 @@ export const ManagedSteps: React.FunctionComponent = ({ const apiKey = useGetOneEnrollmentAPIKey(selectedApiKeyId); const apiKeyData = apiKey?.data; + const enrollToken = apiKey.data ? apiKey.data.item.api_key : ''; + const enrolledAgentIds = usePollingAgentCount(selectedPolicy?.id || ''); const fleetServerHosts = useMemo(() => { return settings?.fleet_server_hosts || []; }, [settings]); + const installManagedCommands = ManualInstructions(enrollToken, fleetServerHosts, kibanaVersion); const instructionsSteps = useMemo(() => { const steps: EuiContainedStepProps[] = !agentPolicy @@ -243,11 +248,17 @@ export const ManagedSteps: React.FunctionComponent = ({ ); } + if (isK8s === 'IS_KUBERNETES') { + steps.push( + DownloadStep(isFleetServerPolicySelected || false, isK8s || '', enrollToken || '') + ); + } + steps.push( InstallManagedAgentStep({ + installCommand: installManagedCommands, apiKeyData, selectedApiKeyId, - fleetServerHosts, isK8s, }) ); @@ -282,14 +293,16 @@ export const ManagedSteps: React.FunctionComponent = ({ setSelectedPolicyId, refreshAgentPolicies, selectionType, - apiKeyData, - fleetServerHosts, isK8s, + installManagedCommands, + apiKeyData, + enrolledAgentIds, mode, setMode, + isFleetServerPolicySelected, + enrollToken, onClickViewAgents, link, - enrolledAgentIds, agentDataConfirmed, installedPackagePolicy, ]); diff --git a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/download_step.tsx b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/download_step.tsx index 5004fc0a6444e7..2b0815fb64cde3 100644 --- a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/download_step.tsx +++ b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/download_step.tsx @@ -5,83 +5,18 @@ * 2.0. */ -import React, { useEffect, useMemo, useState } from 'react'; -import { - EuiText, - EuiButton, - EuiSpacer, - EuiCode, - EuiFlexGroup, - EuiFlexItem, - EuiCopy, - EuiCodeBlock, -} from '@elastic/eui'; -import { FormattedMessage } from '@kbn/i18n-react'; +import React from 'react'; import { i18n } from '@kbn/i18n'; -import semverMajor from 'semver/functions/major'; -import semverMinor from 'semver/functions/minor'; -import semverPatch from 'semver/functions/patch'; import type { EuiContainedStepProps } from '@elastic/eui/src/components/steps/steps'; -import { useGetSettings, useKibanaVersion, useStartServices } from '../../../hooks'; - -import { agentPolicyRouteService } from '../../../../common'; - -import { sendGetK8sManifest } from '../../../hooks/use_request/k8s'; +import { DownloadInstructions } from '../download_instructions'; export const DownloadStep = ( hasFleetServer: boolean, isK8s?: string, enrollmentAPIKey?: string ): EuiContainedStepProps => { - const kibanaVersion = useKibanaVersion(); - const core = useStartServices(); - const settings = useGetSettings(); - const kibanaVersionURLString = useMemo( - () => - `${semverMajor(kibanaVersion)}-${semverMinor(kibanaVersion)}-${semverPatch(kibanaVersion)}`, - [kibanaVersion] - ); - const { notifications } = core; - - const [yaml, setYaml] = useState(); - const [fleetServer, setFleetServer] = useState(); - - useEffect(() => { - async function fetchK8sManifest() { - try { - if (isK8s !== 'IS_KUBERNETES') { - return; - } - const fleetServerHosts = settings.data?.item.fleet_server_hosts; - let host = ''; - if (fleetServerHosts !== undefined && fleetServerHosts.length !== 0) { - setFleetServer(fleetServerHosts[0]); - host = fleetServerHosts[0]; - } - const query = { fleetServer: host, enrolToken: enrollmentAPIKey }; - const res = await sendGetK8sManifest(query); - if (res.error) { - throw res.error; - } - - if (!res.data) { - throw new Error('No data while fetching agent manifest'); - } - - setYaml(res.data.item); - } catch (error) { - notifications.toasts.addError(error, { - title: i18n.translate('xpack.fleet.agentEnrollment.loadk8sManifestErrorTitle', { - defaultMessage: 'Error while fetching agent manifest', - }), - }); - } - } - fetchK8sManifest(); - }, [isK8s, notifications.toasts, enrollmentAPIKey, settings.data?.item.fleet_server_hosts]); - const altTitle = isK8s === 'IS_KUBERNETES' ? i18n.translate('xpack.fleet.agentEnrollment.stepDownloadAgentForK8sTitle', { @@ -90,116 +25,21 @@ export const DownloadStep = ( : i18n.translate('xpack.fleet.agentEnrollment.stepDownloadAgentTitle', { defaultMessage: 'Download the Elastic Agent to your host', }); + const title = hasFleetServer ? i18n.translate('xpack.fleet.agentEnrollment.stepDownloadAgentForFleetServerTitle', { defaultMessage: 'Download the Fleet Server to a centralized host', }) : altTitle; - const altDownloadDescription = - isK8s === 'IS_KUBERNETES' ? ( - FLEET_URL, - FleetTokenVariable: FLEET_ENROLLMENT_TOKEN, - }} - /> - ) : ( - - ); - - const downloadDescription = hasFleetServer ? ( - - ) : ( - altDownloadDescription - ); - - const linuxUsers = - isK8s !== 'IS_KUBERNETES' ? ( - - ) : ( - '' - ); - - const k8sCopyYaml = - isK8s === 'IS_KUBERNETES' ? ( - - {(copy) => ( - - - - )} - - ) : ( - '' - ); - - const k8sYaml = - isK8s === 'IS_KUBERNETES' ? ( - - {yaml} - - ) : ( - '' - ); - - const downloadLink = - isK8s === 'IS_KUBERNETES' - ? core.http.basePath.prepend( - `${agentPolicyRouteService.getK8sFullDownloadPath()}?fleetServer=${fleetServer}&enrolToken=${enrollmentAPIKey}` - ) - : `https://www.elastic.co/downloads/past-releases/elastic-agent-${kibanaVersionURLString}`; - - const downloadMsg = - isK8s === 'IS_KUBERNETES' ? ( - - ) : ( - - ); - return { title, children: ( - <> - {downloadDescription} - - - <>{linuxUsers} - - - - - - <>{downloadMsg} - - - - <>{k8sCopyYaml} - - - - <>{k8sYaml} - + ), }; }; diff --git a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/install_managed_agent_step.tsx b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/install_managed_agent_step.tsx index f45ad22cd3eba0..b8d75f0f741f39 100644 --- a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/install_managed_agent_step.tsx +++ b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/install_managed_agent_step.tsx @@ -13,18 +13,21 @@ import type { EuiContainedStepProps } from '@elastic/eui/src/components/steps/st import type { GetOneEnrollmentAPIKeyResponse } from '../../../../common/types/rest_spec/enrollment_api_key'; -import { ManualInstructions } from '../../enrollment_instructions'; +import { InstallSection } from '../../enrollment_instructions/install_section'; +import type { CommandsByPlatform } from '../../../applications/fleet/sections/agents/agent_requirements_page/components/install_command_utils'; + +import type { K8sMode } from '../../agent_enrollment_flyout/types'; export const InstallManagedAgentStep = ({ + installCommand, selectedApiKeyId, apiKeyData, - fleetServerHosts, isK8s, }: { - fleetServerHosts: string[]; selectedApiKeyId?: string; apiKeyData?: GetOneEnrollmentAPIKeyResponse | null; - isK8s?: string; + isK8s?: K8sMode; + installCommand: CommandsByPlatform; }): EuiContainedStepProps => { return { status: selectedApiKeyId ? undefined : 'disabled', @@ -32,11 +35,7 @@ export const InstallManagedAgentStep = ({ defaultMessage: 'Install Elastic Agent on your host', }), children: selectedApiKeyId && apiKeyData && ( - + ), }; }; diff --git a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/install_standalone_agent_step.tsx b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/install_standalone_agent_step.tsx index f1c6ce88233db4..fb6ddfd393dccd 100644 --- a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/install_standalone_agent_step.tsx +++ b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/steps/install_standalone_agent_step.tsx @@ -11,37 +11,21 @@ import { i18n } from '@kbn/i18n'; import type { EuiContainedStepProps } from '@elastic/eui/src/components/steps/steps'; import type { CommandsByPlatform } from '../../../applications/fleet/sections/agents/agent_requirements_page/components/install_command_utils'; -import { PlatformSelector } from '../../enrollment_instructions/manual/platform_selector'; - -import { InstallationMessage } from '../installation_message'; +import { InstallSection } from '../../enrollment_instructions/install_section'; import type { K8sMode } from '../types'; export const InstallStandaloneAgentStep = ({ installCommand, isK8s, - selectedPolicyId, }: { installCommand: CommandsByPlatform; isK8s?: K8sMode; - selectedPolicyId?: string; }): EuiContainedStepProps => { return { title: i18n.translate('xpack.fleet.agentEnrollment.stepEnrollAndRunAgentTitle', { defaultMessage: 'Install Elastic Agent on your host', }), - children: ( - <> - - - - ), + children: , }; }; diff --git a/x-pack/plugins/fleet/public/components/enrollment_instructions/index.tsx b/x-pack/plugins/fleet/public/components/enrollment_instructions/index.tsx index 49b12112d1e7c4..a6c799410e6703 100644 --- a/x-pack/plugins/fleet/public/components/enrollment_instructions/index.tsx +++ b/x-pack/plugins/fleet/public/components/enrollment_instructions/index.tsx @@ -6,3 +6,4 @@ */ export { ManualInstructions } from './manual'; +export { StandaloneInstructions } from './standalone'; diff --git a/x-pack/plugins/fleet/public/components/enrollment_instructions/install_section.tsx b/x-pack/plugins/fleet/public/components/enrollment_instructions/install_section.tsx new file mode 100644 index 00000000000000..0cf43902db7e24 --- /dev/null +++ b/x-pack/plugins/fleet/public/components/enrollment_instructions/install_section.tsx @@ -0,0 +1,37 @@ +/* + * 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. + */ + +import React from 'react'; + +import { InstallationMessage } from '../agent_enrollment_flyout/installation_message'; + +import type { K8sMode } from '../agent_enrollment_flyout/types'; + +import type { CommandsByPlatform } from '../../applications/fleet/sections/agents/agent_requirements_page/components/install_command_utils'; + +import { PlatformSelector } from './manual/platform_selector'; + +interface Props { + installCommand: CommandsByPlatform; + isK8s: K8sMode | undefined; +} + +export const InstallSection: React.FunctionComponent = ({ installCommand, isK8s }) => { + return ( + <> + + + + ); +}; diff --git a/x-pack/plugins/fleet/public/components/enrollment_instructions/manual/index.tsx b/x-pack/plugins/fleet/public/components/enrollment_instructions/manual/index.tsx index 077f9db0b05a21..5b777803552fb0 100644 --- a/x-pack/plugins/fleet/public/components/enrollment_instructions/manual/index.tsx +++ b/x-pack/plugins/fleet/public/components/enrollment_instructions/manual/index.tsx @@ -5,32 +5,16 @@ * 2.0. */ -import React from 'react'; - -import { useKibanaVersion } from '../../../hooks'; -import type { EnrollmentAPIKey } from '../../../types'; - -import { InstallationMessage } from '../../agent_enrollment_flyout/installation_message'; - -import { PlatformSelector } from './platform_selector'; - -interface Props { - fleetServerHosts: string[]; - apiKey: EnrollmentAPIKey; - isK8s: string | undefined; -} - -function getfleetServerHostsEnrollArgs(apiKey: EnrollmentAPIKey, fleetServerHosts: string[]) { - return `--url=${fleetServerHosts[0]} --enrollment-token=${apiKey.api_key}`; +function getfleetServerHostsEnrollArgs(apiKey: string, fleetServerHosts: string[]) { + return `--url=${fleetServerHosts[0]} --enrollment-token=${apiKey}`; } -export const ManualInstructions: React.FunctionComponent = ({ - apiKey, - fleetServerHosts, - isK8s, -}) => { +export const ManualInstructions = ( + apiKey: string, + fleetServerHosts: string[], + kibanaVersion: string +) => { const enrollArgs = getfleetServerHostsEnrollArgs(apiKey, fleetServerHosts); - const kibanaVersion = useKibanaVersion(); const linuxCommand = `curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-${kibanaVersion}-linux-x86_64.tar.gz tar xzvf elastic-agent-${kibanaVersion}-linux-x86_64.tar.gz @@ -55,17 +39,11 @@ sudo elastic-agent enroll ${enrollArgs} \nsudo systemctl enable elastic-agent \n sudo rpm -vi elastic-agent-${kibanaVersion}-x86_64.rpm sudo elastic-agent enroll ${enrollArgs} \nsudo systemctl enable elastic-agent \nsudo systemctl start elastic-agent`; - return ( - <> - - - - ); + return { + linux: linuxCommand, + mac: macCommand, + windows: windowsCommand, + deb: linuxDebCommand, + rpm: linuxRpmCommand, + }; }; diff --git a/x-pack/plugins/fleet/public/components/enrollment_instructions/manual/platform_selector.tsx b/x-pack/plugins/fleet/public/components/enrollment_instructions/manual/platform_selector.tsx index 9551d9a7eae873..e03e43907f8297 100644 --- a/x-pack/plugins/fleet/public/components/enrollment_instructions/manual/platform_selector.tsx +++ b/x-pack/plugins/fleet/public/components/enrollment_instructions/manual/platform_selector.tsx @@ -7,8 +7,7 @@ import React from 'react'; import styled from 'styled-components'; -import { EuiText, EuiSpacer, EuiCodeBlock, EuiButtonGroup, EuiCallOut } from '@elastic/eui'; -import { FormattedMessage } from '@kbn/i18n-react'; +import { EuiSpacer, EuiCodeBlock, EuiButtonGroup, EuiCallOut } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import type { PLATFORM_TYPE } from '../../../hooks'; @@ -53,21 +52,6 @@ export const PlatformSelector: React.FunctionComponent = ({ return ( <> - - {isK8s ? ( - - ) : ( - - )} - - - {isK8s ? ( {K8S_COMMAND} diff --git a/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts b/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts index 4ce39483f09a37..77fe33df4ca489 100644 --- a/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts +++ b/x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts @@ -222,8 +222,7 @@ metadata: --- `; -export const elasticAgentManagedManifest = ` -apiVersion: apps/v1 +export const elasticAgentManagedManifest = `apiVersion: apps/v1 kind: DaemonSet metadata: name: elastic-agent diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 35f2513c4706ca..0abda2f5fb541d 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -9869,7 +9869,6 @@ "xpack.fleet.agentEnrollment.stepConfigurePolicyAuthenticationTitle": "Sélectionner le jeton d'enregistrement", "xpack.fleet.agentEnrollment.stepDownloadAgentTitle": "Télécharger l'agent Elastic Agent sur votre hôte", "xpack.fleet.agentEnrollment.stepEnrollAndRunAgentTitle": "Enregistrer et démarrer l'agent Elastic Agent", - "xpack.fleet.agentEnrollment.stepRunAgentDescription": "Depuis le répertoire des agents, exécutez cette commande pour installer, enregistrer et démarrer un agent Elastic Agent. Vous pouvez réutiliser cette commande pour configurer des agents sur plusieurs hôtes. Cette action nécessite de disposer de privilèges d'administrateur.", "xpack.fleet.agentHealth.checkInTooltipText": "Dernier archivage le {lastCheckIn}", "xpack.fleet.agentHealth.healthyStatusText": "Sain", "xpack.fleet.agentHealth.inactiveStatusText": "Inactif", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index ce7d58611ac084..08f8f8b8605c2b 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -11684,7 +11684,6 @@ "xpack.fleet.agentEnrollment.stepDownloadAgentForFleetServerTitle": "Fleetサーバーを一元化されたホストにダウンロード", "xpack.fleet.agentEnrollment.stepDownloadAgentTitle": "Elasticエージェントをホストにダウンロード", "xpack.fleet.agentEnrollment.stepEnrollAndRunAgentTitle": "Elasticエージェントを登録して実行", - "xpack.fleet.agentEnrollment.stepRunAgentDescription": "エージェントのディレクトリから、このコマンドを実行し、Elasticエージェントを、インストール、登録、起動します。このコマンドを再利用すると、複数のホストでエージェントを設定できます。管理者権限が必要です。", "xpack.fleet.agentEnrollment.stepRunAgentDescriptionk8s": "Kubernetesマニフェストがダウンロードされるディレクトリから適用コマンドを実行します。", "xpack.fleet.agentHealth.checkInTooltipText": "前回のチェックイン {lastCheckIn}", "xpack.fleet.agentHealth.healthyStatusText": "正常", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 3b54c05f27a83e..21b3231aee380a 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -11703,7 +11703,6 @@ "xpack.fleet.agentEnrollment.stepDownloadAgentForFleetServerTitle": "将 Fleet 服务器下载到集中式主机", "xpack.fleet.agentEnrollment.stepDownloadAgentTitle": "将 Elastic 代理下载到您的主机", "xpack.fleet.agentEnrollment.stepEnrollAndRunAgentTitle": "注册并启动 Elastic 代理", - "xpack.fleet.agentEnrollment.stepRunAgentDescription": "从代理目录运行此命令,以安装、注册并启动 Elastic 代理。您可以重复使用此命令在多个主机上设置代理。需要管理员权限。", "xpack.fleet.agentEnrollment.stepRunAgentDescriptionk8s": "从下载 Kubernetes 清单的目录运行应用命令。", "xpack.fleet.agentHealth.checkInTooltipText": "上次签入时间 {lastCheckIn}", "xpack.fleet.agentHealth.healthyStatusText": "运行正常",