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

[TSVB] Fix annotation line doesn't work if no index pattern is applied #96646

Merged
merged 5 commits into from
Apr 13, 2021

Conversation

dimaanj
Copy link
Contributor

@dimaanj dimaanj commented Apr 8, 2021

Closes #96277

Summary

Steps to reproduce:

  • Create a TSVB timeseries viz
  • Go to Annotations tab and try to config them without applying an index pattern
  • The annotations are not displayed

Expected behavior:

  • It should work for placeholder

After changes:

D4B062EC-8C1F-4FF9-B45A-47654E8D85F3

@dimaanj dimaanj requested a review from a team April 8, 2021 20:51
@dimaanj dimaanj marked this pull request as draft April 8, 2021 20:51
@lukeelmers lukeelmers added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:TSVB TSVB (Time Series Visual Builder) labels Apr 8, 2021
@stratoula stratoula requested a review from alexwizp April 12, 2021 07:59
@stratoula
Copy link
Contributor

@alexwizp can you review this first?

@@ -24,7 +24,7 @@ export function dateHistogram(
) {
return (next) => async (doc) => {
const barTargetUiSettings = await uiSettings.get(UI_SETTINGS.HISTOGRAM_BAR_TARGET);
const timeField = annotation.time_field;
const timeField = annotation.time_field || indexPattern?.timeFieldName || '';
Copy link
Contributor

Choose a reason for hiding this comment

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

We merged #95772. This PR should be updated and retested. At least indexPattern -> seriesIndex.indexPattern

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated and retested

…otations

# Conflicts:
#	src/plugins/vis_type_timeseries/server/lib/vis_data/request_processors/annotations/date_histogram.js
#	src/plugins/vis_type_timeseries/server/lib/vis_data/request_processors/annotations/query.js
#	src/plugins/vis_type_timeseries/server/lib/vis_data/request_processors/annotations/top_hits.js
Copy link
Contributor

@alexwizp alexwizp left a comment

Choose a reason for hiding this comment

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

Thank you, LGTM! Tested locally

@alexwizp
Copy link
Contributor

@elasticmachine merge upstream

@alexwizp alexwizp marked this pull request as ready for review April 13, 2021 11:06
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

LGTM, thank you Dima, tested it locally in Chrome and it works fine 👏

@stratoula
Copy link
Contributor

Jenkins test this

@alexwizp alexwizp enabled auto-merge (squash) April 13, 2021 12:56
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

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

cc @dmitriynj

@alexwizp alexwizp merged commit bc59d55 into elastic:master Apr 13, 2021
alexwizp pushed a commit to alexwizp/kibana that referenced this pull request Apr 13, 2021
elastic#96646)

* [TSVB] fix annotation line doesnt work if no index pattern is applied

* [TSVB] remove series from annotations, remove timeField placeholder

Co-authored-by: Kibana Machine <[email protected]>
alexwizp added a commit that referenced this pull request Apr 13, 2021
#96646) (#96965)

* [TSVB] fix annotation line doesnt work if no index pattern is applied

* [TSVB] remove series from annotations, remove timeField placeholder

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Dmitry Tomashevich <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💝community Feature:TSVB TSVB (Time Series Visual Builder) release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TSVB] Annotation line doesnt work if no index pattern is applied
6 participants