[ML] fix ticks, add custom colors inline (#117159) (#117204)

Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
This commit is contained in:
Kibana Machine 2021-11-02 16:07:45 -04:00 committed by GitHub
parent cd5e7998a7
commit 3b7907820e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 25 deletions

View file

@ -16,7 +16,6 @@ import {
EuiRangeProps,
} from '@elastic/eui';
import { ANOMALY_THRESHOLD } from '../../../../common';
import './styles.scss';
export interface SeveritySelectorProps {
value: number | undefined;
@ -29,23 +28,23 @@ export const SeverityControl: FC<SeveritySelectorProps> = React.memo(({ value, o
const levels: EuiRangeProps['levels'] = [
{
min: ANOMALY_THRESHOLD.LOW,
max: ANOMALY_THRESHOLD.MINOR - 1,
color: 'success',
max: ANOMALY_THRESHOLD.MINOR,
color: '#8BC8FB',
},
{
min: ANOMALY_THRESHOLD.MINOR,
max: ANOMALY_THRESHOLD.MAJOR - 1,
color: 'primary',
max: ANOMALY_THRESHOLD.MAJOR,
color: '#FDEC25',
},
{
min: ANOMALY_THRESHOLD.MAJOR,
max: ANOMALY_THRESHOLD.CRITICAL,
color: 'warning',
color: '#FBA740',
},
{
min: ANOMALY_THRESHOLD.CRITICAL,
max: MAX_ANOMALY_SCORE,
color: 'danger',
color: '#FE5050',
},
];

View file

@ -1,18 +0,0 @@
// Color overrides are required (https://github.com/elastic/eui/issues/4467)
.mlSeverityControl {
.euiRangeLevel-- {
&success {
background-color: #8BC8FB;
}
&primary {
background-color: #FDEC25;
}
&warning {
background-color: #FBA740;
}
&danger {
background-color: #FE5050;
}
}
}