Skip to content

Commit 7919ed7

Browse files
kibanamachinemgiotasimianhackerelasticmachine
authored
[9.2] [SLO] Indicate missing transforms in the health callout (#237769) (#239208)
# Backport This will backport the following commits from `main` to `9.2`: - [[SLO] Indicate missing transforms in the health callout (#237769)](#237769) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Panagiota Mitsopoulou","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-10-15T17:12:31Z","message":"[SLO] Indicate missing transforms in the health callout (#237769)\n\nFixes https://github.com/elastic/kibana/issues/234217\n\n## Ηοw to test\n\n- Create a few SLOs\n- Go to Stack Management > Ingest Pipeline > delete a rollup or summary\ningest pipeline of one/some of your SLOs\n- Go to Stack Management > Transforms > delete a rollup or summary\ntransform of one/some of your SLOs\n- Go to SLO Overview page > You should see a list of unhealthy or\nmissing SLOs (the name of the SLO will appear and no summary or rollup\ntransform)\n- Click on the Inspect button of the unhealthy/missing SLO which links\nto SLO details page. The Health callout lists the exact state of\ntransforms (missing or unhealthy)\n\n\n## How it should look like\n\n#### SLO Overview page\n\n<img width=\"500\" height=\"644\" alt=\"Screenshot 2025-10-13 at 12 14 10\"\nsrc=\"https://github.com/user-attachments/assets/86dc9158-2fca-4fe3-8e23-acd62e90b810\"\n/>\n\n\n#### SLO Details page\n\n<img width=\"500\" height=\"438\" alt=\"Screenshot 2025-10-13 at 12 13 42\"\nsrc=\"https://github.com/user-attachments/assets/b95e9e3d-e8c0-497b-8432-0d179d714040\"\n/>\n\n---------\n\nCo-authored-by: Chris Cowan <[email protected]>\nCo-authored-by: Elastic Machine <[email protected]>\nCo-authored-by: kibanamachine <[email protected]>","sha":"77a1edeea6fb1827446bdb817ff6c05802ee2c1f","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-management","backport:version","author:obs-ux-management","v9.2.0","v9.3.0","v9.1.6","v8.19.6"],"title":"[SLO] Indicate missing transforms in the health callout","number":237769,"url":"https://github.com/elastic/kibana/pull/237769","mergeCommit":{"message":"[SLO] Indicate missing transforms in the health callout (#237769)\n\nFixes https://github.com/elastic/kibana/issues/234217\n\n## Ηοw to test\n\n- Create a few SLOs\n- Go to Stack Management > Ingest Pipeline > delete a rollup or summary\ningest pipeline of one/some of your SLOs\n- Go to Stack Management > Transforms > delete a rollup or summary\ntransform of one/some of your SLOs\n- Go to SLO Overview page > You should see a list of unhealthy or\nmissing SLOs (the name of the SLO will appear and no summary or rollup\ntransform)\n- Click on the Inspect button of the unhealthy/missing SLO which links\nto SLO details page. The Health callout lists the exact state of\ntransforms (missing or unhealthy)\n\n\n## How it should look like\n\n#### SLO Overview page\n\n<img width=\"500\" height=\"644\" alt=\"Screenshot 2025-10-13 at 12 14 10\"\nsrc=\"https://github.com/user-attachments/assets/86dc9158-2fca-4fe3-8e23-acd62e90b810\"\n/>\n\n\n#### SLO Details page\n\n<img width=\"500\" height=\"438\" alt=\"Screenshot 2025-10-13 at 12 13 42\"\nsrc=\"https://github.com/user-attachments/assets/b95e9e3d-e8c0-497b-8432-0d179d714040\"\n/>\n\n---------\n\nCo-authored-by: Chris Cowan <[email protected]>\nCo-authored-by: Elastic Machine <[email protected]>\nCo-authored-by: kibanamachine <[email protected]>","sha":"77a1edeea6fb1827446bdb817ff6c05802ee2c1f"}},"sourceBranch":"main","suggestedTargetBranches":["9.2","9.1","8.19"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/237769","number":237769,"mergeCommit":{"message":"[SLO] Indicate missing transforms in the health callout (#237769)\n\nFixes https://github.com/elastic/kibana/issues/234217\n\n## Ηοw to test\n\n- Create a few SLOs\n- Go to Stack Management > Ingest Pipeline > delete a rollup or summary\ningest pipeline of one/some of your SLOs\n- Go to Stack Management > Transforms > delete a rollup or summary\ntransform of one/some of your SLOs\n- Go to SLO Overview page > You should see a list of unhealthy or\nmissing SLOs (the name of the SLO will appear and no summary or rollup\ntransform)\n- Click on the Inspect button of the unhealthy/missing SLO which links\nto SLO details page. The Health callout lists the exact state of\ntransforms (missing or unhealthy)\n\n\n## How it should look like\n\n#### SLO Overview page\n\n<img width=\"500\" height=\"644\" alt=\"Screenshot 2025-10-13 at 12 14 10\"\nsrc=\"https://github.com/user-attachments/assets/86dc9158-2fca-4fe3-8e23-acd62e90b810\"\n/>\n\n\n#### SLO Details page\n\n<img width=\"500\" height=\"438\" alt=\"Screenshot 2025-10-13 at 12 13 42\"\nsrc=\"https://github.com/user-attachments/assets/b95e9e3d-e8c0-497b-8432-0d179d714040\"\n/>\n\n---------\n\nCo-authored-by: Chris Cowan <[email protected]>\nCo-authored-by: Elastic Machine <[email protected]>\nCo-authored-by: kibanamachine <[email protected]>","sha":"77a1edeea6fb1827446bdb817ff6c05802ee2c1f"}},{"branch":"9.1","label":"v9.1.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Panagiota Mitsopoulou <[email protected]> Co-authored-by: Chris Cowan <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
1 parent 13e343b commit 7919ed7

File tree

11 files changed

+888
-42
lines changed

11 files changed

+888
-42
lines changed

x-pack/platform/packages/shared/kbn-slo-schema/src/schema/health.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77

88
import * as t from 'io-ts';
99

10-
const healthStatusSchema = t.union([t.literal('healthy'), t.literal('unhealthy')]);
10+
const healthStatusSchema = t.union([
11+
t.literal('healthy'),
12+
t.literal('unhealthy'),
13+
t.literal('missing'),
14+
]);
1115
const stateSchema = t.union([
1216
t.literal('no_data'),
1317
t.literal('indexing'),
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0; you may not use this file except in compliance with the Elastic License
5+
* 2.0.
6+
*/
7+
8+
import { i18n } from '@kbn/i18n';
9+
10+
export function getSloHealthStateText(hasUnhealthy: boolean, hasMissing: boolean) {
11+
if (hasUnhealthy && hasMissing) {
12+
return i18n.translate('xpack.slo.sloHealth.unhealthyOrMissingState', {
13+
defaultMessage: 'an unhealthy or missing',
14+
});
15+
} else if (hasUnhealthy) {
16+
return i18n.translate('xpack.slo.sloHealth.unhealthyState', {
17+
defaultMessage: 'an unhealthy',
18+
});
19+
} else {
20+
return i18n.translate('xpack.slo.sloHealth.missingState', {
21+
defaultMessage: 'a missing',
22+
});
23+
}
24+
}

x-pack/solutions/observability/plugins/slo/public/pages/slo_details/components/external_link_display_text.tsx renamed to x-pack/solutions/observability/plugins/slo/public/pages/slo_details/components/health_callout/content_with_inspect_cta.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
* 2.0.
66
*/
77

8-
import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLink, EuiText } from '@elastic/eui';
8+
import { EuiFlexItem, EuiFlexGroup, EuiLink, EuiIcon, EuiText } from '@elastic/eui';
99
import { FormattedMessage } from '@kbn/i18n-react';
1010
import React from 'react';
1111

12-
export function ExternalLinkDisplayText({
12+
export function ContentWithInspectCta({
13+
url,
1314
textSize,
1415
content,
15-
url,
1616
}: {
17+
url: string;
1718
textSize: 's' | 'xs';
1819
content: string;
19-
url: string;
2020
}) {
2121
return (
2222
<EuiFlexGroup alignItems="center" gutterSize="s" responsive={false}>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0; you may not use this file except in compliance with the Elastic License
5+
* 2.0.
6+
*/
7+
8+
import { EuiFlexItem, EuiFlexGroup, EuiIcon, EuiText } from '@elastic/eui';
9+
import { FormattedMessage } from '@kbn/i18n-react';
10+
import React from 'react';
11+
12+
export function ContentWithResetCta({
13+
textSize,
14+
content,
15+
handleReset,
16+
}: {
17+
textSize: 's' | 'xs';
18+
content: string;
19+
handleReset: () => void;
20+
}) {
21+
return (
22+
<EuiFlexGroup alignItems="center" gutterSize="s" responsive={false}>
23+
<EuiFlexItem grow={false}>
24+
<EuiText size={textSize}>{content}</EuiText>
25+
</EuiFlexItem>
26+
<EuiFlexItem grow={false}>
27+
<EuiFlexGroup
28+
alignItems="center"
29+
justifyContent="spaceBetween"
30+
gutterSize="xs"
31+
responsive={false}
32+
>
33+
<EuiFlexItem grow={false}>
34+
<EuiIcon type="refresh" color="subdued" />
35+
</EuiFlexItem>
36+
<EuiFlexItem grow={false}>
37+
<EuiText
38+
size={textSize}
39+
color="subdued"
40+
onClick={handleReset}
41+
css={{ cursor: 'pointer' }}
42+
>
43+
<FormattedMessage
44+
id="xpack.slo.sloDetails.healthCallout.buttonTransformMissingLabel"
45+
defaultMessage="Reset"
46+
/>
47+
</EuiText>
48+
</EuiFlexItem>
49+
</EuiFlexGroup>
50+
</EuiFlexItem>
51+
</EuiFlexGroup>
52+
);
53+
}

x-pack/solutions/observability/plugins/slo/public/pages/slo_details/components/slo_details.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { Definition } from './definition/definition';
1717
import { SloDetailsAlerts } from './slo_detail_alerts';
1818
import { SloHealthCallout } from './slo_health_callout';
1919
import { SloRemoteCallout } from './slo_remote_callout';
20+
import { ActionModalProvider } from '../../../context/action_modal';
2021

2122
export const TAB_ID_URL_PARAM = 'tabId';
2223
export const OVERVIEW_TAB_ID = 'overview';
@@ -69,15 +70,17 @@ export function SloDetails({ slo, isAutoRefreshing, selectedTabId }: Props) {
6970
}
7071

7172
return (
72-
<EuiFlexGroup direction="column" gutterSize="xl">
73-
<SloRemoteCallout slo={slo} />
74-
<SloHealthCallout slo={slo} />
73+
<ActionModalProvider>
74+
<EuiFlexGroup direction="column" gutterSize="xl">
75+
<SloRemoteCallout slo={slo} />
76+
<SloHealthCallout slo={slo} />
7577

76-
<EuiFlexGroup direction="column" gutterSize="l">
77-
<BurnRatePanel slo={slo} isAutoRefreshing={isAutoRefreshing} />
78-
<HistoricalDataCharts slo={slo} isAutoRefreshing={isAutoRefreshing} />
79-
<EventsChartPanel slo={slo} range={range} />
78+
<EuiFlexGroup direction="column" gutterSize="l">
79+
<BurnRatePanel slo={slo} isAutoRefreshing={isAutoRefreshing} />
80+
<HistoricalDataCharts slo={slo} isAutoRefreshing={isAutoRefreshing} />
81+
<EventsChartPanel slo={slo} range={range} />
82+
</EuiFlexGroup>
8083
</EuiFlexGroup>
81-
</EuiFlexGroup>
84+
</ActionModalProvider>
8285
);
8386
}

0 commit comments

Comments
 (0)