-
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
[Graph] Switch to SavedObjectClient.resolve #109617
[Graph] Switch to SavedObjectClient.resolve #109617
Conversation
2497a6e
to
5ba1452
Compare
5ba1452
to
8508c8a
Compare
Pinging @elastic/kibana-vis-editors (Team:VisEditors) |
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
I'm confused by this. There are 2 screenshots and 3 test cases. I guess the first test case doesn't have a screenshot because it's just the graph with no dialogs or messages on it? It would be nice if the screenshots included the browser address bar so we could tell what URL was entered and what it was redirected to if that's what is happening. I don't understand the complete flow for the 3rd case.
I might answer some of these questions by reading the developer guide for sharing saved objects, but looking at this from the end-user perspective I'm very confused. |
Hi @LeeDr, the behavior is shared across all the saved objects (not just Graph ones) so I didn't include all the information. To get some context, it is worth to look at Joe's Sharing Saved Object guide. I've updated the screenshots with the labels, but basically
This is very well explained in this section of the guide and there's a great example here
If you click the Dismiss button, the notification disappears but when you refresh, it shows up again. You will see this everytime you open this graph. It happens because we want the user to be sure they look at the correct saved object. Quoting: "By informing the consumer that this is a conflict, the consumer can render an appropriate UI to the end-user explaining that this might not be the object they are actually looking for." so I understand it as we want the user to react and remove the one that is not correct (probably the other one).
You get redirected to the other graph. |
I reviewed the developer guide and chatted with Joe about the functionality again. It seems very unlikely anyone should hit the conflict case. They would probably either have to use the saved objects API in some strange way or hack docs in Es to get into that state. I'm still concerned that we don't really give users any clear way to "fix" the conflict case. They would either have to go into Saved Objects and delete the conflicting object. Or maybe delete an alias directly from the .kibana index. Likely would become a support case. In any case, this PR is just following the dev guide. |
Agree this is not ideal, but also we decided not to invest too much time in building a UI that is probably never going to be used. |
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.
Code review only, the test steps you have outlined look great.
Just a couple of nits in the comments below!
x-pack/plugins/graph/public/helpers/use_workspace_loader.test.tsx
Outdated
Show resolved
Hide resolved
@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.
Test locally and LGTM!
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.
Great work! Tested locally, found one issue with redirect. Once it solved, should be ready.
x-pack/plugins/graph/public/components/workspace_layout/workspace_layout.tsx
Show resolved
Hide resolved
…vedObjectClientResolve
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
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 locally one more time.
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, also did a quick test in MacOS, Chrome
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…-link-to-kibana-app * 'master' of github.com:elastic/kibana: (120 commits) [TSVB] Support custom field format (elastic#101245) [VisEditors] Add code ownership to the functional tests (elastic#111680) [Lens] Make Lens saved object share-capable (elastic#111403) [Graph] Make Graph saved object share-capable (elastic#111404) [Stack Monitoring] Add breadcrumb support (elastic#111850) Update Jira Cloud to use OAuth2.0 (elastic#111493) Show warning message when attempting to create an APM alert in stack management (elastic#111781) Skip suite blocking ES snapshot promotion (elastic#111907) Respect `auth_provider_hint` if session is not authenticated. (elastic#111521) Added in 'Responses' field in alert telemetry & updated test (elastic#111892) [Usage collection] refactor cloud detector collector (elastic#110439) Make classnames a shared dep (elastic#111636) Fix link to e2e tests in APM testing.md (elastic#111869) [Security Solution] Add host.os.name.caseless mapping and runtime field (elastic#111455) [APM] Removes the beta label from APM tutorial (elastic#111499) (elastic#111828) [RAC] [Observability] Expand Observability alerts page functional tests (elastic#111297) Fix extra white space on the alert table whe page size is 50 or 100 (elastic#111568) [Metrics UI] Add Inventory Timeline open/close state to context and URL state (elastic#111034) [Graph] Switch to SavedObjectClient.resolve (elastic#109617) [APM] Adding lambda icon (elastic#111834) ... # Conflicts: # x-pack/plugins/reporting/public/management/__snapshots__/report_listing.test.tsx.snap
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Co-authored-by: Marta Bondyra <[email protected]>
Summary
Fixes partially #105812
Screenshots
aliasMatch
conflict
How to test this
Create your own graph and export the saved object or use this one:
graph2.ndjson.zip
Follow the instructions from here to get the staging data and add it via Dev Tools to your kibana.
Using that staging data, I could test with these links (they are with my basePath
wju
, modify accordingly):Graph, exactMatch - http://localhost:5601/wju/s/test1/app/graph#/workspace/ff959d40-b880-11e8-a6d9-e546fe2bba5f-test1
Graph, aliasMatch - http://localhost:5601/wju/s/test2/app/graph#/workspace/ff959d40-b880-11e8-a6d9-e546fe2bba5f-test2 -> redirects you to the new ID for that object
Graph, conflict - http://localhost:5601/wju/s/test3/app/graph#/workspace/ff959d40-b880-11e8-a6d9-e546fe2bba5f-test3 -> clicking the button redirects you to the conflicting object that has a new ID
Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: