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

[ES|QL] Render a Discover-like table in the assistant instead of a Lens chart #184106

Merged
merged 56 commits into from
Jun 5, 2024

Conversation

stratoula
Copy link
Contributor

@stratoula stratoula commented May 23, 2024

Summary

This PR does 2 things:

  • Creates a new plugin that is a wrapper of the unified datatable and is only for rendering as a table ES|QL results. The UnifiedDatatable package is good but the consumers need to know all the properties to understand how to use it and the necessity of displaying in a table the results of an ES|QL query comes a lot lately. This plugin has only 3 required properties (rows, columns, query) which make it very easy for the consumers to use it. It also integrates the Row Viewer flyout

  • It changes the implementation of the obs ai assistant to render a Discover like table instead of a Lens table. The Discover-like table is much better on rendering a table with thousands of columns and is going to be much more helpful for our users.

The same plugin can be used later for the inline ediitng flyout too in a dashboard if we want to also display the results of an ES|QL query.

Some screenshots of the new possibilities in the assistant:

  • I can see the results of an ES|QL query in a visualization

meow

  • I can render my results as a Document view
image image image

Checklist

Delete any items that are not applicable to this PR.

@stratoula stratoula changed the title [ES|QL] Datatable plugin [ES|QL] Render a Discover table in the assistant instead of a Lens chart May 28, 2024
@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label May 31, 2024
Copy link
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

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

Hi @stratoula,

I have not checked the fully yet but leaving some initial questions.

@jughosta jughosta requested a review from a team June 4, 2024 08:52
@stratoula
Copy link
Contributor Author

/ci

Copy link
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

Copy link
Contributor

@drewdaemon drewdaemon left a comment

Choose a reason for hiding this comment

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

Awesome simplification!

Comment on lines +39 to +46
<ESQLDataGrid
rows={values}
columns={formattedColumns}
dataView={adHocDataView}
query={{ esql: query }}
flyoutType="overlay"
isTableView
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

🤩

Copy link
Member

Choose a reason for hiding this comment

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

👍 so simple and nice!

@stratoula
Copy link
Contributor Author

/ci

Copy link
Member

@dgieselaar dgieselaar left a comment

Choose a reason for hiding this comment

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

🤲🏻

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula
Copy link
Contributor Author

/ci

@kibana-ci
Copy link
Collaborator

kibana-ci commented Jun 5, 2024

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #50 / Monitoring Endpoints Kibana Overview Package (metrics-*) should get kibana rules at cluster level
  • [job] [logs] FTR Configs #50 / Monitoring Endpoints Kibana Overview Package (metrics-*) should get kibana rules at cluster level

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
esqlDataGrid - 396 +396

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/unified-data-table 80 81 +1
esqlDataGrid - 2 +2
total +3

Async chunks

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

id before after diff
cloudSecurityPosture 448.7KB 448.9KB +109.0B
discover 808.2KB 808.3KB +110.0B
esqlDataGrid - 118.6KB +118.6KB
observabilityAIAssistantApp 151.4KB 152.8KB +1.4KB
securitySolution 13.6MB 13.6MB +550.0B
slo 858.1KB 858.2KB +109.0B
total +120.9KB

Canvas Sharable Runtime

The Canvas "shareable runtime" is an bundle produced to enable running Canvas workpads outside of Kibana. This bundle is included in third-party webpages that embed canvas and therefor should be as slim as possible.

id before after diff
module count - 5499 +5499
total size - 8.9MB +8.9MB

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
@kbn/unified-data-table 2 1 -1

Page load bundle

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

id before after diff
esqlDataGrid - 9.3KB +9.3KB
observabilityAIAssistantApp 12.4KB 12.5KB +143.0B
total +9.4KB
Unknown metric groups

API count

id before after diff
@kbn/unified-data-table 152 153 +1
esqlDataGrid - 2 +2
total +3

async chunk count

id before after diff
esqlDataGrid - 5 +5

ESLint disabled line counts

id before after diff
esqlDataGrid - 2 +2

Total ESLint disabled count

id before after diff
esqlDataGrid - 2 +2

History

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

@stratoula stratoula merged commit 5860259 into elastic:main Jun 5, 2024
35 of 38 checks passed
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 ci:project-deploy-observability Create an Observability project Feature:ES|QL ES|QL related features in Kibana release_note:enhancement Team:Obs AI Assistant Observability AI Assistant v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants