[AWS Onboarding] Add 'take me to my data' functionality - #290579
Supplementing merged 16 commits into
Conversation
…tep 4 Wires the 'Take me to my data' button in the Detect & Review step (Step 4) to navigate to the '[Metrics AWS] Overview' dashboard installed with the AWS integration. - Export InstalledAsset type from use_installed_content so the parent can consume individual dashboard entries - Call useInstalledContent in DetectAndReviewStep to find the overview dashboard by its canonical title; React Query deduplicates the bulk_assets request with the one already made inside <InstalledContent> - Prepend basePath to the appLink and set it as the button href so the user lands on the correct dashboard; falls back to a plain step-complete when the overview dashboard is not yet installed - Add four focused RTL tests covering href present / absent scenarios Closes elastic/ingest-dev#9232 (navigation portion) Note: the secondary item — modifying the [Metrics AWS] Overview dashboard to add cross-dashboard links like the [Elastic Agent] Overview — requires approval from the aws integration package owners before any changes to that asset. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Pinging @elastic/streams-ui (Team:streams-ui) |
…rviewDashboardUrl hook The previous implementation called useInstalledContent inside DetectAndReviewStep and then filtered its result to find the overview dashboard URL. Under CI's tsconfig.type_check.json (composite mode with project references), Fleet's type chain for GetBulkAssetsResponse couldn't be resolved from compiled .d.ts files, producing TS2339 and TS7006 type errors. Replace with a standalone useAwsOverviewDashboardUrl hook that has an explicit string | undefined return type, eliminating the Fleet type inference entirely. The hook has its own staleTime: Infinity query (same cache behaviour) and avoids importing KibanaSavedObjectType at runtime (uses the string literal 'dashboard'). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Per Julia's review: use the canonical saved-object ID to locate the [Metrics AWS] Overview dashboard instead of matching by title, so the reference stays stable if the dashboard is ever renamed. Pattern follows Fleet's getDashboardIdForSpace (dashboard_helpers.ts): match installed_kibana refs by `originId ?? id` against the canonical package ID. In the default space originId is absent and id equals the package ID; in non-default spaces Fleet re-keys the saved object so originId holds the original package ID while id is the space-local UUID. This also drops the useQuery/bulk-assets HTTP call entirely — the ref lookup is now synchronous from the already-fetched package info. Canonical ID sourced from: packages/aws/kibana/dashboard/aws-fac28650-7349-11e9-816b-07687310a99a.json Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
One space-isolation concern on the new useAwsOverviewDashboardUrl hook (inline). Otherwise the change is well-scoped and the graceful no-href fallback is sound.
Generated by Claude Reviewer for #290579 · claude · opus · 207.5 AIC · ⌖ 47.3 AIC · ⊞ 5.5K
The previous implementation only checked installed_kibana (the primary installation space). If the current Kibana space is not the space where the AWS package was originally installed, the dashboard's saved-object lives in additional_spaces_installed_kibana[currentSpaceId] with a space-local UUID and originId pointing to the canonical package ID. Mirrors Fleet's getDashboardIdForSpace pattern exactly: - Primary space (installed_kibana_space_id === currentSpaceId): use the canonical package ID directly from installed_kibana. - Non-primary space: look in additional_spaces_installed_kibana for a ref where originId === canonical ID; use that ref's space-local id. Also changes the hook signature from installedKibana: KibanaAssetReference[] to installationInfo: InstallationSnapshot | undefined so all three required fields (installed_kibana, installed_kibana_space_id, additional_spaces_installed_kibana) are available. InstallationSnapshot is a local interface since InstallationInfo is not exported from Fleet common. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…config.type_check Under CI's composite tsconfig.type_check.json, KibanaSavedObjectType resolves from compiled .d.ts files as an enum, making 'dashboard' (string literal) not assignable. Casting the test fixture objects with 'as KibanaAssetReference' is a type assertion that satisfies both local tsconfig.json and CI's tsconfig.type_check.json without needing a runtime enum value. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
One space-isolation concern on useAwsOverviewDashboardUrl (inline): the space-aware resolution added since the last review is correct in steady state, but defaulting the space id to 'default' on first render re-opens the non-default-space broken-link case during the async getActiveSpace() window. The rest of the change is well-scoped, and the graceful no-href fallback is otherwise sound.
Generated by Claude Reviewer for #290579 · claude · opus · 129.4 AIC · ⌖ 22.3 AIC · ⊞ 5.5K
…ep_components/detect_and_review_step/use_aws_overview_dashboard_url.ts Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
… async Covers the broken-link window: when the spaces service is present, currentSpaceId starts undefined so the hook returns undefined before getActiveSpace() resolves rather than emitting a primary-space id that may not exist in the current space. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
💛 Build succeeded, but was flaky
Failed CI Steps
Metrics [docs]Async chunks
Page load bundle
Unknown metric groupsshared chunks total size
total optimizer output size
Test Failures
History
|
Summary
Closes elastic/ingest-dev#9232 (navigation portion)
The "Take me to my data" button in Step 4 (Detect & Review) was a no-op — it marked the step complete but navigated nowhere. This wires it to the
[Metrics AWS] Overviewdashboard installed with the AWS integration.Important
Needs discussion — elastic/ingest-dev#9232
The second line item in the issue (adding cross-dashboard navigation links to
[Metrics AWS] Overview) is deferred pending discussion with both this team and theawspackage owners. The core tension is that any useful nav needs to be contextual — showing only the services the user actually deployed — which the static package dashboard cannot support today. Options under consideration:elastic/integrationspointing to all AWS service sub-dashboardsawspackage ownersingest_hubrenders a curated tile grid for only deployed services; each tile links to its service dashboardingest_hubrenders a dynamic nav strip above the embedded[Metrics AWS] OverviewdashboardOption D is the architecturally correct answer — the package signals intent, Kibana owns the runtime logic — but it requires upstream investment in package-spec and the Dashboard app before it can be built. Options B and C are viable near-term alternatives and are being discussed with both teams before a direction is chosen.
Testing
awsintegration installed.[Metrics AWS] Overviewdashboard.awsintegration not installed (or with no package data), the button should still be clickable and complete the step without navigating.Checklist
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.Identify risks
No significant risks. The
hrefis only set when the overview dashboard is found in the bulk assets response; the button degrades gracefully to a step-complete-only action otherwise.