-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Enterprise Search] Added a Credentials page to App Search #79749
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] Added a Credentials page to App Search #79749
Conversation
cee-chen
left a comment
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.
First pass on credentials.tsx - super excited, I see a lot of opportunity to clean up our DOM and markup here!
...gins/enterprise_search/public/applications/app_search/components/credentials/credentials.tsx
Outdated
Show resolved
Hide resolved
...gins/enterprise_search/public/applications/app_search/components/credentials/credentials.tsx
Outdated
Show resolved
Hide resolved
...gins/enterprise_search/public/applications/app_search/components/credentials/credentials.tsx
Outdated
Show resolved
Hide resolved
...gins/enterprise_search/public/applications/app_search/components/credentials/credentials.tsx
Outdated
Show resolved
Hide resolved
...gins/enterprise_search/public/applications/app_search/components/credentials/credentials.tsx
Outdated
Show resolved
Hide resolved
...gins/enterprise_search/public/applications/app_search/components/credentials/credentials.tsx
Outdated
Show resolved
Hide resolved
...gins/enterprise_search/public/applications/app_search/components/credentials/credentials.tsx
Outdated
Show resolved
Hide resolved
...gins/enterprise_search/public/applications/app_search/components/credentials/credentials.tsx
Outdated
Show resolved
Hide resolved
...gins/enterprise_search/public/applications/app_search/components/credentials/credentials.tsx
Outdated
Show resolved
Hide resolved
...gins/enterprise_search/public/applications/app_search/components/credentials/credentials.tsx
Outdated
Show resolved
Hide resolved
...enterprise_search/public/applications/app_search/components/credentials/credentials.test.tsx
Outdated
Show resolved
Hide resolved
cee-chen
left a comment
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.
Sorry, I keep hitting single comments instead of chunking my reviews haha. credentials.test.tsx looks great - have a cleanup suggestion that saves a few lines
...enterprise_search/public/applications/app_search/components/credentials/credentials.test.tsx
Outdated
Show resolved
Hide resolved
...enterprise_search/public/applications/app_search/components/credentials/credentials.test.tsx
Outdated
Show resolved
Hide resolved
cee-chen
left a comment
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.
Here's my pass on the util helpers - great stuff!
..._search/public/applications/app_search/components/credentials/utils/get_mode_display_text.ts
Show resolved
Hide resolved
..._search/public/applications/app_search/components/credentials/utils/get_mode_display_text.ts
Outdated
Show resolved
Hide resolved
...ch/public/applications/app_search/components/credentials/utils/get_mode_display_text.test.ts
Outdated
Show resolved
Hide resolved
...ch/public/applications/app_search/components/credentials/utils/get_mode_display_text.test.ts
Outdated
Show resolved
Hide resolved
...ch/public/applications/app_search/components/credentials/utils/get_mode_display_text.test.ts
Outdated
Show resolved
Hide resolved
...ublic/applications/app_search/components/credentials/utils/get_engines_display_text.test.tsx
Show resolved
Hide resolved
...ublic/applications/app_search/components/credentials/utils/get_engines_display_text.test.tsx
Show resolved
Hide resolved
...ublic/applications/app_search/components/credentials/utils/get_engines_display_text.test.tsx
Show resolved
Hide resolved
...erprise_search/public/applications/app_search/components/credentials/utils/api_token_sort.ts
Show resolved
Hide resolved
...rch/public/applications/app_search/components/credentials/utils/get_engines_display_text.tsx
Show resolved
Hide resolved
cee-chen
left a comment
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.
OK, phew, here's the credentials_list.tsx pass! I had a lot of changes so apologies for that, let me know if you'd rather look at a full diff instead of a bunch of disparate comments.
I'm going to hold off on reviewing credentials.list.test.tsx for now since it's getting to the end of my work day and it probably makes sense to wait to review once all changes have been made. Hope that's OK!
.../public/applications/app_search/components/credentials/credentials_list/credentials_list.tsx
Show resolved
Hide resolved
.../public/applications/app_search/components/credentials/credentials_list/credentials_list.tsx
Outdated
Show resolved
Hide resolved
.../public/applications/app_search/components/credentials/credentials_list/credentials_list.tsx
Show resolved
Hide resolved
.../public/applications/app_search/components/credentials/credentials_list/credentials_list.tsx
Outdated
Show resolved
Hide resolved
.../public/applications/app_search/components/credentials/credentials_list/credentials_list.tsx
Outdated
Show resolved
Hide resolved
.../public/applications/app_search/components/credentials/credentials_list/credentials_list.tsx
Outdated
Show resolved
Hide resolved
.../public/applications/app_search/components/credentials/credentials_list/credentials_list.tsx
Outdated
Show resolved
Hide resolved
.../public/applications/app_search/components/credentials/credentials_list/credentials_list.tsx
Outdated
Show resolved
Hide resolved
.../public/applications/app_search/components/credentials/credentials_list/credentials_list.tsx
Outdated
Show resolved
Hide resolved
.../public/applications/app_search/components/credentials/credentials_list/credentials_list.tsx
Outdated
Show resolved
Hide resolved
Unnecessary wrapper - we can lose it without it affecting the UI elastic#79749 (comment) Similar comment as above, this flex wrapper isn't needed elastic#79749 (comment) There's actually a semantic EUI element for this! elastic#79749 (comment) See above comment elastic#79749 (comment) See above comment elastic#79749 (comment) There's a CSS utility class for this! elastic#79749 (comment) Let's lose the generic div wrapper if we don't need it elastic#79749 (comment) See above - we also don't need the span wrapper elastic#79749 (comment)
We actually don't need to specify the I*Actions/I*Values elastic#79749 (comment) See above - awesome right? elastic#79749 (comment)
Not a change request, just me musing out loud elastic#79749 (comment)
Co-authored-by: Constance <[email protected]>
Having the 'real' text personally helps me a lot with visualizing elastic#79749 (comment)
x-pack/plugins/enterprise_search/public/applications/__mocks__/shallow_useeffect.mock.ts
Outdated
Show resolved
Hide resolved
This should be Name, not Test, right? elastic#79749 (comment) nit: let's lose the unnecessary div wrappers elastic#79749 (comment) elastic#79749 (comment) elastic#79749 (comment) elastic#79749 (comment) elastic#79749 (comment)
Just curious btw, do we need the item.name && check? elastic#79749 (comment) Would like to push for this being a little smaller elastic#79749 (comment) Would like to push for th elastic#79749 (comment) Would like to push for this being larger elastic#79749 (comment)
…/shallow_useeffect.mock.ts Co-authored-by: Constance <[email protected]>
Co-authored-by: Constance <[email protected]>
|
@constancecchen Thanks for the review. I think it's ready for a second look. |
.../public/applications/app_search/components/credentials/credentials_list/credentials_list.tsx
Outdated
Show resolved
Hide resolved
...ic/applications/app_search/components/credentials/credentials_list/credentials_list.test.tsx
Outdated
Show resolved
Hide resolved
...ic/applications/app_search/components/credentials/credentials_list/credentials_list.test.tsx
Show resolved
Hide resolved
...enterprise_search/public/applications/app_search/components/credentials/credentials.test.tsx
Show resolved
Hide resolved
.../public/applications/app_search/components/credentials/credentials_list/credentials_list.tsx
Outdated
Show resolved
Hide resolved
cee-chen
left a comment
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 is looking great! I think this is my final batch of comments!
...ic/applications/app_search/components/credentials/credentials_list/credentials_list.test.tsx
Outdated
Show resolved
Hide resolved
...ic/applications/app_search/components/credentials/credentials_list/credentials_list.test.tsx
Outdated
Show resolved
Hide resolved
...ic/applications/app_search/components/credentials/credentials_list/credentials_list.test.tsx
Outdated
Show resolved
Hide resolved
| const subject = (token: object): [any, any] => { | ||
| const copyMock = jest.fn(); | ||
| const column = columns[2]; | ||
| const wrapper = shallow(<div>{column.render(token)}</div>); | ||
| const children = wrapper.find(EuiCopy).props().children; | ||
| const copyEl = shallow(children(copyMock)); | ||
| return [copyMock, copyEl]; | ||
| }; |
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.
Ooo, this is super cool. Very nice!
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.
What is?
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.
The subject() helper - I like it a lot, we might want to DRY it out in the future if we have any more components that use EuiCopy (although I think credentials might be the only one, so nevermind haha).
...ic/applications/app_search/components/credentials/credentials_list/credentials_list.test.tsx
Outdated
Show resolved
Hide resolved
...ic/applications/app_search/components/credentials/credentials_list/credentials_list.test.tsx
Outdated
Show resolved
Hide resolved
.../public/applications/app_search/components/credentials/credentials_list/credentials_list.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Constance <[email protected]>
cee-chen
left a comment
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.
Woohoo! I did a final quick QA pass (mobile/cross-browser/screen-reader/dark-mode testing) and this all looks great. Awesome work Jason!
💚 Build SucceededMetrics [docs]@kbn/optimizer bundle module count
async chunks size
History
To update your PR or re-run it, just comment with: |
* master: (23 commits) Table visualization renderer (elastic#79455) Migrate Jest JUnit reporter to TS (elastic#79919) store sorted bundleRefExportIds (elastic#80011) update chromedriver dependency to 86.0.0 (elastic#79972) [Security Solution][Case] Fix bug when changing connectors (elastic#80002) [kbn/std] add observable helpers to aid with rxjs 7 upgrade (elastic#79752) [Security Solution][Resolver] Pill numbers in compact notation (elastic#80038) [Logs UI] Sync logs timerange with wider Kibana (elastic#79444) [DOCS] Adds quick start (elastic#78822) [Ingest Manager]Fix ingest manager UI renaming (elastic#80036) [Monitoring] Fixed internal monitoring check (elastic#79241) [Security Solution][Exception Modal] Removes list operators in exception modal for EQL rules (elastic#79871) Update development documentation about REST API best practices (elastic#80009) [Monitoring] Improve indices loading against larger metricbeat-* indices (elastic#79190) [CI] Move kibana build dir outside of repo for functional tests (elastic#80018) [kbn/optimizer] bump low or add missing limits when updating automatically (elastic#80013) [Enterprise Search] Added a Credentials page to App Search (elastic#79749) [DOCS] Canvas refresh for 7.10 (elastic#80017) [TSVB] Add ignore global filters to series options (elastic#79337) Remove this check (elastic#79202) ...
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
4 similar comments
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
@JasonStoltz would you mind running yarn backport on this when you have a chance? Thanks! |
Summary
(This PR temporarily cherry picks 3a0c9b2 until the corresponding PR is merged into master)
(Also, paging will not work until this is merged: #79747, but the logic is correct in this PR.)
This PR implements the view portion of Credentials, without:
53ace58 - This simply adds the route and a stub view
6c352b8 - This adds the Credentials Page, but without the list of credentials.
9434cc8 - This commit adds the list of Credentials to the Credentials page, printing the credential without hiding it with stars
Checklist
Delete any items that are not applicable to this PR.
For maintainers