Skip to content

Add method to re-link visualizations with missing index-pattern - #132336

Merged
alexwizp merged 11 commits into
elastic:mainfrom
alexwizp:mdv
May 23, 2022
Merged

alexwizp merged 11 commits into
elastic:mainfrom
alexwizp:mdv

Conversation

@alexwizp

@alexwizp alexwizp commented May 17, 2022 •

Copy link
Copy Markdown
Contributor

Closes: #127203

Summary

This PR modifies the logic so that the user can open a classic visualization with a broken data view without navigating to the Listing Page

A custom EmbeddableError has also been added to emulate the behavior in Lens

Screen

Screen.Recording.2022-05-18.at.2.30.14.PM.mov

@elastic elastic deleted a comment from kibana-ci May 18, 2022
@alexwizp alexwizp self-assigned this May 18, 2022
@alexwizp alexwizp added v8.3.0 Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// release_note:feature Makes this part of the condensed release notes backport:skip This PR does not require backporting Feature:Visualizations Generic visualization features (in case no more specific feature label is available) labels May 18, 2022
@alexwizp

Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@alexwizp
alexwizp marked this pull request as ready for review May 18, 2022 12:37
@alexwizp
alexwizp requested review from a team as code owners May 18, 2022 12:37
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@alexwizp

Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@botelastic botelastic Bot added the Feature:Embedding Embedding content via iFrame label May 19, 2022

@flash1293 flash1293 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can't edit a TSVB panel with a broken data view reference:
Screenshot 2022-05-19 at 16 47 42

One other scenario I noticed is that on missing saved search it still behaves like before (just navigates to the listing page and can't edit from dashboard).

this.data.indexPattern = new DataView({
spec: {
id: state.data.searchSource?.index,
type: 'fallback',

@flash1293 flash1293 May 19, 2022 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm pretty sure this is not what type is meant for - it's to capture rollup vs regular data views?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What about using the default data view instead if we need to fill in something?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I just understood you used this trick to get "Data view not found" into the picker. It seems like we should take a more stable approach for that. What do you think @stratoula ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok. updated that to more legal way

@flash1293 flash1293 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested and works fine for me. LGTM!

@alexwizp

Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@alexwizp

Copy link
Copy Markdown
Contributor Author

@elastic/kibana-app-services please have a look

@ppisljar ppisljar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

app services changes LGTM

@alexwizp

Copy link
Copy Markdown
Contributor Author

@elastic/kibana-presentation please have a look

@alexwizp

Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@kibana-ci

Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
visualizations 326 327 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
visTypeTimeseries 465.3KB 463.6KB -1.7KB
visualizations 302.9KB 307.7KB +4.9KB
total +3.2KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
embeddable 4 3 -1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
visTypeTimeseries 16.5KB 17.4KB +914.0B
visualizations 46.5KB 46.8KB +313.0B
total +1.2KB

History

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

cc @alexwizp

@cqliu1 cqliu1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Dashboard changes LGTM 👍

@alexwizp
alexwizp merged commit c25b2bc into elastic:main May 23, 2022
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
…tic#132336)

* Add method to re-link visualizations with missing index-pattern

* fix CI

* push some updates

* fix navigation to TSVB

* remove 'fallback' type from DataView

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Embedding Embedding content via iFrame Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:feature Makes this part of the condensed release notes Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add method to re-link visualizations with missing index-pattern

7 participants