[Unified observability] Refine typing for the data checks in the overview page#117994
[Unified observability] Refine typing for the data checks in the overview page#117994afgomez merged 10 commits intoelastic:mainfrom
Conversation
claudiopro
left a comment
There was a problem hiding this comment.
Nice cleanup! The code is much easier to reason about now 😄
Please take a look at my inline comments and address before merging.
x-pack/plugins/observability/public/components/app/section/alerts/index.tsx
Outdated
Show resolved
Hide resolved
| title={i18n.translate('xpack.observability.overview.alert.errorTitle', { | ||
| defaultMessage: "We couldn't load the alert data", | ||
| })} |
There was a problem hiding this comment.
Please move to a translations module
There was a problem hiding this comment.
I'm not sure I understand. You mean to take this out to a separate file?
There was a problem hiding this comment.
I think he means to move it to this file, but I'm not sure if these strings should be moved there.
What are the benefits of keeping the translations in one single place? I usually find this type of file difficult to maintain and I like to keep the translations inside the component. Not saying that I'm against it, but I would be happy to hear the reasoning behind that decision 😊
There was a problem hiding this comment.
I'm also not sure about the benefit of it. I feel it adds an extra layer of indirection.
@claudiopro could you elaborate on this?
There was a problem hiding this comment.
Sure, sorry for the lack of context! In RAC we use a layout where translation strings live in a translations module and import them where needed as constants, e.g. import * as i18n from './translations';. Not sure if choice is project specific, so feel free to ignore if your project has a different approach. @mgiota can provide more background. After a deeper look, it seems this approach was introduced recently by @ersin-erdal , even though @Zacqary had some doubts about generalizing it to the whole project #117488 (comment) . Feel free to ignore my comment 👍
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
claudiopro
left a comment
There was a problem hiding this comment.
Looking good to me! Let's leave the opinionated parts out of the PR for the time being.
This comment has been minimized.
This comment has been minimized.
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
|
The following labels were identified as gaps in your version labels and will be added automatically:
If any of these should not be on your pull request, please manually remove them. |
…view page (elastic#117994) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…view page (#117994) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…view page (elastic#117994) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
Closes #117638.
The
hasDatacheck for the alert rule list was not aligned with the other checks. This was confusing sometimes. This PR fixes itChecklist
Delete any items that are not applicable to this PR.