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

[Discover] Add link from Index management #152640

Merged
merged 10 commits into from
Mar 28, 2023

Conversation

kertal
Copy link
Member

@kertal kertal commented Mar 3, 2023

Summary

While preparing a presentation about linking to Discover I figured out it would be nice the provide a link from index management to Discover, so users could directly look at the documents of their indices. The link is visible in the flyout showing details about a index or data stream, and the button opens up the selected index / data stream as an ad-hoc data view in Discover. No data view persistence upfront is needed.

Kapture.2023-03-24.at.22.55.58.mp4

Checklist

Delete any items that are not applicable to this PR.

@kertal kertal self-assigned this Mar 3, 2023
@kertal kertal changed the title Initial commit [Discover] Add link to Discover from Index management Mar 7, 2023
@kertal kertal added Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews) Feature:Index Management Index and index templates UI Feature:Discover Discover Application labels Mar 7, 2023
@kertal kertal marked this pull request as ready for review March 10, 2023 18:10
@kertal kertal requested a review from a team as a code owner March 10, 2023 18:10
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@kertal kertal added enhancement New value added to drive a business result release_note:enhancement labels Mar 10, 2023
@kertal kertal marked this pull request as draft March 10, 2023 19:04
Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

This is a really cool feature. Thanks for working on this @kertal!

One thought I had is it might be better to display the link in the details panel, rather than the table. If a user has a lot of indices/data streams, it be a little overwhelming having the same icon for each row. Although the tradeoff is it's not as discoverable (no pun intended 😅 ).

Screen Shot 2023-03-22 at 2 27 12 PM

I see the PR is still in draft. Was your expectation just to get initial thoughts on this feature?

@kertal
Copy link
Member Author

kertal commented Mar 22, 2023

This is a really cool feature. Thanks for working on this @kertal!

One thought I had is it might be better to display the link in the details panel, rather than the table. If a user has a lot of indices/data streams, it be a little overwhelming having the same icon for each row. Although the tradeoff is it's not as discoverable (no pun intended 😅 ).

Fine with that, I think having the possibility to link to the documents of the indices is what's important. we can integrate on that.

I see the PR is still in draft. Was your expectation just to get initial thoughts on this feature?

You know I started this to demonstrate how easy it is to link to Discover. Also it was always something I thought was missing, a list of indices needs a button to show the documents of the indices. So why did I not iterate on it? Lack of time. I will apply your suggestion, which is a pretty safe path for adding this.

@kertal
Copy link
Member Author

kertal commented Mar 24, 2023

@elasticmachine merge upstream

@kertal kertal marked this pull request as ready for review March 24, 2023 21:58
@kertal kertal changed the title [Discover] Add link to Discover from Index management [Discover] Add link from Index management Mar 24, 2023
…/kibana into link-index-management-to-discover
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
indexManagement 488 489 +1

Async chunks

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

id before after diff
indexManagement 525.5KB 526.0KB +587.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 433 436 +3

Total ESLint disabled count

id before after diff
securitySolution 513 516 +3

History

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

cc @kertal

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Thanks @kertal! Latest LGTM.

@jughosta
Copy link
Contributor

Would it be possible to detect that an index pattern has a time field and show a histogram on Discover page? Or at least for data streams.

@kertal
Copy link
Member Author

kertal commented Mar 28, 2023

Would it be possible to detect that an index pattern has a time field and show a histogram on Discover page? Or at least for data streams.

We have something like this in Discover:

newDataView.timeFieldName = '@timestamp';

But it's just looking for the field @timestamp and if it is date ... We could do something like this here, or we create a follow up issue this improve and centralize this logic ... eg.

  • Check if here is just a single date field ... use that
  • Check if there are several date fields, look for timestamp, @timestamp, ...
  • Check for ECS ...

WDYT? I do agree it would be convenient to have something like this, just thinking if we shouldn't aim higher for more improvement

@jughosta
Copy link
Contributor

@kertal Sure, I agree with an iterative approach! I was only concerned that showing Discover page without time based sorting and histogram for time-based indices might appear unexpected/buggy for users. If it's not the case then LGTM 👍

@kertal
Copy link
Member Author

kertal commented Mar 28, 2023

@kertal Sure, I agree with an iterative approach! I was only concerned that showing Discover page without time based sorting and histogram for time-based indices might appear unexpected/buggy for users. If it's not the case then LGTM 👍

I do agree we should further improve this area and will open an issue for that, thx for you valuable input! 👍

@kertal kertal merged commit 4f0e458 into elastic:main Mar 28, 2023
@kibanamachine kibanamachine added v8.8.0 backport:skip This commit does not require backporting labels Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting enhancement New value added to drive a business result Feature:Discover Discover Application Feature:Index Management Index and index templates UI release_note:enhancement Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews) v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants