Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fixed a type error in `x-pack/solutions/security/plugins/security_s…
…olution/public/attack_discovery/pages/index.tsx` In `main`, the `convertToBuildEsQuery` function called in the page above accepts a parameter named `dataViewSpec`, which is typed as: ```typescript dataViewSpec: DataViewSpec | undefined; ``` In `8.x`, the `convertToBuildEsQuery` function takes a different parameter named `indexPattern` instead of `dataViewSpec`, and it's typed differently: ```typescript indexPattern: DataViewBase | undefined; ``` The page was updated to call the `convertToBuildEsQuery` function using the `8.x` version of the parameter. - fixed a type error by updating `x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/settings_flyout/alert_selection/use_data_view/index.ts` In `8.x`, when the `AlertSelectionQuery` component in `x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/settings_flyout/alert_selection/alert_selection_query/index.tsx` obtains a `sourcererDataView` via `useSourcererDataView` in the following code: ```typescript const { sourcererDataView, loading: isLoadingIndexPattern } = useSourcererDataView( SourcererScopeName.detections ); ``` the `sourcererDataView` is typed as: ```typescript const sourcererDataView: DataViewSpec | undefined ``` The `dataViewSpec` parameter of the `useDataView` hook was updated (in this 8.x branch) to reflect the fact that `sourcererDataView` may be undefined: ```typescript dataViewSpec: DataViewSpec | undefined; ``` and an additional check for `undefined` was added in `useDataView`.
- Loading branch information