-
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
[Enterprise Search] Migrate shared role mapping components #91723
[Enterprise Search] Migrate shared role mapping components #91723
Conversation
EUI has not updated their types to include this util and no one else in Kibana uses it so falling back to the lodash equivalent
Also cleaned up shared type import
Also added new lines to match other places in Kibana
- AddRoleMappingButton - DeleteMappingCallout - RoleSelector
When trying to achieve coverage it was impossible to create a state that these fallbacks were ever triggered. It’s my assumption that these were added in ent-search to get around TypeScript errors. Added typings instead.
@JasonStoltz would you mind taking a look at this commit. It appears the change was made here in ent-search and I want to be sure my assumption and corresponding change are correct. |
...ck/plugins/enterprise_search/public/applications/shared/role_mapping/role_mappings_table.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/enterprise_search/public/applications/shared/role_mapping/attribute_selector.tsx
Outdated
Show resolved
Hide resolved
It won't let me reply to your comment so doing it here:
It is sent from the API |
x-pack/plugins/enterprise_search/public/applications/shared/role_mapping/role_selector.test.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/enterprise_search/public/applications/shared/role_mapping/role_selector.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/enterprise_search/public/applications/shared/role_mapping/role_selector.tsx
Show resolved
Hide resolved
@elasticmachine merge upstream |
x-pack/plugins/enterprise_search/public/applications/shared/role_mapping/role_selector.tsx
Outdated
Show resolved
Hide resolved
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 made a bunch of comments about small stuff, nothing major, but I thought it'd be good to clean this up now rather than needing to circle back to it later.
@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.
LGTM, Thanks for making those changes.
Side note, I had a really hard time going back through my comments and figuring out which you addressed and which you didn't. It's OK if you don't address everything, but it helps me on re-review if you let me know what you decide. Thanks!
selectedAuthProviders={['kbn_saml']} | ||
/> | ||
); | ||
const select = findAuthProvidersSelect(wrapper) as any; |
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 see you resolved this but didn't make the change. It's fine if you're choosing not to make this change, but could you just update the comments in the future so I know?
@JasonStoltz for some reason GitHub still will not let me reply to your comments inline. In regards to the overlooked, resolved comment, that was an oversight on my part. Sorry for that. When I attempt to make the change locally, it causes type errors in other places. There's actually another one on line 85 that I am not easily able to resolve without the IMO it's ok to have |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
…1723) * Initial copy/paste of components * Add types * Add constants * Replace EUI toSentenceCase with lodash startCase EUI has not updated their types to include this util and no one else in Kibana uses it so falling back to the lodash equivalent * Update paths * Fix test * Fix TypeScript issues * Remove ability check for non-federated users * Use Kibana React Router helpers Also cleaned up shared type import * Update comments * Fix failing test Also added new lines to match other places in Kibana * Add i18n * Add tests for smaller components - AddRoleMappingButton - DeleteMappingCallout - RoleSelector * Fix fallbacks When trying to achieve coverage it was impossible to create a state that these fallbacks were ever triggered. It’s my assumption that these were added in ent-search to get around TypeScript errors. Added typings instead. * Add tests for AttributeSelector * Add mocks and testSubj attrs * Add tests for RoleMappingsTable * Fix types When actually implementing these I found that these types were wrong * Refactor for better typing * Remove return type This was causing a TypeScript error and is not needed * Rename interface * Rename more interfaces * PR feedback * Add test for radio checked state * Add false radio assertion to * Update className Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* master: Ability to filter alerts by string parameters (elastic#92036) [APM] Fix for flaky correlations API test (elastic#91673) (elastic#92094) [Enterprise Search] Migrate shared role mapping components (elastic#91723) [file_upload] move ml Importer classes to file_upload plugin (elastic#91559) [Discover] Always show the "hide missing fields" toggle (elastic#91889) v2 migrations should exit process on corrupt saved object document (elastic#91465) [ML] Data Frame Analytics exploration page: filters improvements (elastic#91748) [ML] Data Frame Analytics: Improved error handling for scatterplot matrix. (elastic#91993) [coverage] speed up merging results of functional tests (elastic#92111) Adds a Reason indicator to the onClose handler in AddAlert and EditAlert (elastic#92149)
just popping in here to add my 2c, if there's a super quick fix/ alternative to |
…92214) * Initial copy/paste of components * Add types * Add constants * Replace EUI toSentenceCase with lodash startCase EUI has not updated their types to include this util and no one else in Kibana uses it so falling back to the lodash equivalent * Update paths * Fix test * Fix TypeScript issues * Remove ability check for non-federated users * Use Kibana React Router helpers Also cleaned up shared type import * Update comments * Fix failing test Also added new lines to match other places in Kibana * Add i18n * Add tests for smaller components - AddRoleMappingButton - DeleteMappingCallout - RoleSelector * Fix fallbacks When trying to achieve coverage it was impossible to create a state that these fallbacks were ever triggered. It’s my assumption that these were added in ent-search to get around TypeScript errors. Added typings instead. * Add tests for AttributeSelector * Add mocks and testSubj attrs * Add tests for RoleMappingsTable * Fix types When actually implementing these I found that these types were wrong * Refactor for better typing * Remove return type This was causing a TypeScript error and is not needed * Rename interface * Rename more interfaces * PR feedback * Add test for radio checked state * Add false radio assertion to * Update className Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
Summary
Migrate shared role mapping components from ent-search. These will be used by both App Search and Workplace Search in their respective Role Mapping sections.
Checklist