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.
Unblocks Connector creation for basic licensing cases and updates tex…
…t. (elastic#177485) ## Summary https://github.com/elastic/kibana/assets/1410658/8011a707-e589-47d7-8e01-8906fb18bb58 Also includes some quality of life improvements. ### Checklist Delete any items that are not applicable to this PR. - [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) - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [x] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
- Loading branch information
Showing
5 changed files
with
146 additions
and
13 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
92 changes: 92 additions & 0 deletions
92
...ations/enterprise_search_content/components/new_index/select_connector/native_popover.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,92 @@ | ||
/* | ||
* 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 { css } from '@emotion/react'; | ||
|
||
import { | ||
EuiPopover, | ||
EuiPopoverTitle, | ||
EuiText, | ||
EuiPopoverFooter, | ||
EuiFlexGroup, | ||
EuiFlexItem, | ||
EuiButton, | ||
EuiPopoverProps, | ||
useEuiTheme, | ||
} from '@elastic/eui'; | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
|
||
interface NativePopoverProps { | ||
button: EuiPopoverProps['button']; | ||
closePopover: () => void; | ||
isPopoverOpen: boolean; | ||
} | ||
|
||
export const NativePopover: React.FC<NativePopoverProps> = ({ | ||
button, | ||
isPopoverOpen, | ||
closePopover, | ||
}) => { | ||
const { euiTheme } = useEuiTheme(); | ||
return ( | ||
<EuiPopover | ||
button={button} | ||
isOpen={isPopoverOpen} | ||
closePopover={closePopover} | ||
onClick={(e) => { | ||
e.stopPropagation(); | ||
}} | ||
> | ||
<EuiPopoverTitle> | ||
{i18n.translate( | ||
'xpack.enterpriseSearch.content.newIndex.selectConnectore.nativePopover.title', | ||
{ | ||
defaultMessage: 'Elastic Cloud', | ||
} | ||
)} | ||
</EuiPopoverTitle> | ||
<EuiText | ||
grow={false} | ||
size="s" | ||
css={css` | ||
max-width: calc(${euiTheme.size.xl} * 10); | ||
`} | ||
> | ||
<p> | ||
{i18n.translate( | ||
'xpack.enterpriseSearch.content.newIndex.selectConnectore.nativePopover.description', | ||
{ | ||
defaultMessage: | ||
'Native connectors are hosted on Elastic Cloud. Get started with a free 14-day trial.', | ||
} | ||
)} | ||
</p> | ||
</EuiText> | ||
<EuiPopoverFooter> | ||
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center"> | ||
<EuiFlexItem grow={false}> | ||
<EuiButton | ||
iconType="popout" | ||
target="_blank" | ||
href="https://www.elastic.co/cloud/cloud-trial-overview" | ||
> | ||
{i18n.translate( | ||
'xpack.enterpriseSearch.content.newIndex.selectConnector.cloudTrialButton', | ||
{ | ||
defaultMessage: 'Elastic Cloud Trial', | ||
} | ||
)} | ||
</EuiButton> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</EuiPopoverFooter> | ||
</EuiPopover> | ||
); | ||
}; |
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
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
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