[Fleet] adding a docs link to the transforms callout for integrations (#216233)

## Summary

Adding a docs link to the transforms callout on the add integration
screen. Link points to:
https://www.elastic.co/guide/en/elasticsearch/reference/current/transform-overview.html

## Screenshots
<img width="784" alt="Screenshot 2025-03-27 at 4 57 50 PM"
src="https://github.com/user-attachments/assets/bf9fa32c-5ca5-4d89-9296-4d05d742152e"
/>

Singular text with link:
<img width="715" alt="Screenshot 2025-03-27 at 4 57 56 PM"
src="https://github.com/user-attachments/assets/c0247b66-2f3f-4a20-a8a4-8ca61ce9fa88"
/>

Plural text with link:
<img width="723" alt="Screenshot 2025-03-27 at 4 58 44 PM"
src="https://github.com/user-attachments/assets/e2a81b82-7df1-4929-a73e-0ee7bd7b6f35"
/>

Href:
<img width="1178" alt="Screenshot 2025-03-27 at 4 58 11 PM"
src="https://github.com/user-attachments/assets/cb5988af-59d9-4be7-ab61-f4cc15d08528"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Kylie Meli 2025-03-28 09:42:53 -04:00 committed by GitHub
parent c1ece02b9e
commit 0ce7a481b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 18 additions and 7 deletions

View file

@ -546,6 +546,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
? `${SERVERLESS_DOCS}transforms.html`
: `${ELASTICSEARCH_DOCS}transforms.html`,
alertingRules: `${ELASTICSEARCH_DOCS}transform-alerts.html`,
overview: `${ELASTICSEARCH_DOCS}transform-overview.html`,
},
visualize: {
guide: `${KIBANA_DOCS}_panels_and_visualizations.html`,

View file

@ -19132,7 +19132,6 @@
"xpack.fleet.createPackagePolicy.StepSelectPolicy.errorLoadingAgentPoliciesTitle": "Erreur lors du chargement des stratégies d'agent",
"xpack.fleet.createPackagePolicy.StepSelectPolicy.errorLoadingPackageTitle": "Erreur lors du chargement des informations de pack",
"xpack.fleet.createPackagePolicy.StepSelectPolicy.errorLoadingSelectedAgentPolicyTitle": "Erreur lors du chargement de la stratégie d'agent sélectionnée",
"xpack.fleet.createPackagePolicy.transformInstallWithCurrentUserPermissionCallout": "Ce package a {count, plural, one {une ressource de transformation qui sera créée et démarrée} other {# ressources de transformation qui seront créées et démarrées}} avec les mêmes rôles que l'utilisateur responsable de l'installation du package.",
"xpack.fleet.createPackagePolicyBottomBar.addAnotherIntegration": "Ajouter une autre intégration",
"xpack.fleet.createPackagePolicyBottomBar.backButton": "Retour",
"xpack.fleet.createPackagePolicyBottomBar.loading": "Chargement...",

View file

@ -19109,7 +19109,6 @@
"xpack.fleet.createPackagePolicy.StepSelectPolicy.errorLoadingAgentPoliciesTitle": "エージェントポリシーの読み込みエラー",
"xpack.fleet.createPackagePolicy.StepSelectPolicy.errorLoadingPackageTitle": "パッケージ情報の読み込みエラー",
"xpack.fleet.createPackagePolicy.StepSelectPolicy.errorLoadingSelectedAgentPolicyTitle": "選択したエージェントポリシーの読み込みエラー",
"xpack.fleet.createPackagePolicy.transformInstallWithCurrentUserPermissionCallout": "このパッケージには、パッケージをインストールするユーザーと同じロールで作成、開始される{count, plural, one {1個のトランスフォームアセット} other {# トランスフォームアセット}}があります。",
"xpack.fleet.createPackagePolicyBottomBar.addAnotherIntegration": "別の統合を追加",
"xpack.fleet.createPackagePolicyBottomBar.backButton": "戻る",
"xpack.fleet.createPackagePolicyBottomBar.loading": "読み込み中...",

View file

@ -19150,7 +19150,6 @@
"xpack.fleet.createPackagePolicy.StepSelectPolicy.errorLoadingAgentPoliciesTitle": "加载代理策略时出错",
"xpack.fleet.createPackagePolicy.StepSelectPolicy.errorLoadingPackageTitle": "加载软件包信息时出错",
"xpack.fleet.createPackagePolicy.StepSelectPolicy.errorLoadingSelectedAgentPolicyTitle": "加载选定代理策略时出错",
"xpack.fleet.createPackagePolicy.transformInstallWithCurrentUserPermissionCallout": "此软件包具有 {count, plural, one {一个转换资产} other {# 个转换资产}},它们将使用与安装软件包的用户相同的角色创建并启动。",
"xpack.fleet.createPackagePolicyBottomBar.addAnotherIntegration": "添加其他集成",
"xpack.fleet.createPackagePolicyBottomBar.backButton": "返回",
"xpack.fleet.createPackagePolicyBottomBar.loading": "正在加载……",

View file

@ -5,12 +5,13 @@
* 2.0.
*/
import { EuiCallOut } from '@elastic/eui';
import { EuiCallOut, EuiLink } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import React from 'react';
import { uniqBy } from 'lodash';
import type { PackageInfo } from '../../common';
import { useStartServices } from '../hooks';
export const getNumTransformAssets = (assets?: PackageInfo['assets']) => {
if (
@ -28,12 +29,24 @@ export const getNumTransformAssets = (assets?: PackageInfo['assets']) => {
export const TransformInstallWithCurrentUserPermissionCallout: React.FunctionComponent<{
count: number;
}> = ({ count }) => {
const { docLinks } = useStartServices();
return (
<EuiCallOut color="primary" iconType="iInCircle">
<FormattedMessage
id="xpack.fleet.createPackagePolicy.transformInstallWithCurrentUserPermissionCallout"
defaultMessage="This package has {count, plural, one {one transform asset} other {# transform assets}} which will be created and started with the same roles as the user installing the package."
values={{ count }}
id="xpack.fleet.createPackagePolicy.transformInstallWithCurrentUserPermissionCallout.text"
defaultMessage="This package has {count, plural, one {one} other {#}} {docsLink} which will be created and started with the same roles as the user installing the package."
values={{
count,
docsLink: (
<EuiLink href={docLinks.links.transforms.overview} target="_blank" external>
<FormattedMessage
id="xpack.fleet.createPackagePolicy.transformInstallWithCurrentUserPermissionCallout.docsLink"
defaultMessage="{count, plural, one {transform asset} other {transform assets}}"
values={{ count }}
/>
</EuiLink>
),
}}
/>
</EuiCallOut>
);