-
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.
[8.16] [Cloud Security] Fixes SVG flickering and adding insight telem…
…etry (#198812) (#199141) # Backport This will backport the following commits from `main` to `8.16`: - [[Cloud Security] Fixes SVG flickering and adding insight telemetry (#198812)](#198812) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jordan","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-06T13:52:30Z","message":"[Cloud Security] Fixes SVG flickering and adding insight telemetry (#198812)","sha":"de46e7f0739eb14138655e204d4be77d8e24ff37","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Cloud Security","backport:prev-minor","v8.16.0","backport:version","v8.17.0"],"title":"[Cloud Security] Fixes SVG flickering and adding insight telemetry","number":198812,"url":"https://github.com/elastic/kibana/pull/198812","mergeCommit":{"message":"[Cloud Security] Fixes SVG flickering and adding insight telemetry (#198812)","sha":"de46e7f0739eb14138655e204d4be77d8e24ff37"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198812","number":198812,"mergeCommit":{"message":"[Cloud Security] Fixes SVG flickering and adding insight telemetry (#198812)","sha":"de46e7f0739eb14138655e204d4be77d8e24ff37"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Jordan <[email protected]>
- Loading branch information
1 parent
c1e8160
commit c929240
Showing
10 changed files
with
109 additions
and
17 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
21 changes: 21 additions & 0 deletions
21
.../plugins/cloud_security_posture/public/components/empty_states_illustration_container.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,21 @@ | ||
/* | ||
* 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'; | ||
|
||
// dimensions of the SVGs used in the empty states illustrations | ||
// e.g. x-pack/plugins/cloud_security_posture/public/assets/illustrations/clouds.svg | ||
const SVG_HEIGHT = 209; | ||
const SVG_WIDTH = 376; | ||
|
||
/** | ||
* A container component that maintains a fixed size for child elements. | ||
* used for displaying the empty state illustrations and prevent flickering while the SVGs are loading. | ||
*/ | ||
export const EmptyStatesIllustrationContainer: React.FC<{ children: React.ReactNode }> = ({ | ||
children, | ||
}) => <div style={{ height: SVG_HEIGHT, width: SVG_WIDTH }}>{children}</div>; |
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
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