-
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.
[Cloud Security] 3P callout displayed in tables (#196335)
- Loading branch information
Showing
4 changed files
with
52 additions
and
31 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
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
...plugins/cloud_security_posture/public/pages/findings/third_party_integrations_callout.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 { i18n } from '@kbn/i18n'; | ||
import useLocalStorage from 'react-use/lib/useLocalStorage'; | ||
import { EuiButton, EuiCallOut } from '@elastic/eui'; | ||
import { FormattedMessage } from '@kbn/i18n-react'; | ||
import { useAdd3PIntegrationRoute } from '../../common/api/use_wiz_integration_route'; | ||
import { LOCAL_STORAGE_3P_INTEGRATIONS_CALLOUT_KEY } from '../../common/constants'; | ||
|
||
export const ThirdPartyIntegrationsCallout = () => { | ||
const wizAddIntegrationLink = useAdd3PIntegrationRoute('wiz'); | ||
const [userHasDismissedCallout, setUserHasDismissedCallout] = useLocalStorage( | ||
LOCAL_STORAGE_3P_INTEGRATIONS_CALLOUT_KEY | ||
); | ||
|
||
if (userHasDismissedCallout) return null; | ||
|
||
return ( | ||
<EuiCallOut | ||
title={i18n.translate('xpack.csp.findings.3pIntegrationsCallout.title', { | ||
defaultMessage: | ||
"New! Ingest your cloud security product's data into Elastic for centralized analytics, hunting, investigations, visualizations, and more", | ||
})} | ||
iconType="cheer" | ||
onDismiss={() => setUserHasDismissedCallout(true)} | ||
> | ||
<EuiButton href={wizAddIntegrationLink}> | ||
<FormattedMessage | ||
id="xpack.csp.findings.3pIntegrationsCallout.buttonTitle" | ||
defaultMessage="Integrate Wiz" | ||
/> | ||
</EuiButton> | ||
</EuiCallOut> | ||
); | ||
}; |
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