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.
[Cloud Posture] add icon for EKS (elastic#137100) (elastic#138133)
(cherry picked from commit fb3e718) Co-authored-by: Or Ouziel <[email protected]>
- Loading branch information
1 parent
cae62e1
commit 9e45b6b
Showing
9 changed files
with
64 additions
and
15 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
1 change: 1 addition & 0 deletions
1
x-pack/plugins/cloud_security_posture/public/assets/icons/cis_eks_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions
30
x-pack/plugins/cloud_security_posture/public/components/cis_benchmark_icon.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,30 @@ | ||
/* | ||
* 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 { EuiIcon } from '@elastic/eui'; | ||
import type { BenchmarkId } from '../../common/types'; | ||
import cisK8sVanillaIcon from '../assets/icons/k8s_logo.svg'; | ||
import cisEksIcon from '../assets/icons/cis_eks_logo.svg'; | ||
|
||
interface Props { | ||
type: BenchmarkId; | ||
} | ||
|
||
const getBenchmarkIdIconType = (props: Props): string => { | ||
switch (props.type) { | ||
case 'cis_eks': | ||
return cisEksIcon; | ||
case 'cis_k8s': | ||
default: | ||
return cisK8sVanillaIcon; | ||
} | ||
}; | ||
|
||
export const CISBenchmarkIcon = (props: Props) => ( | ||
<EuiIcon type={getBenchmarkIdIconType(props)} size="xxl" /> | ||
); |
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
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