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

[Lens] Fix console error by passing I18nProvider to metric vis #82282

Merged
merged 2 commits into from
Nov 2, 2020

Conversation

mbondyra
Copy link
Contributor

@mbondyra mbondyra commented Nov 2, 2020

Summary

Removes this console error:
image

@mbondyra mbondyra added Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Feature:Lens v7.11.0 labels Nov 2, 2020
@mbondyra mbondyra requested review from flash1293 and a team November 2, 2020 14:05
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@@ -93,7 +93,9 @@ export const getMetricChartRenderer = (
) => {
const resolvedFormatFactory = await formatFactory;
ReactDOM.render(
<MetricChart {...config} formatFactory={resolvedFormatFactory} />,
<I18nProvider>
<MetricChart {...config} formatFactory={resolvedFormatFactory} />,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm still getting an error in the console, but a different one:
Screenshot 2020-11-02 at 16 43 31

It seems to be caused by the trailing comma in line 97 here - looks like it can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry!

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

LGTM, didn't run the code again. For reference, the error message only shows up if there is no data in the current time range and a metric like avg is used.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

async chunks size

id before after diff
lens 1.0MB 1.0MB +112.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@mbondyra mbondyra merged commit ba1b20d into elastic:master Nov 2, 2020
@mbondyra mbondyra deleted the lens/passI18nProvidertoMetric branch November 2, 2020 18:16
mbondyra added a commit to mbondyra/kibana that referenced this pull request Nov 2, 2020
…ic#82282)

* [Lens] Fix console error by passing I18nProvider to metric vis

* Update expression.tsx
mbondyra added a commit that referenced this pull request Nov 3, 2020
… (#82337)

* [Lens] Fix console error by passing I18nProvider to metric vis

* Update expression.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants