mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Security Solution][Alerts] - change top alerts by chart color (#209031)
## Summary This PR makes the smallest change requested by the UIUX team, to the _Top alerts by_ chart on the Alert page. The `vis9` color is changed to `vis6`. | Before | After | | ------------- | ------------- | |  |  |
This commit is contained in:
parent
9078a2bf69
commit
04eebd2cba
1 changed files with 20 additions and 9 deletions
|
@ -5,18 +5,19 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import {
|
||||
EuiButtonIcon,
|
||||
EuiFlexGroup,
|
||||
EuiFlexItem,
|
||||
EuiHorizontalRule,
|
||||
EuiLink,
|
||||
EuiPopover,
|
||||
EuiPopoverTitle,
|
||||
EuiProgress,
|
||||
EuiSpacer,
|
||||
EuiText,
|
||||
EuiHorizontalRule,
|
||||
EuiPopoverTitle,
|
||||
EuiLink,
|
||||
EuiFlexGroup,
|
||||
EuiFlexItem,
|
||||
EuiPopover,
|
||||
EuiButtonIcon,
|
||||
useEuiTheme,
|
||||
} from '@elastic/eui';
|
||||
import React, { useState } from 'react';
|
||||
import React, { useMemo, useState } from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { TableId } from '@kbn/securitysolution-data-table';
|
||||
import type { AlertsProgressBarData, GroupBySelection } from './types';
|
||||
|
@ -45,6 +46,7 @@ const StyledEuiProgress = styled(EuiProgress)`
|
|||
const DataStatsWrapper = styled.div`
|
||||
width: 250px;
|
||||
`;
|
||||
|
||||
export interface AlertsProcessBarProps {
|
||||
data: AlertsProgressBarData[];
|
||||
isLoading: boolean;
|
||||
|
@ -58,6 +60,7 @@ export const AlertsProgressBar: React.FC<AlertsProcessBarProps> = ({
|
|||
addFilter,
|
||||
groupBySelection,
|
||||
}) => {
|
||||
const { euiTheme } = useEuiTheme();
|
||||
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
|
||||
const onButtonClick = () => setIsPopoverOpen(!isPopoverOpen);
|
||||
const closePopover = () => setIsPopoverOpen(false);
|
||||
|
@ -113,6 +116,14 @@ export const AlertsProgressBar: React.FC<AlertsProcessBarProps> = ({
|
|||
);
|
||||
};
|
||||
|
||||
const color = useMemo(
|
||||
() =>
|
||||
euiTheme.themeName === 'EUI_THEME_BOREALIS'
|
||||
? euiTheme.colors.vis.euiColorVis6
|
||||
: euiTheme.colors.vis.euiColorVis9,
|
||||
[euiTheme]
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<StyledEuiFlexGroup alignItems="center" gutterSize="xs">
|
||||
|
@ -159,7 +170,7 @@ export const AlertsProgressBar: React.FC<AlertsProcessBarProps> = ({
|
|||
</EuiText>
|
||||
}
|
||||
max={1}
|
||||
color={`vis9`}
|
||||
color={color}
|
||||
size="s"
|
||||
value={item.percentage}
|
||||
label={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue