Skip to content

Commit 60edc17

Browse files
kibanamachineogupteelasticmachine
authored
Observability Overview fix extra basepath prepend for alerting fetch (#74465) (#74480)
Co-authored-by: Oliver Gupte <ogupte@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent 94f88a4 commit 60edc17

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

x-pack/plugins/observability/public/services/get_observability_alerts.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,12 @@ const allowedConsumers = ['apm', 'uptime', 'logs', 'metrics', 'alerts'];
1111

1212
export async function getObservabilityAlerts({ core }: { core: AppMountContext['core'] }) {
1313
try {
14-
const { data = [] }: { data: Alert[] } = await core.http.get(
15-
core.http.basePath.prepend('/api/alerts/_find'),
16-
{
17-
query: {
18-
page: 1,
19-
per_page: 20,
20-
},
21-
}
22-
);
14+
const { data = [] }: { data: Alert[] } = await core.http.get('/api/alerts/_find', {
15+
query: {
16+
page: 1,
17+
per_page: 20,
18+
},
19+
});
2320

2421
return data.filter(({ consumer }) => allowedConsumers.includes(consumer));
2522
} catch (e) {

0 commit comments

Comments
 (0)