forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Onboarding][Auto-detect] Update design for supported integrations ba…
…dges (elastic#195351) Closes elastic/observability-dev#4007 Updates integration badges according to [the latest designs](https://www.figma.com/design/CPhMyRNOgo0wsEiaIMZJ14/Onboarding-Quick-Starts?node-id=3015-58062&t=5tvnrPIOkfg7xAJp-1). ![CleanShot 2024-10-08 at 08 57 48@2x](https://github.com/user-attachments/assets/1ae0d9d7-3b1f-4acd-b16f-ad1cbc09db88)
- Loading branch information
1 parent
efab00b
commit 0226634
Showing
4 changed files
with
114 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
...nboarding/public/application/quickstart_flows/auto_detect/supported_integrations_list.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
/* | ||
* 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 { | ||
EuiBadge, | ||
EuiFlexGroup, | ||
EuiFlexItem, | ||
EuiText, | ||
EuiTextColor, | ||
EuiToolTip, | ||
IconType, | ||
useEuiTheme, | ||
} from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
import apacheIconSrc from '../../../assets/apache.svg'; | ||
import dockerIconSrc from '../../../assets/docker.svg'; | ||
import nginxIconSrc from '../../../assets/nginx.svg'; | ||
import mysqlIconSrc from '../../../assets/mysql.svg'; | ||
|
||
const SUPPORTED_INTEGRATIONS_LIST = [ | ||
'Apache', | ||
'Docker', | ||
'Nginx', | ||
'System', | ||
'MySQL', | ||
'PostgreSQL', | ||
'Redis', | ||
'Haproxy', | ||
'Kafka', | ||
'RabbitMQ', | ||
'Prometheus', | ||
'Apache Tomcat', | ||
'MongoDB', | ||
] as const; | ||
|
||
type SupportedIntegrationName = (typeof SUPPORTED_INTEGRATIONS_LIST)[number]; | ||
|
||
interface SupportedIntegrationItem { | ||
title: SupportedIntegrationName; | ||
icon: IconType; | ||
} | ||
|
||
const FEATURED_INTEGRATIONS_LIST: SupportedIntegrationItem[] = [ | ||
{ title: 'Apache', icon: apacheIconSrc }, | ||
{ title: 'Docker', icon: dockerIconSrc }, | ||
{ title: 'Nginx', icon: nginxIconSrc }, | ||
{ title: 'MySQL', icon: mysqlIconSrc }, | ||
{ title: 'System', icon: 'desktop' }, | ||
]; | ||
|
||
export function SupportedIntegrationsList() { | ||
const { | ||
euiTheme: { colors }, | ||
} = useEuiTheme(); | ||
const customLogFilesTitle = i18n.translate( | ||
'xpack.observability_onboarding.autoDetectPanel.supportedIntegrationsList.customIntegrationTitle', | ||
{ defaultMessage: 'Custom .log files' } | ||
); | ||
return ( | ||
<EuiFlexGroup gutterSize="s" responsive={false} css={{ flexWrap: 'wrap' }}> | ||
{FEATURED_INTEGRATIONS_LIST.map(({ title, icon }) => ( | ||
<EuiFlexItem grow={false}> | ||
<EuiBadge iconType={icon} color="hollow" key={title}> | ||
{title} | ||
</EuiBadge> | ||
</EuiFlexItem> | ||
))} | ||
|
||
<EuiBadge iconType="documents" color="hollow"> | ||
{customLogFilesTitle} | ||
</EuiBadge> | ||
|
||
<EuiToolTip | ||
content={ | ||
<EuiText size="s"> | ||
<ul> | ||
{SUPPORTED_INTEGRATIONS_LIST.map((integration) => ( | ||
<li key={integration}>{integration}</li> | ||
))} | ||
<li>{customLogFilesTitle}</li> | ||
</ul> | ||
</EuiText> | ||
} | ||
> | ||
<EuiBadge color="hollow"> | ||
<EuiTextColor color={colors.link}> | ||
{`+${SUPPORTED_INTEGRATIONS_LIST.length - FEATURED_INTEGRATIONS_LIST.length}`} | ||
</EuiTextColor> | ||
</EuiBadge> | ||
</EuiToolTip> | ||
</EuiFlexGroup> | ||
); | ||
} |
10 changes: 10 additions & 0 deletions
10
...lugins/observability_solution/observability_onboarding/public/assets/docker.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions
4
...plugins/observability_solution/observability_onboarding/public/assets/nginx.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.