-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- now that the header/actions, chrome/telemetry, & empty state etc. are all DRY'd out by the template, there's no need for a separate header component - we can simply dry out the header action, which will shortly be removed with the 7.14 launch - note: for empty state changes: mostly indenting, the new template automatically creates a subdued panel for us in empty state so no need to include one manually
- Loading branch information
Showing
7 changed files
with
117 additions
and
148 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
54 changes: 0 additions & 54 deletions
54
...enterprise_search/public/applications/app_search/components/engines/components/header.tsx
This file was deleted.
Oops, something went wrong.
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
41 changes: 41 additions & 0 deletions
41
..._search/public/applications/app_search/components/engines/components/launch_as_button.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,41 @@ | ||
/* | ||
* 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 { useActions } from 'kea'; | ||
|
||
import { EuiButton } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
|
||
import { getAppSearchUrl } from '../../../../shared/enterprise_search_url'; | ||
import { TelemetryLogic } from '../../../../shared/telemetry'; | ||
|
||
export const LaunchAppSearchButton: React.FC = () => { | ||
const { sendAppSearchTelemetry } = useActions(TelemetryLogic); | ||
|
||
return ( | ||
// eslint-disable-next-line @elastic/eui/href-or-on-click | ||
<EuiButton | ||
size="s" | ||
iconType="popout" | ||
href={getAppSearchUrl()} | ||
target="_blank" | ||
onClick={() => | ||
sendAppSearchTelemetry({ | ||
action: 'clicked', | ||
metric: 'header_launch_button', | ||
}) | ||
} | ||
data-test-subj="launchButton" | ||
> | ||
{i18n.translate('xpack.enterpriseSearch.appSearch.productCta', { | ||
defaultMessage: 'Launch App Search', | ||
})} | ||
</EuiButton> | ||
); | ||
}; |
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