Skip to content

Commit a12a2a3

Browse files
kdelemmeCAWilson94
authored andcommitted
feat(slo): improve burn rate panel (elastic#197339)
1 parent 4d55d5f commit a12a2a3

32 files changed

+599
-579
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import React, { useEffect } from 'react';
99
import { EuiFlexGroup, EuiLink } from '@elastic/eui';
1010
import { i18n } from '@kbn/i18n';
1111
import { AlertDetailsAppSectionProps } from '@kbn/observability-plugin/public';
12-
import { useKibana } from '../../../../hooks/use_kibana';
13-
import { useFetchSloDetails } from '../../../../hooks/use_fetch_slo_details';
12+
import { useKibana } from '../../hooks/use_kibana';
13+
import { useFetchSloDetails } from '../../hooks/use_fetch_slo_details';
1414
import { CustomAlertDetailsPanel } from './components/custom_panels/custom_panels';
1515
import { ErrorRatePanel } from './components/error_rate/error_rate_panel';
1616
import { BurnRateAlert, BurnRateRule } from './types';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { GetSLOResponse } from '@kbn/slo-schema';
99
import React from 'react';
1010
import { LogRateAnalysisPanel } from './log_rate_analysis_panel';
1111
import { BurnRateAlert, BurnRateRule } from '../../../types';
12-
import { useLicense } from '../../../../../../../hooks/use_license';
12+
import { useLicense } from '../../../../../hooks/use_license';
1313

1414
interface Props {
1515
slo: GetSLOResponse;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ import { colorTransformer } from '@kbn/observability-shared-plugin/common';
2323
import { KQLCustomIndicator, DurationUnit } from '@kbn/slo-schema';
2424
import { i18n } from '@kbn/i18n';
2525
import type { Message } from '@kbn/observability-ai-assistant-plugin/public';
26-
import type { WindowSchema } from '../../../../../../../typings';
27-
import { TimeRange } from '../../../../../error_rate_chart/use_lens_definition';
26+
import type { WindowSchema } from '../../../../../typings';
27+
import { TimeRange } from '../../../../slo/error_rate_chart/use_lens_definition';
2828
import { BurnRateAlert, BurnRateRule } from '../../../types';
2929
import { getActionGroupFromReason } from '../../../utils/alert';
30-
import { useKibana } from '../../../../../../../hooks/use_kibana';
30+
import { useKibana } from '../../../../../hooks/use_kibana';
3131
import { getESQueryForLogRateAnalysis } from './helpers/log_rate_analysis_query';
3232
function getDataTimeRange(
3333
timeRange: { gte: string; lte?: string },
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import { FormattedMessage } from '@kbn/i18n-react';
2323
import { ALERT_EVALUATION_VALUE, ALERT_TIME_RANGE } from '@kbn/rule-data-utils';
2424
import { GetSLOResponse } from '@kbn/slo-schema';
2525
import React from 'react';
26-
import { useKibana } from '../../../../../../hooks/use_kibana';
27-
import { ErrorRateChart } from '../../../../error_rate_chart';
28-
import { TimeRange } from '../../../../error_rate_chart/use_lens_definition';
26+
import { useKibana } from '../../../../hooks/use_kibana';
27+
import { ErrorRateChart } from '../../../slo/error_rate_chart';
28+
import { TimeRange } from '../../../slo/error_rate_chart/use_lens_definition';
2929
import { BurnRateAlert } from '../../types';
3030
import { getActionGroupWindow } from '../../utils/alert';
3131
import { getLastDurationInUnit } from '../../utils/last_duration_i18n';
@@ -153,7 +153,7 @@ export function ErrorRatePanel({ alert, slo, isLoading }: Props) {
153153
dataTimeRange={dataTimeRange}
154154
alertTimeRange={alertTimeRange}
155155
threshold={actionGroupWindow!.burnRateThreshold}
156-
showErrorRateAsLine
156+
variant="danger"
157157
/>
158158
</EuiFlexItem>
159159
</EuiFlexGroup>

0 commit comments

Comments
 (0)