-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Onboarding][Auto-detect] Update design for supported integrations badges #195351
Merged
mykolaharmash
merged 3 commits into
elastic:main
from
mykolaharmash:auto-detect-supported-integration-redesign
Oct 14, 2024
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
b0109fa
[Onboarding][Auto-detect] Update design for supported integrations ba…
mykolaharmash b4fdfbc
Merge branch 'main' into auto-detect-supported-integration-redesign
mykolaharmash 0ec0588
Merge branch 'main' into auto-detect-supported-integration-redesign
mykolaharmash File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the tooltip only list the ones that are not already spelled out individually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took this from the desings. At first I thought the same, that it should have only the remaining services, but it seems convenient to have the full list in one place, I suspect that was the logic behind the designs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, no worries then :)