Skip to content
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

[App Search] Credentials: Add final Logic and server routes #81519

Merged
merged 8 commits into from
Oct 22, 2020

Conversation

cee-chen
Copy link
Contributor

@cee-chen cee-chen commented Oct 22, 2020

PR sequence

This PR is part of a set of 3 PRs that implements the Credentials flyout form + functionality. It's broken up into PRs in the 400-800 line range so as not to open a 1700~ line PR.

List of all PRs (may be helpful for obtaining more context / QAing the entire final feature)

Summary

This PR achieves:

  • Adding CredentialsLogic.values.fullEngineAccessChecked
  • Adding CredentialsLogic.actions.onEngineSelect
  • Adding CredentialsLogic.actions.onApiTokenChange
  • Adding server API routes that CredentialsLogic.actions.onApiTokenChange calls:
    • POST /api/app_search/credentials
    • PUT /api/app_search/credentials/{name}

QA

This PR does not have easily testable changes in and of itself. It's easier to QA this against the credentials-flyout-3 branch.

Checklist

@cee-chen cee-chen added Feature:Plugins release_note:skip Skip the PR/issue when compiling release notes v7.11.0 labels Oct 22, 2020
@cee-chen cee-chen requested review from JasonStoltz and a team October 22, 2020 18:08
Comment on lines +200 to +201
describe('validates', () => {
describe('admin keys', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this is copied/pasted from the new POST route tests. In theory we could DRY it out (since both routes inherit the same exact schema), but I didn't want to over-complicate it for now.

Copy link
Member

@JasonStoltz JasonStoltz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, quick turn around on this! There's a couple of small changes we may want to consider here.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

async chunks size

id before after diff
enterpriseSearch 654.9KB 657.3KB +2.3KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cee-chen pushed a commit to cee-chen/kibana that referenced this pull request Oct 26, 2020
…81519)

* Add fullEngineAccessChecked logic

* Add onEngineSelect logic

* [Refactor] DRY out/simplify http mocks

Note: import reorder is required in for mocks to work correctly

* Add onApiTokenChange logic

* Update flyout footer to use onApiTokenChange

* Add new POST/PUT server routes

+ some opinionated comments

* [PR feedback] tests copy, extra data tests

* [PR feedback] Reuse fullEngineAccessChecked, fix fullEngineAccessChecked being undefined vs a bool
cee-chen pushed a commit that referenced this pull request Oct 26, 2020
…81540)

* Add fullEngineAccessChecked logic

* Add onEngineSelect logic

* [Refactor] DRY out/simplify http mocks

Note: import reorder is required in for mocks to work correctly

* Add onApiTokenChange logic

* Update flyout footer to use onApiTokenChange

* Add new POST/PUT server routes

+ some opinionated comments

* [PR feedback] tests copy, extra data tests

* [PR feedback] Reuse fullEngineAccessChecked, fix fullEngineAccessChecked being undefined vs a bool

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Plugins release_note:skip Skip the PR/issue when compiling release notes v7.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants