-
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
[Workplace Search] Role Mappings to Kibana #93123
[Workplace Search] Role Mappings to Kibana #93123
Conversation
- Update all paths - Change router to use children instead of render props - Remove legacy app chrome
- Update all paths - Use global flash messages
- Update all paths - Use global flash messages - Add types to fix errors - Use React Router Hooks instead of legacy withRouter HOC
This is not needed because the ID is actually passed in the URL itself and is not a requirement in the body of the request
It appeared that the server sometimes sent flash messages with the API response, but I checked the Rails server code and there is no `flashMessages` sent back from the server so I am omitting that from the `RoleMappingsServerDetails` interface as well.
I did this for RoleMappings but forgot this one
Because the shared role mapping components work for both App Search and Workplace Search, the more generic string is used here because App Search has different role names.
In the case of a new role mapping, the server is called at the ‘/new’ route and the server responds without a roleMapping prop, as it has not yet been created.
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
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.
This looks great! Congratulations on migrating the last big component! 🎉
* Add routes for role mapings * Initial copy/paste * Update RoleMappingsRouter - Update all paths - Change router to use children instead of render props - Remove legacy app chrome * Update RoleMappings - Update all paths - Use global flash messages * Update RoleMapping - Update all paths - Use global flash messages - Add types to fix errors - Use React Router Hooks instead of legacy withRouter HOC * Fix path in index and add route helper * Update paths in RoleMappingsLogic * Remove history in favor of KibanaLogic.navigateToUrl * Add Role type * Remove ID prop This is not needed because the ID is actually passed in the URL itself and is not a requirement in the body of the request * Replace contextual flash messages with global It appeared that the server sometimes sent flash messages with the API response, but I checked the Rails server code and there is no `flashMessages` sent back from the server so I am omitting that from the `RoleMappingsServerDetails` interface as well. * Replace Rails http with kibana http * Fix route path * Add route and update global navigation * Add breadcrumb/page title * Update flash messages in RoleMapping I did this for RoleMappings but forgot this one * Use explicit AttributeName type instead of string * Add i18n * Fix type issue Because the shared role mapping components work for both App Search and Workplace Search, the more generic string is used here because App Search has different role names. * Add tests for components and router * Add optional to interface In the case of a new role mapping, the server is called at the ‘/new’ route and the server responds without a roleMapping prop, as it has not yet been created. * Add tests for RoleMappingsLogic Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* master: (199 commits) Convert Canvas docs to MDX for use in Elastic Docs (elastic#91969) [Bazel] More resilient Workspace Status (elastic#93244) [Discover] Change icon of saved search in open search panel and embeddable selection (elastic#93001) [Workplace Search] Role Mappings to Kibana (elastic#93123) [Fleet] Use type-only imports where possible (elastic#92979) [Lens] Set pie chart slices sorted clockwise (elastic#92617) Remove ms label from CPU load on status page (elastic#92836) [App Search] Migrate Create Meta Engine View (elastic#92127) [Time to Visualize] Disable Visualize URL Tracker When Linked to OriginatingApp (elastic#92917) [ILM] Allow multiple searchable snapshot actions (elastic#92789) Improve consistency for display of management items (elastic#92694) skip flaky suite (elastic#93152) skip flaky suite (elastic#93152) [ILM] Refactor edit_policy client integration tests into separate feature files (elastic#92826) Add developer documentation about the building blocks we offer plugin developers (elastic#92743) [Security Solution] Case ui enhancement (elastic#91863) [Security Solution] [Detections] Updates warning message when no indices match provided index patterns (elastic#93094) Collect agent telemetry even when fleet server is disabled. (elastic#93198) [Lens] Fix runtime validation error message (elastic#93195) [Lens] Remove warning about ordinal x-domain (elastic#93049) ...
* Add routes for role mapings * Initial copy/paste * Update RoleMappingsRouter - Update all paths - Change router to use children instead of render props - Remove legacy app chrome * Update RoleMappings - Update all paths - Use global flash messages * Update RoleMapping - Update all paths - Use global flash messages - Add types to fix errors - Use React Router Hooks instead of legacy withRouter HOC * Fix path in index and add route helper * Update paths in RoleMappingsLogic * Remove history in favor of KibanaLogic.navigateToUrl * Add Role type * Remove ID prop This is not needed because the ID is actually passed in the URL itself and is not a requirement in the body of the request * Replace contextual flash messages with global It appeared that the server sometimes sent flash messages with the API response, but I checked the Rails server code and there is no `flashMessages` sent back from the server so I am omitting that from the `RoleMappingsServerDetails` interface as well. * Replace Rails http with kibana http * Fix route path * Add route and update global navigation * Add breadcrumb/page title * Update flash messages in RoleMapping I did this for RoleMappings but forgot this one * Use explicit AttributeName type instead of string * Add i18n * Fix type issue Because the shared role mapping components work for both App Search and Workplace Search, the more generic string is used here because App Search has different role names. * Add tests for components and router * Add optional to interface In the case of a new role mapping, the server is called at the ‘/new’ route and the server responds without a roleMapping prop, as it has not yet been created. * Add tests for RoleMappingsLogic Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
Summary
This PR converts the Workplace Search Role Mappings component tree to Kibana
Checklist
closes https://github.com/elastic/workplace-search-team/issues/1193