-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Drilldowns] URL drilldown MVP #75450
Conversation
217b142
to
ae2e7f6
Compare
Pinging @elastic/kibana-app-arch (Team:AppArch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Let's add the text
Add variable
in front of the icon for the context variable menu - Change the switch to a checkbox for 'Open in new window' (sorry)
- Let's make the trigger picker full width
|
I'm looking at the Handlebar documentation and it mentions that I need to register a custom helper to use upper/lower case. In this case I am trying to go to the NBA.com team page (https://www.nba.com/teams/wizards) from my dashboard and the NBA URL values are case sensitive. The team names are capitalized in the data, so the page is silently redirecting away. Handlebars.registerHelper('toLowerCase', function(str) { Is there a more direct way to do this? If not, we should consider some basic operations to add helpers for things like case, left/mid/right string, etc. |
|
We discussed offline with @elastic-jb to not rush with adding more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested out in chrome linux
…down-impl # Conflicts: # x-pack/examples/ui_actions_enhanced_examples/public/dashboard_to_url_drilldown/index.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested Locally in Chrome - URL drilldown behavior looks good to me.
Code LGTM.
Additionally, I agree with @streamich's ideas about the variable dropdown in a followup. I also wonder, though if the variable dropdown needs the moustache braces around each item, or if we could place the braces when a variable is clicked. Seems much cleaner to me:
I am also wondering if we could revisit the error messaging on invalid variables and syntax.
I'm thinking that something a little more generic could be more user-friendly:
Invalid Format: "testingHello" does not exist
or just Invalid Format
Overall, looks great and works well. This is going to be a huge addition to Kibana!
Can I offer a component suggestion for the dropdown? I see that this list continues to grow and no overflow is being taken into consideration yet. We have a virtualized list component that can help with overflow, adds filter ability, etc. You can use EuiSelectable whose docs page shows an example of a popover usage. You don't have to use the icons either to signify selection, you can just handle the clicks. And the list items can be of any display you need. |
@ThomThomson, thanks for review.
|
@cchaos, thanks for the suggestion! |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really good. Approve!
@elasticmachine merge upstream |
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
page load bundle size
History
To update your PR or re-run it, just comment with: |
Summary
gold
licencebeta
to get ourselves more room for improvements based on first users feedback. Add beta badge support in action picker - [Drilldowns] Beta badge support. Mark URL Drilldown as Beta #75654points
variables. see [Drilldown] URL drilldown: support multiple values in click Dosant/kibana#5TLDR feature description
spec
Url drilldown is a new drilldown type which allows users to drilldown to internal or external URLs.
Url drilldown configuration includes destination URL and it supports dynamic variables.
Supported variables
URL drilldown will have 3 sources for variables:
kibanaBaseUrl
.{{context.panel.*}}
variables extracted from embeddable.Subtle but important difference between context and event variables is that
context
variables have real values during creation. But in case ofevent
variables we have to mock them for the user during creation.event
variables are mocked during drilldown creation. More information on these issues here: [discuss][Drilldowns] More specific triggers and trigger context samples #76226Templating language
date
. Usesmoment
and@kbn/datemath
. example:{{date "now-15d" "DD MM YYYY"}}
rison
. example{{rison context.filters}}
. or{{rison filters=context.filters}}
json
. example{{json context.filters}}
. or{{json filters=context.filters}}
Reusability considerations
Current version relies on
embeddable
and supports onlyVALUE_CLICK_TRIGGER
andRANGE_SELECT_TRIGGER
.In future we could expose extension points to support more triggers and provide more variables in a context. There was a POC with such extension points see details
In case solution needs a URL drilldown and wants more customisation then just supporting more triggers and providing custom variables, then we'd recommend to build custom URL drilldown and reuse our building blocks from
ui_actions_enhanced
.Templating UI
Is very straightforward for now, but it does the job. We have a follow up issue: #69413
Validation is pretty good already.
Checklist
Delete any items that are not applicable to this PR.
- [ ] Documentation was added for features that require explanation or tutorialsFollow up with user facing documentation URL drilldown docs #69414