[Enterprise Search] Update config data endpoint to v2#76970
[Enterprise Search] Update config data endpoint to v2#76970cee-chen merged 4 commits intoelastic:masterfrom
Conversation
- Update endpoint to v2 - Update data accordingly to new API structures - Update types accordingly
| publicUrl: stripTrailingSlash(data?.settings?.external_url), | ||
| readOnlyMode: !!data?.settings?.read_only_mode, | ||
| ilmEnabled: !!data?.settings?.ilm_enabled, | ||
| isFederatedAuth: !!data?.settings?.is_federated_auth, // i.e., not standard auth |
There was a problem hiding this comment.
Brian moved this to a top-level setting, not just nested under a Workplace Search specific key - I agree with him in this case since it affects both AS & WS.
So just an FYI @scottybollinger that the location of isFederatedAuth has moved, if that's okay
| workplaceSearch: { | ||
| customApiSource: { | ||
| maxDocumentByteSize: | ||
| data?.settings?.configured_limits?.workplace_search?.custom_api_source | ||
| ?.document_size_in_bytes, | ||
| totalFields: | ||
| data?.settings?.configured_limits?.workplace_search?.custom_api_source?.total_fields, | ||
| }, | ||
| }, |
There was a problem hiding this comment.
@scottybollinger Not sure if Workplace Search actually uses this configured limit data anywhere in the UI but I figured I might as well add it!
| appSearch: { | ||
| engine: { | ||
| maxDocumentByteSize: | ||
| data?.settings?.configured_limits?.app_search?.engine?.document_size_in_bytes, | ||
| maxEnginesPerMetaEngine: | ||
| data?.settings?.configured_limits?.app_search?.engine?.source_engines_per_meta_engine, | ||
| }, | ||
| }, |
There was a problem hiding this comment.
| groups: data?.settings?.workplace_search?.fp_account.groups || [], | ||
| isAdmin: !!data?.settings?.workplace_search?.fp_account?.is_admin, | ||
| canCreatePersonalSources: !!data?.settings?.workplace_search?.fp_account | ||
| account: { |
There was a problem hiding this comment.
@scottybollinger - FYI, Brian renamed fpAccount to just account and I followed suit, mostly because I think the distinction is no longer really necessary in the new Kibana world (theoretically since it's client-facing only, it shouldn't need to hold references to our old code names).
That being said, this change only affects the initial data/config endpoint & doesn't preclude you from using fpAccount in the rest of Workplace Search if your team strongly prefers to do so - just a thought that you could probably clean that var name up moving forward if you wanted to.
| isCurated: !!data?.settings?.workplace_search?.fp_account.is_curated, | ||
| viewedOnboardingPage: !!data?.settings?.workplace_search?.fp_account | ||
| .viewed_onboarding_page, | ||
| canCreateInvitations: !!data?.current_user?.workplace_search?.account |
There was a problem hiding this comment.
@scottybollinger FYI - canCreateInvitations moved from being a top-level WS key to nested under account
x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts
Outdated
Show resolved
Hide resolved
|
Will merge this in tomorrow if @brianmcgue confirms |
|
|
- ent search was fixed from camel to snake
|
Thank you for accepting my API modifications |
|
@brianmcgue They were amazing!! You're a much better API developer than me 😆 |
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
* Update our internal config/app data to v2 specs - Update endpoint to v2 - Update data accordingly to new API structures - Update types accordingly * Fix failing type check for other endpoints that use IAccount * Update role type casing - ent search was fixed from camel to snake
* master: (25 commits) [bugfix] Replace panel flyout opens 2 flyouts (elastic#76931) clean up test (elastic#76887) [Enterprise Search] Update shared API request handler (elastic#77112) [Maps] convert ESAggSource to TS (elastic#76999) Add plugin status API - take 2 (elastic#76732) Adds lens as a readable saved object for read-only dashboard users (elastic#77067) Skip checking for the reserved realm (elastic#76687) Reporting/diagnostics (elastic#74314) Reporting/Test: unskip non-screenshot tests (elastic#77088) Move metrics to setup and add cgroup metrics (elastic#76730) [Enterprise Search] Add Overview landing page/plugin (elastic#76734) First pass. Change TS type. Update OpenAPI (elastic#76434) [CI] Balance xpack ci groups a bit (elastic#77068) [Security_solution][Detections] Refactor signal ancestry to allow multiple parents (elastic#76531) [Maps] convert MetricsEditor to TS (elastic#76727) IndexMigrator: fix non blocking migration wrapper promise rejection (elastic#77018) [Enterprise Search] Update config data endpoint to v2 (elastic#76970) [ML] Add decision path charts to exploration results table (elastic#73561) Bump eventemitter3 from 4.0.0 to 4.0.7 (elastic#77016) [Ingest Pipelines] Add descriptions for ingest processors K-S (elastic#76981) ...
* master: (41 commits) [bugfix] Replace panel flyout opens 2 flyouts (elastic#76931) clean up test (elastic#76887) [Enterprise Search] Update shared API request handler (elastic#77112) [Maps] convert ESAggSource to TS (elastic#76999) Add plugin status API - take 2 (elastic#76732) Adds lens as a readable saved object for read-only dashboard users (elastic#77067) Skip checking for the reserved realm (elastic#76687) Reporting/diagnostics (elastic#74314) Reporting/Test: unskip non-screenshot tests (elastic#77088) Move metrics to setup and add cgroup metrics (elastic#76730) [Enterprise Search] Add Overview landing page/plugin (elastic#76734) First pass. Change TS type. Update OpenAPI (elastic#76434) [CI] Balance xpack ci groups a bit (elastic#77068) [Security_solution][Detections] Refactor signal ancestry to allow multiple parents (elastic#76531) [Maps] convert MetricsEditor to TS (elastic#76727) IndexMigrator: fix non blocking migration wrapper promise rejection (elastic#77018) [Enterprise Search] Update config data endpoint to v2 (elastic#76970) [ML] Add decision path charts to exploration results table (elastic#73561) Bump eventemitter3 from 4.0.0 to 4.0.7 (elastic#77016) [Ingest Pipelines] Add descriptions for ingest processors K-S (elastic#76981) ...
…rok/new-patterns-component-use-array * 'master' of github.com:elastic/kibana: (39 commits) [APM] Always load esarchives from common (elastic#77139) [Ingest Manager] Handle Legacy ES client errors (elastic#76865) [Docs] URL Drilldown (elastic#76529) [bugfix] Replace panel flyout opens 2 flyouts (elastic#76931) clean up test (elastic#76887) [Enterprise Search] Update shared API request handler (elastic#77112) [Maps] convert ESAggSource to TS (elastic#76999) Add plugin status API - take 2 (elastic#76732) Adds lens as a readable saved object for read-only dashboard users (elastic#77067) Skip checking for the reserved realm (elastic#76687) Reporting/diagnostics (elastic#74314) Reporting/Test: unskip non-screenshot tests (elastic#77088) Move metrics to setup and add cgroup metrics (elastic#76730) [Enterprise Search] Add Overview landing page/plugin (elastic#76734) First pass. Change TS type. Update OpenAPI (elastic#76434) [CI] Balance xpack ci groups a bit (elastic#77068) [Security_solution][Detections] Refactor signal ancestry to allow multiple parents (elastic#76531) [Maps] convert MetricsEditor to TS (elastic#76727) IndexMigrator: fix non blocking migration wrapper promise rejection (elastic#77018) [Enterprise Search] Update config data endpoint to v2 (elastic#76970) ... # Conflicts: # src/plugins/es_ui_shared/static/forms/hook_form_lib/components/use_array.ts
* master: (38 commits) Reporting/Test: unskip non-screenshot tests (elastic#77088) Move metrics to setup and add cgroup metrics (elastic#76730) [Enterprise Search] Add Overview landing page/plugin (elastic#76734) First pass. Change TS type. Update OpenAPI (elastic#76434) [CI] Balance xpack ci groups a bit (elastic#77068) [Security_solution][Detections] Refactor signal ancestry to allow multiple parents (elastic#76531) [Maps] convert MetricsEditor to TS (elastic#76727) IndexMigrator: fix non blocking migration wrapper promise rejection (elastic#77018) [Enterprise Search] Update config data endpoint to v2 (elastic#76970) [ML] Add decision path charts to exploration results table (elastic#73561) Bump eventemitter3 from 4.0.0 to 4.0.7 (elastic#77016) [Ingest Pipelines] Add descriptions for ingest processors K-S (elastic#76981) [Metrics UI] Replace Snapshot API with Metrics API (elastic#76253) legacy utils cleanup (elastic#76608) [ML] Account for "properties" layer in find_file_structure mappings (elastic#77035) fixed typo Upgrade to Kea 2.2 (elastic#77047) a11y tests on spaces home page including feature control (elastic#76515) [ML] Transforms list: persist pagination through refresh interval (elastic#76786) [ML] Replace all use of date_histogram interval with fixed_interval (elastic#76876) ...

Summary
This PR is a follow-up to #75616. When that PR was opened, the actual endpoint changes had yet to be implemented, and I was mostly guesstimating the new data based on hypothetical specs. Now that the inestimable @brianmcgue has given us an actual endpoint with much better organized data, we have to update our data structure, tests, and types accordingly.
QA
Checklist