-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Reporting] Add new data-render-error attribute
#114472
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
[Reporting] Add new data-render-error attribute
#114472
Conversation
|
Pinging @elastic/kibana-reporting-services (Team:Reporting Services) |
data-render-error attribute
| } | ||
| }); | ||
|
|
||
| return errorMessages; |
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.
Seems like this should return undefined if there are no render errors, yes?
| const errorMessages: string[] = []; | ||
|
|
||
| visualizations.forEach((visualization) => { | ||
| const errorMessage = visualization.getAttribute('data-render-error'); |
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.
Couldn't a visualization possibly have elements with data-render-error but not match the layout.selectors.renderComplete selector? Seems like the render error selector should be independent of the render complete selector.
Also, there should be a [data-render-error] selector defined in the LayoutInstance, below here: https://github.com/elastic/kibana/blob/5957d31/x-pack/plugins/reporting/server/lib/layouts/index.ts#L35
| mergeMap(async () => { | ||
| // Read any data-render-error's so that users can be notified when something went wrong | ||
| return { | ||
| renderErrors: await getRenderErrors(driver, layout, logger), | ||
| }; | ||
| }), |
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.
| mergeMap(async () => { | |
| // Read any data-render-error's so that users can be notified when something went wrong | |
| return { | |
| renderErrors: await getRenderErrors(driver, layout, logger), | |
| }; | |
| }), | |
| mergeMap(async () => ({ | |
| // Read any data-render-error's so that users can be notified when something went wrong | |
| renderErrors: await getRenderErrors(driver, layout, logger), | |
| })), |
| interface ScreenSetupData { | ||
| elementsPositionAndAttributes: ElementsPositionAndAttribute[] | null; | ||
| timeRange: string | null; | ||
| renderErrors: string[]; |
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.
| renderErrors: string[]; | |
| renderErrors?: string[]; |
| elementsPositionAndAttributes: null, | ||
| timeRange: null, | ||
| error: err, | ||
| renderErrors: [], |
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.
renderErrors should be optional and left out if it is empty
tsullivan
left a comment
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.
Left a few comments about the changes
|
These changes interact with #113807. The new |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
- make renderErrors optional in interfaces - create separate selectors for data render error selector/attr - Tidy up mergeMap behaviour
tsullivan
left a comment
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
|
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / general / Chrome UI Functional Tests.test/functional/apps/discover/_indexpattern_without_timefield·ts.discover app indexpattern without timefield should switch between with and without timefield using the browser back buttonStandard OutStack TraceMetrics [docs]
History
To update your PR or re-run it, just comment with: |
* added new data-render-error attribute, read it and store it on job object * added data-render-error to the example app * added jest test * address pr feedback - make renderErrors optional in interfaces - create separate selectors for data render error selector/attr - Tidy up mergeMap behaviour * fix observable.test.ts snapshots and browser driver mock * updated jest snapshots Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…ide-users-to-saving-ux * 'master' of github.com:elastic/kibana: (133 commits) [DOCS] Indicate reports are a subscription feature (elastic#114653) Update namespace for indices (elastic#114612) [DOCS] Adds Logstash pipeline settings (elastic#114648) Bump EPR snapshot version used for tests (elastic#114529) [Security Solution] [Endpoint] Fleet summary card adjustments (elastic#114291) skip flaky suite (elastic#68400) [Visualizations] fix usage of optional dependencies (elastic#114286) [Security Solution] [Detections] Improves custom query rule upgrade test (elastic#114454) [fleet] Add Integration Preference selector (elastic#114432) [Reporting] Add new `data-render-error` attribute (elastic#114472) Replace EuiCodeEditor with CodeEditor in app-services code (elastic#114316) [data views] add getDefaultDataView method (elastic#113891) [Security Solution] [Endpoint] Event filters uses the new card design (elastic#114126) [fleet] Tweak Header UI (elastic#114704) [APM] Filter on tx metrics for instance stats (elastic#114758) [APM] Fix typo in linting docs (elastic#114764) [Discover] Removing SavedObject usage for savedSearch (elastic#112983) [Fleet] Add Integration Policy Page Improvements (elastic#114556) [Lens] Keep the custom label when transitioning to/from Formula (elastic#114270) [Security Solution][Endpoint] Host Isolation API changes (elastic#113621) ...
* added new data-render-error attribute, read it and store it on job object * added data-render-error to the example app * added jest test * address pr feedback - make renderErrors optional in interfaces - create separate selectors for data render error selector/attr - Tidy up mergeMap behaviour * fix observable.test.ts snapshots and browser driver mock * updated jest snapshots Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
Continuation of #113544.
We should close out #103561 after merging this new reporting functionality since these changes should enable improved UX for error reporting from App Services side.
How to test
--run-exampleswhen starting KibanaFollow up work
Once this is merged, we should be able to start working on: #104395 and close
Screenshots
Show render errors in report info panel
Checklist