forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add location, fix name badge links for Synthetics SLOs (elastic#210695)
## Summary - Implements elastic#178138 - Fixes a bug where clicking on the existing link to the monitor via the name badge led failed to load any data. ## Release Notes - Fixes a bug where clicking on the name badge for a synthetics monitor on an SLO details page would lead to a page that failed to load monitor details. - Adds a working link to the location badge on synthetics SLOs that will route the user to the monitors page with a filter applied that matches the location of the origin SLO.  
- Loading branch information
1 parent
ac441ba
commit 4d3cf33
Showing
4 changed files
with
51 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...utions/observability/plugins/synthetics/public/apps/locators/group_monitor_by_location.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { syntheticsMonitorLocationQueryLocatorID } from '@kbn/observability-plugin/common'; | ||
|
||
async function navigate({ locationId }: { locationId: string }) { | ||
const locations = encodeURIComponent(JSON.stringify([locationId])); | ||
|
||
return { | ||
app: 'synthetics', | ||
path: `?locations=${[locations]}`, | ||
state: {}, | ||
}; | ||
} | ||
|
||
export const monitorLocationNavigatorParams = { | ||
id: syntheticsMonitorLocationQueryLocatorID, | ||
getLocation: navigate, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters