-
Notifications
You must be signed in to change notification settings - Fork 8k
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
[Infrastructure UI][Rules] Fix viewInAppUrl for custom metrics for Inventory Threshold Rule #134114
[Infrastructure UI][Rules] Fix viewInAppUrl for custom metrics for Inventory Threshold Rule #134114
Conversation
…x-broken-inventory-view-in-app-url
const criteriaCustomMetricId = fields[`${ALERT_RULE_PARAMETERS}.criteria.customMetric.id`][0]; | ||
if (criteriaCustomMetricId !== 'alert-custom-metric') { | ||
if (criteriaMetric === 'custom') { | ||
const criteriaCustomMetricId = fields[`${ALERT_RULE_PARAMETERS}.criteria.customMetric.id`][0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simianhacker This change looks reasonable to me. I am just wondering how it used to work in the first place. Here's the PR that introduced this change https://github.com/elastic/kibana/pull/113553/files#diff-173c0f4e56c53ef08415cbd7e2a1773b2bd84596e5c366be4fb55507d33265fdR2. I'll take a closer look
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why it was written that way, probably just a misunderstanding of how the custom metric stuff works.
Pinging @elastic/actionable-observability (Team: Actionable Observability) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested on an inventory rule with system.process.cpu.total.value
custom metric - lgtm
💚 Build SucceededMetrics [docs]Page load bundle
History
To update your PR or re-run it, just comment with: |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
7 similar comments
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
6 similar comments
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
…ventory Threshold Rule (#134114) * [Infrastructure UI][Rules] Fix viewInAppUrl for custom metrics for Inventory Threshold Rule * Adding test for generating link, moving custom field inside if statement Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit a020f05)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ventory Threshold Rule (#134114) (#136042) * [Infrastructure UI][Rules] Fix viewInAppUrl for custom metrics for Inventory Threshold Rule * Adding test for generating link, moving custom field inside if statement Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit a020f05) Co-authored-by: Chris Cowan <chris@chriscowan.us>
Summary
This PR fixes #134110 by fixing a faulty
if
condition in the link creation function.Checklist