Skip to content

Commit db4bcde

Browse files
[fleet] Tweak Header UI (#114704)
1 parent 802fb02 commit db4bcde

File tree

8 files changed

+41
-20
lines changed

8 files changed

+41
-20
lines changed

docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
```typescript
1010
readonly links: {
1111
readonly settings: string;
12+
readonly elasticStackGetStarted: string;
1213
readonly apm: {
1314
readonly kibanaSettings: string;
1415
readonly supportedServiceMaps: string;

docs/development/core/public/kibana-plugin-core-public.doclinksstart.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/core/public/doc_links/doc_links_service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ export class DocLinksService {
2626
const PLUGIN_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/plugins/${DOC_LINK_VERSION}/`;
2727
const APM_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/apm/`;
2828
const SECURITY_SOLUTION_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/`;
29+
const STACK_GETTING_STARTED = `${ELASTIC_WEBSITE_URL}guide/en/elastic-stack-get-started/${DOC_LINK_VERSION}/`;
2930

3031
return deepFreeze({
3132
DOC_LINK_VERSION,
3233
ELASTIC_WEBSITE_URL,
3334
links: {
3435
settings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/settings.html`,
36+
elasticStackGetStarted: `${STACK_GETTING_STARTED}get-started-elastic-stack.html`,
3537
apm: {
3638
kibanaSettings: `${KIBANA_DOCS}apm-settings-in-kibana.html`,
3739
supportedServiceMaps: `${KIBANA_DOCS}service-maps.html#service-maps-supported`,
@@ -508,6 +510,7 @@ export interface DocLinksStart {
508510
readonly ELASTIC_WEBSITE_URL: string;
509511
readonly links: {
510512
readonly settings: string;
513+
readonly elasticStackGetStarted: string;
511514
readonly apm: {
512515
readonly kibanaSettings: string;
513516
readonly supportedServiceMaps: string;

src/core/public/public.api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ export interface DocLinksStart {
478478
// (undocumented)
479479
readonly links: {
480480
readonly settings: string;
481+
readonly elasticStackGetStarted: string;
481482
readonly apm: {
482483
readonly kibanaSettings: string;
483484
readonly supportedServiceMaps: string;

x-pack/plugins/fleet/public/applications/integrations/layouts/default.tsx

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* 2.0.
66
*/
77
import React, { memo } from 'react';
8-
import { EuiFlexGroup, EuiFlexItem, EuiImage, EuiSpacer, EuiText } from '@elastic/eui';
8+
import { EuiFlexGroup, EuiFlexItem, EuiImage, EuiSpacer, EuiText, EuiLink } from '@elastic/eui';
99
import { FormattedMessage } from '@kbn/i18n/react';
1010

1111
import { i18n } from '@kbn/i18n';
@@ -17,7 +17,7 @@ import type { EuiTheme } from 'src/plugins/kibana_react/common';
1717
import { useLink } from '../../../hooks';
1818
import type { Section } from '../sections';
1919

20-
import { useLinks } from '../hooks';
20+
import { useLinks, useStartServices } from '../hooks';
2121

2222
import { WithHeaderLayout } from './';
2323

@@ -27,10 +27,14 @@ interface Props {
2727
}
2828

2929
const Illustration = styled(EuiImage)`
30-
margin-bottom: -68px;
30+
margin-bottom: -77px;
3131
position: relative;
32-
top: -20px;
33-
width: 80%;
32+
top: -16px;
33+
width: 395px;
34+
`;
35+
36+
const Hero = styled.div`
37+
text-align: right;
3438
`;
3539

3640
const HeroImage = memo(() => {
@@ -39,21 +43,24 @@ const HeroImage = memo(() => {
3943
const IS_DARK_THEME = theme.darkMode;
4044

4145
return (
42-
<Illustration
43-
alt={i18n.translate('xpack.fleet.epm.illustrationAltText', {
44-
defaultMessage: 'Illustration of an integration',
45-
})}
46-
url={
47-
IS_DARK_THEME
48-
? toSharedAssets('illustration_integrations_darkmode.svg')
49-
: toSharedAssets('illustration_integrations_lightmode.svg')
50-
}
51-
/>
46+
<Hero>
47+
<Illustration
48+
alt={i18n.translate('xpack.fleet.epm.illustrationAltText', {
49+
defaultMessage: 'Illustration of an integration',
50+
})}
51+
url={
52+
IS_DARK_THEME
53+
? toSharedAssets('illustration_integrations_darkmode.svg')
54+
: toSharedAssets('illustration_integrations_lightmode.svg')
55+
}
56+
/>
57+
</Hero>
5258
);
5359
});
5460

5561
export const DefaultLayout: React.FunctionComponent<Props> = memo(({ section, children }) => {
5662
const { getHref } = useLink();
63+
const { docLinks } = useStartServices();
5764

5865
return (
5966
<WithHeaderLayout
@@ -64,7 +71,7 @@ export const DefaultLayout: React.FunctionComponent<Props> = memo(({ section, ch
6471
<h1>
6572
<FormattedMessage
6673
id="xpack.fleet.integrationsHeaderTitle"
67-
defaultMessage="Elastic Agent Integrations"
74+
defaultMessage="Integrations"
6875
/>
6976
</h1>
7077
</EuiText>
@@ -76,7 +83,16 @@ export const DefaultLayout: React.FunctionComponent<Props> = memo(({ section, ch
7683
<p>
7784
<FormattedMessage
7885
id="xpack.fleet.epm.pageSubtitle"
79-
defaultMessage="Collect data from popular apps and services using Elastic Agent"
86+
defaultMessage="Collect data from popular applications and services. To learn more about Integrations, view {link}"
87+
values={{
88+
link: (
89+
<EuiLink target="_blank" href={docLinks.links.elasticStackGetStarted}>
90+
{i18n.translate('xpack.fleet.epm.pageSubtitleLinkText', {
91+
defaultMessage: 'Getting started with Elastic Stack',
92+
})}
93+
</EuiLink>
94+
),
95+
}}
8096
/>
8197
</p>
8298
</EuiText>

x-pack/plugins/fleet/storybook/context/doc_links.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import type { DocLinksStart } from 'kibana/public';
1010
export const getDocLinks = () => {
1111
const docLinks: DocLinksStart = {
1212
links: {
13+
elasticStackGetStarted:
14+
'https://www.elastic.co/guide/en/elastic-stack-get-started/current/get-started-elastic-stack.html',
1315
fleet: {
1416
learnMoreBlog:
1517
'https://www.elastic.co/blog/elastic-agent-and-fleet-make-it-easier-to-integrate-your-systems-with-elastic',

x-pack/plugins/translations/translations/ja-JP.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10743,7 +10743,6 @@
1074310743
"xpack.fleet.epm.packageDetailsNav.packageCustomLinkText": "高度な設定",
1074410744
"xpack.fleet.epm.packageDetailsNav.packagePoliciesLinkText": "ポリシー",
1074510745
"xpack.fleet.epm.packageDetailsNav.settingsLinkText": "設定",
10746-
"xpack.fleet.epm.pageSubtitle": "Elasticエージェントを使用して一般的なアプリやサービスからデータを収集します",
1074710746
"xpack.fleet.epm.releaseBadge.betaDescription": "この統合は本番環境用ではありません。",
1074810747
"xpack.fleet.epm.releaseBadge.betaLabel": "ベータ",
1074910748
"xpack.fleet.epm.releaseBadge.experimentalDescription": "この統合は、急に変更されたり、将来のリリースで削除されたりする可能性があります。",

x-pack/plugins/translations/translations/zh-CN.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10857,7 +10857,6 @@
1085710857
"xpack.fleet.epm.packageDetailsNav.packageCustomLinkText": "高级",
1085810858
"xpack.fleet.epm.packageDetailsNav.packagePoliciesLinkText": "策略",
1085910859
"xpack.fleet.epm.packageDetailsNav.settingsLinkText": "设置",
10860-
"xpack.fleet.epm.pageSubtitle": "使用 Elastic 代理从热门应用和服务中收集数据",
1086110860
"xpack.fleet.epm.releaseBadge.betaDescription": "在生产环境中不推荐使用此集成。",
1086210861
"xpack.fleet.epm.releaseBadge.betaLabel": "公测版",
1086310862
"xpack.fleet.epm.releaseBadge.experimentalDescription": "此集成可能有重大更改或将在未来版本中移除。",

0 commit comments

Comments
 (0)