Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Custom threshold] add spaceId to viewInAppUrl #13

Conversation

maryam-saeidi
Copy link

Summary

Create a custom threshold rule as described here in a space other than default:
https://github.com/elastic/kibana/blob/main/x-pack/plugins/observability_solution/observability/dev_docs/custom_threshold.md

During rule creation, add a server log connector including [View in App]({{context.viewInAppUrl}}) as shown below.
If you want to get the log on every execution(every minute), set On check Intervals.

@@ -60,6 +62,7 @@ export const getViewInAppUrl = ({
dataset,
timeRange,
query,
spaceId,
filters: [...searchConfigurationFilters, ...groupFilters],
});
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead spaceId should be a second arg like so:

return logsExplorerLocator?.getRedirectUrl({
     dataset,
     timeRange,
     query,
     filters: [...searchConfigurationFilters, ...groupFilters],
   }, { spaceId } );

Because it isn't part of a specific locator state, but a param for building a URL

@maryam-saeidi
Copy link
Author

Thanks @Dosant!

@maryam-saeidi maryam-saeidi reopened this Nov 28, 2024
@maryam-saeidi maryam-saeidi marked this pull request as ready for review November 28, 2024 16:46
@Dosant Dosant merged commit f667382 into Dosant:d/2024-11-26-locators-space-redirect Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants