-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Serverless Search] Update Getting Ingest Data section (#171035)
## Summary PR updates Getting Started Ingest data row to match [design](https://www.figma.com/file/aRW3wtDRGgwOunC8vXIvdm/Milestone-0-UX?type=design&node-id=3893-443443&mode=design&t=PYPiODRJvKspgxQc-0) . ## Screen shot <img width="1402" alt="Getting ingest data row" src="https://github.com/elastic/kibana/assets/55930906/1b932469-f151-4e71-844b-da6b9b667e2a"> ## Screen Recording https://github.com/elastic/kibana/assets/55930906/2c9454ee-b23f-4a7e-9d16-cfcd3697e1a1 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) --------- Co-authored-by: Kibana Machine <[email protected]>
- Loading branch information
1 parent
938069d
commit a8f2039
Showing
9 changed files
with
260 additions
and
320 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
131 changes: 131 additions & 0 deletions
131
packages/kbn-search-api-panels/components/ingestions_panel.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,131 @@ | ||
/* | ||
* 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 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { EuiFlexGroup, EuiFlexItem, EuiTitle, EuiSpacer, EuiText, EuiLink } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { GithubLink } from './github_link'; | ||
|
||
interface IngestionPanelProps { | ||
additionalIngestionPanel?: React.ReactNode; | ||
docLinks: { beats: string; logstash: string }; | ||
assetBasePath: string; | ||
} | ||
|
||
export const IngestionsPanel: React.FC<IngestionPanelProps> = ({ | ||
additionalIngestionPanel, | ||
docLinks, | ||
assetBasePath, | ||
}) => { | ||
const panels = [ | ||
{ | ||
description: i18n.translate( | ||
'searchApiPanels.welcomeBanner.ingestData.alternativeOptions.logstashDescription', | ||
{ | ||
defaultMessage: | ||
'General-purpose data processing pipeline for Elasticsearch. Use Logstash to extract and transform data from a variety of inputs and outputs.', | ||
} | ||
), | ||
title: i18n.translate( | ||
'searchApiPanels.welcomeBanner.ingestData.alternativeOptions.logstashTitle', | ||
{ | ||
defaultMessage: 'Logstash', | ||
} | ||
), | ||
links: [ | ||
{ | ||
href: docLinks.logstash, | ||
label: i18n.translate( | ||
'searchApiPanels.welcomeBanner.ingestData.alternativeOptions.logstashDocumentationLabel', | ||
{ | ||
defaultMessage: 'Documentation', | ||
} | ||
), | ||
}, | ||
{ | ||
href: 'https://github.com/elastic/logstash', | ||
isGithubLink: true, | ||
label: 'logstash', | ||
}, | ||
], | ||
}, | ||
{ | ||
description: i18n.translate( | ||
'searchApiPanels.welcomeBanner.ingestData.alternativeOptions.beatsDescription', | ||
{ | ||
defaultMessage: | ||
'Lightweight, single-purpose data shippers for Elasticsearch. Use Beats to send operational data from your servers.', | ||
} | ||
), | ||
title: i18n.translate( | ||
'searchApiPanels.welcomeBanner.ingestData.alternativeOptions.beatsTitle', | ||
{ | ||
defaultMessage: 'Beats', | ||
} | ||
), | ||
links: [ | ||
{ | ||
href: docLinks.beats, | ||
label: i18n.translate( | ||
'searchApiPanels.welcomeBanner.ingestData.alternativeOptions.beatsDocumentationLabel', | ||
{ | ||
defaultMessage: 'Documentation', | ||
} | ||
), | ||
}, | ||
{ | ||
href: 'https://github.com/elastic/beats', | ||
isGithubLink: true, | ||
label: 'beats', | ||
}, | ||
], | ||
}, | ||
]; | ||
return ( | ||
<> | ||
{additionalIngestionPanel} | ||
{panels.map(({ title, description, links }, panelIndex) => ( | ||
<EuiFlexGroup | ||
direction="column" | ||
justifyContent="spaceEvenly" | ||
gutterSize="s" | ||
key={panelIndex} | ||
> | ||
<EuiFlexItem grow={false}> | ||
<EuiTitle size="xxs"> | ||
<h6>{title}</h6> | ||
</EuiTitle> | ||
<EuiSpacer size="xs" /> | ||
<EuiText> | ||
<p>{description}</p> | ||
</EuiText> | ||
</EuiFlexItem> | ||
{links && links.length > 0 && ( | ||
<> | ||
<EuiFlexGroup direction="row" justifyContent="flexStart" alignItems="center"> | ||
{links.map(({ label, href, isGithubLink }, linksIndex) => ( | ||
<EuiFlexItem grow={false} key={linksIndex}> | ||
{isGithubLink ? ( | ||
<GithubLink assetBasePath={assetBasePath} label={label} href={href} /> | ||
) : ( | ||
<EuiLink href={href} target="_blank"> | ||
{label} | ||
</EuiLink> | ||
)} | ||
</EuiFlexItem> | ||
))} | ||
</EuiFlexGroup> | ||
<EuiSpacer size="m" /> | ||
</> | ||
)} | ||
</EuiFlexGroup> | ||
))} | ||
</> | ||
); | ||
}; |
Oops, something went wrong.