[ES|QL] Navigate to create new policy page from the editor#167012
[ES|QL] Navigate to create new policy page from the editor#167012stratoula merged 9 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
packages/kbn-monaco/src/esql/lib/autocomplete/autocomplete_definitions/dynamic_commands.ts
Outdated
Show resolved
Hide resolved
| // Registers a command to redirect users to the index management page | ||
| // to create a new policy. The command is called by the buildNoPoliciesAvailableDefinition | ||
| monaco.editor.registerCommand('esql.policies.create', (...args) => { | ||
| application?.navigateToApp('management', { |
There was a problem hiding this comment.
So I'm a bit two mind here: if I type
from index | enrich _
at this point hitting enter will exit Discover and navigate to the Policy page. I'm not clicking and everything I've done so far (the ES|QL query) will be lost.
Perhaps a confirm modal would help? Or perhaps open it in another tab?
I'm all in for make it easy, but the transition feels too brutal to me.
There was a problem hiding this comment.
I hear it, I changed it to open in a new tab. I am not a fan of modals and the goal is to have a flyout so opening in a new tab is a good one for the initial release
…initions/dynamic_commands.ts Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
dej611
left a comment
There was a problem hiding this comment.
Tested and it works great now! 🎉
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Summary
When a user is writing am ES|QL query with the enrich command and doesn't have a policy then we want to navigate them from the editor to the index management page to create one.
In the future the same action can open a flyout in order for the users to not change context but we don't have it atm.