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

[Dashboard][ES|QL] Allow creating a dashboard with ES|QL chart even when there are no dataviews #196658

Merged
merged 9 commits into from
Oct 23, 2024

Conversation

stratoula
Copy link
Contributor

@stratoula stratoula commented Oct 17, 2024

Summary

Closes #176159

Try ES|QL button now navigates to dashboard with an ES|QL chart embedded.

meow

Checklist

@stratoula stratoula changed the title [Dashboard][ES|QL] Create a new dashboard on tryESQL when no dataviews [Dashboard][ES|QL] Allow creating a dashboard with ES|QL chart even when there are no dataviews Oct 17, 2024
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7160

[✅] test/functional/apps/dashboard/group6/config.ts: 25/25 tests passed.

see run history

@stratoula stratoula added v9.0.0 v8.17.0 v8.16.0 Feature:Dashboard Dashboard related features Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Feature:ES|QL ES|QL related features in Kibana release_note:enhancement backport:version Backport to applied version labels labels Oct 18, 2024
@stratoula stratoula marked this pull request as ready for review October 18, 2024 06:13
@stratoula stratoula requested review from a team as code owners October 18, 2024 06:13
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@stratoula stratoula added loe:small Small Level of Effort impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels Oct 18, 2024
@nreese nreese self-requested a review October 21, 2024 13:08
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
dashboard 667 674 +7

Async chunks

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

id before after diff
dashboard 637.5KB 642.3KB +4.7KB

Page load bundle

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

id before after diff
dashboard 50.3KB 50.4KB +45.0B
Unknown metric groups

async chunk count

id before after diff
dashboard 14 15 +1

History


const onTryESQL = useCallback(async () => {
abortController?.abort();
if (lensHelpersAsync.value && isMounted()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for adding isMounted check. isMounted check needs to happen after async functions, so after getESQLQueryColumns instead of at the beginning of the function.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thinking about this more, maybe the isMounted check is not even needed since getESQLQueryColumns request is canceled on unmount.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes I wanted to tell you the same tbh, I am removing this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

});
}
} catch (error) {
coreServices.notifications.toasts.addWarning(
Copy link
Contributor

Choose a reason for hiding this comment

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

Toast should not be displayed if error is aborted request

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, done a6da3da

@stratoula stratoula removed the v8.16.0 label Oct 22, 2024
Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

kibana-presentation changes LGTM
code review, tested in chrome

@stratoula stratoula merged commit af139b4 into elastic:main Oct 23, 2024
20 of 21 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11474367790

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 23, 2024
…hen there are no dataviews (elastic#196658)

## Summary

Closes elastic#176159

Try ES|QL button now navigates to dashboard with an ES|QL chart
embedded.

![meow](https://github.com/user-attachments/assets/47ae19f5-1ed2-49f1-aceb-1f7287f58251)

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit af139b4)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 23, 2024
…even when there are no dataviews (#196658) (#197366)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Dashboard][ES|QL] Allow creating a dashboard with ES|QL chart even
when there are no dataviews
(#196658)](#196658)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2024-10-23T06:32:01Z","message":"[Dashboard][ES|QL]
Allow creating a dashboard with ES|QL chart even when there are no
dataviews (#196658)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/176159\r\n\r\nTry ES|QL button
now navigates to dashboard with an ES|QL
chart\r\nembedded.\r\n\r\n\r\n![meow](https://github.com/user-attachments/assets/47ae19f5-1ed2-49f1-aceb-1f7287f58251)\r\n\r\n\r\n###
Checklist\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"af139b4038ad758ad0896492bf7aea0418334ef4","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Feature:Dashboard","Team:Presentation","loe:small","impact:medium","v9.0.0","Feature:ES|QL","backport:version","v8.17.0"],"title":"[Dashboard][ES|QL]
Allow creating a dashboard with ES|QL chart even when there are no
dataviews","number":196658,"url":"https://github.com/elastic/kibana/pull/196658","mergeCommit":{"message":"[Dashboard][ES|QL]
Allow creating a dashboard with ES|QL chart even when there are no
dataviews (#196658)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/176159\r\n\r\nTry ES|QL button
now navigates to dashboard with an ES|QL
chart\r\nembedded.\r\n\r\n\r\n![meow](https://github.com/user-attachments/assets/47ae19f5-1ed2-49f1-aceb-1f7287f58251)\r\n\r\n\r\n###
Checklist\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"af139b4038ad758ad0896492bf7aea0418334ef4"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196658","number":196658,"mergeCommit":{"message":"[Dashboard][ES|QL]
Allow creating a dashboard with ES|QL chart even when there are no
dataviews (#196658)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/176159\r\n\r\nTry ES|QL button
now navigates to dashboard with an ES|QL
chart\r\nembedded.\r\n\r\n\r\n![meow](https://github.com/user-attachments/assets/47ae19f5-1ed2-49f1-aceb-1f7287f58251)\r\n\r\n\r\n###
Checklist\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"af139b4038ad758ad0896492bf7aea0418334ef4"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:Dashboard Dashboard related features Feature:ES|QL ES|QL related features in Kibana impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort release_note:enhancement Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dashboard][ES|QL] Update no data views ES|QL action to open new dashboard with new inline lens panel
5 participants