-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Endpoint] Add Endpoint empty states for onboarding #69626
Merged
kevinlog
merged 25 commits into
elastic:master
from
kevinlog:task/host-list-empty-states
Jun 26, 2020
Merged
Changes from 22 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
f9982f1
add policy empty state to Host list, placeholder for add endpoint prompt
kevinlog a319fc1
add empty endpoint state
kevinlog d203642
fix types
kevinlog 08afb5a
fix test, hide total when empty state
kevinlog 899f0cf
Merge branch 'master' of github.com:kevinlog/kibana into task/host-li…
kevinlog 4316454
fix types
kevinlog 08bbc88
fix test
kevinlog 6260e5e
add policy selection to onboarding
kevinlog 1c55b23
begin unit tests
kevinlog f5e3999
additional tests
kevinlog eb4b259
add URL and roundtrip
kevinlog b9129eb
fix bug, add type
kevinlog a93a1fa
refactor middleware
kevinlog 3206882
fix selection bug
kevinlog 439e8e9
Merge branch 'master' of github.com:kevinlog/kibana into task/host-li…
kevinlog e683508
refactor route path check
kevinlog 7f656f8
make loading smoother, fix types
kevinlog 71690bf
Merge branch 'master' into task/host-list-empty-states
elasticmachine 310b8ef
address comments, fix tests
kevinlog 3529c1c
Merge branch 'master' of github.com:kevinlog/kibana into task/host-li…
kevinlog f364e74
address comments
kevinlog 8399f0e
fix test
kevinlog 18dd954
use URL, take out baseRoute
kevinlog 9689d04
Merge branch 'master' of github.com:kevinlog/kibana into task/host-li…
kevinlog d425f46
Merge branch 'master' into task/host-list-empty-states
elasticmachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'll defer to @jfsiii here, but personally I think we should parse the hash and remove the search params from it (if any), for a few reason:
ScoppedHistory
provided by Kibana's mount params), everything should just work normally (™️ famous words 😬 )basePath
the state applies to, being that we're already redirecting to a specific location. I feel that the Route state params should be meant for the View that it displays, not for the intermediate process that bridges the two routing approachesbaseRoute
for the RouteThere 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.
@jfsiii @paul-tavares my original apprehension to using
new URL()
is that I didn't see a way to get theprotocol
required to create the object without accessingwindow.location
or just faking one. I wasn't seeing it in thekibanaScopedHistory
object anywhere.After thinking about it, my understanding is that our goal here is to just use a library for URL parsing to be more safe, which makes complete sense. So, I propose we just fake the protocol so that we're able to properly create the URL object and strip out the
pathname
I'm doing this locally which is working right now. As @paul-tavares said, we could back this out when we're no longer using a hashRouter.
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.
@kevinlog The URL constructor has the signature
If we have a relative URL and are only after the pathname I think we can follow the example from
kibana/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/epm/hooks/use_links.tsx
Lines 10 to 11 in 7c22204
e.g.
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.
@jfsiii sounds good, I built the URL as above - it's all working as expected