-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[RCA] Fix equation for rule condition chart #193689
[RCA] Fix equation for rule condition chart #193689
Conversation
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
@@ -26,7 +26,7 @@ const genLensEqForCustomThresholdRule = (criterion: MetricExpression) => { | |||
(metric: CustomThresholdExpressionMetric) => | |||
(metricNameResolver[metric.name] = `${ | |||
AggMappingForLens[metric.aggType] ? AggMappingForLens[metric.aggType] : metric.aggType | |||
}(${metric.field ? metric.field : metric.filter ? metric.filter : ''})`) | |||
}(${metric.field ? metric.field : metric.filter ? `kql='${metric.filter}'` : ''})`) |
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.
Could you separate out this double ternary into two ternaries? Reading the double ternary is hard.
}(${metric.field ? metric.field : metric.filter ? `kql='${metric.filter}'` : ''})`) | |
const metricFilter = metric.filter ? `kql='${metric.filter}'` : ''; | |
... | |
}(${metric.field ? metric.field : metricFilter) |
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.
sure, updated in f7578a8
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @benakansara |
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.
LGTM
Resolves elastic#193688 (cherry picked from commit 913b6fe)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [[RCA] Fix equation for rule condition chart (#193689)](#193689) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Bena Kansara","email":"69037875+benakansara@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-24T14:59:35Z","message":"[RCA] Fix equation for rule condition chart (#193689)\n\nResolves https://github.com/elastic/kibana/issues/193688","sha":"913b6fed50cbbbc6e05811fa013311e98389e7d0","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","ci:project-deploy-observability","Team:obs-ux-management","v8.16.0","backport:version"],"title":"[RCA] Fix equation for rule condition chart","number":193689,"url":"https://github.com/elastic/kibana/pull/193689","mergeCommit":{"message":"[RCA] Fix equation for rule condition chart (#193689)\n\nResolves https://github.com/elastic/kibana/issues/193688","sha":"913b6fed50cbbbc6e05811fa013311e98389e7d0"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193689","number":193689,"mergeCommit":{"message":"[RCA] Fix equation for rule condition chart (#193689)\n\nResolves https://github.com/elastic/kibana/issues/193688","sha":"913b6fed50cbbbc6e05811fa013311e98389e7d0"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Bena Kansara <69037875+benakansara@users.noreply.github.com>
Resolves #193688