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.
[Security Solution][AVC banner] Add AVC results banner to elastic def…
…end home page and integrations (elastic#186942) ## Summary - [x] Shows a banner with the 2024 AVC results blog link in 2 places: the Security homepage and the Elastic Defend integration page info - [x] Banner will not show again once dismissed - [x] Unit Tests TODO in another pr: have code to remove the avc banner code at the end of the year ## Screenshots <img width="1724" alt="image" src="https://github.com/elastic/kibana/assets/56409205/9ac2ca14-525b-44bc-b357-e87f10856f33"> <img width="1383" alt="image" src="https://github.com/elastic/kibana/assets/56409205/24ef70fe-dfa7-4fc1-bcba-8405aaf4f9ce"> --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Paul Tavares <[email protected]>
- Loading branch information
1 parent
06d84b2
commit fe131d4
Showing
11 changed files
with
881 additions
and
47 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
329 changes: 329 additions & 0 deletions
329
...tions/sections/epm/screens/detail/overview/avc_banner/avc_banner_background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions
56
.../integrations/sections/epm/screens/detail/overview/avc_banner/avc_results_banner_2024.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,56 @@ | ||
/* | ||
* 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/css'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { EuiButton, EuiCallOut, EuiSpacer, useEuiTheme } from '@elastic/eui'; | ||
import { FormattedMessage } from '@kbn/i18n-react'; | ||
import { useKibana } from '@kbn/kibana-react-plugin/public'; | ||
|
||
import avcBannerBackground from './avc_banner_background.svg'; | ||
|
||
export const AVCResultsBanner2024: React.FC<{ onDismiss: () => void }> = ({ onDismiss }) => { | ||
const { docLinks } = useKibana().services; | ||
const { euiTheme } = useEuiTheme(); | ||
const bannerTitle = i18n.translate( | ||
'xpack.fleet.integrations.epm.elasticDefend.avcResultsBanner.title', | ||
{ | ||
defaultMessage: '100% protection with zero false positives.', | ||
} | ||
); | ||
|
||
const calloutStyles = css({ | ||
paddingLeft: `${euiTheme.size.xl}`, | ||
backgroundImage: `url(${avcBannerBackground})`, | ||
backgroundRepeat: 'no-repeat', | ||
backgroundPositionX: 'right', | ||
backgroundPositionY: 'bottom', | ||
}); | ||
|
||
return ( | ||
<EuiCallOut | ||
title={bannerTitle} | ||
color="success" | ||
iconType="cheer" | ||
onDismiss={onDismiss} | ||
className={calloutStyles} | ||
> | ||
<FormattedMessage | ||
id="xpack.fleet.integrations.epm.elasticDefend.avcResultsBanner.title.avcResultsBanner.body" | ||
defaultMessage="Elastic Security shines in Malware Protection Test by AV-Comparatives" | ||
/> | ||
<EuiSpacer size="s" /> | ||
<EuiButton size="s" color="success" href={docLinks?.links.securitySolution.avcResults}> | ||
<FormattedMessage | ||
id="xpack.fleet.integrations.epm.elasticDefend.avcResultsBanner.title.avcResultsBanner.readTheBlog.link" | ||
defaultMessage="Read the blog" | ||
/> | ||
</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
Oops, something went wrong.