Skip to content

Commit

Permalink
chore(slo): update EUI tokens for Borealis (elastic#204066)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdelemme authored Dec 16, 2024
1 parent d638475 commit 7fd9d7c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function TimesliceAnnotation({ slo, maxValue, minValue }: Props) {
style={{
line: {
strokeWidth: 2,
stroke: euiTheme.colors.warning || '#000',
stroke: euiTheme.colors.warning,
opacity: 1,
},
}}
Expand All @@ -55,7 +55,7 @@ export function TimesliceAnnotation({ slo, maxValue, minValue }: Props) {
},
]}
id="thresholdShade"
style={{ fill: euiTheme.colors.warning || '#000', opacity: 0.1 }}
style={{ fill: euiTheme.colors.warning, opacity: 0.1 }}
/>
</>
) : null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { Chart, isMetricElementEvent, Metric, MetricTrendShape, Settings } from '@elastic/charts';
import { EuiIcon, EuiPanel, useEuiBackgroundColor } from '@elastic/eui';
import { EuiIcon, EuiPanel, useEuiTheme } from '@elastic/eui';
import { css } from '@emotion/react';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
Expand All @@ -20,9 +20,9 @@ import moment from 'moment';
import React, { useState } from 'react';
import { SloDeleteModal } from '../../../../components/slo/delete_confirmation_modal/slo_delete_confirmation_modal';
import { SloResetConfirmationModal } from '../../../../components/slo/reset_confirmation_modal/slo_reset_confirmation_modal';
import { useKibana } from '../../../../hooks/use_kibana';
import { useResetSlo } from '../../../../hooks/use_reset_slo';
import { BurnRateRuleParams } from '../../../../typings';
import { useKibana } from '../../../../hooks/use_kibana';
import { formatHistoricalData } from '../../../../utils/slo/chart_data_formatter';
import { useSloListActions } from '../../hooks/use_slo_list_actions';
import { useSloFormattedSummary } from '../../hooks/use_slo_summary';
Expand All @@ -44,11 +44,12 @@ export interface Props {
}

export const useSloCardColor = (status?: SLOWithSummaryResponse['summary']['status']) => {
const { euiTheme } = useEuiTheme();
const colors = {
DEGRADING: useEuiBackgroundColor('warning'),
VIOLATED: useEuiBackgroundColor('danger'),
HEALTHY: useEuiBackgroundColor('success'),
NO_DATA: useEuiBackgroundColor('subdued'),
DEGRADING: euiTheme.colors.backgroundBaseWarning,
VIOLATED: euiTheme.colors.backgroundBaseDanger,
HEALTHY: euiTheme.colors.backgroundBaseSuccess,
NO_DATA: euiTheme.colors.backgroundBaseSubdued,
};

return { cardColor: colors[status ?? 'NO_DATA'], colors };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function SLOsOverview() {
tooltip={i18n.translate('xpack.slo.sLOsOverview.euiStat.degradingLabel.tooltip', {
defaultMessage: 'Click to filter SLOs by Degrading status.',
})}
titleColor={theme.colors.warningText}
titleColor={theme.colors.textWarning}
/>
<OverviewItem
title={data?.stale}
Expand Down

0 comments on commit 7fd9d7c

Please sign in to comment.