[Security Solution] [Sourcerer] Store and type cleanup#116640
[Security Solution] [Sourcerer] Store and type cleanup#116640stephmilovic merged 52 commits intoelastic:sourcerer_kip_asfrom
Conversation
|
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
x-pack/plugins/security_solution/public/common/components/url_state/test_dependencies.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx
Outdated
Show resolved
Hide resolved
| showResults: indicesExist || defaultDataView.title.includes(`${signalIndexNameSourcerer}`), | ||
| }), | ||
| const isSignalIndexNeedsInit = useMemo( | ||
| () => !indicesExist && !defaultDataView.title.includes(`${signalIndexNameSourcerer}`), |
There was a problem hiding this comment.
signalIndexNameSourcerer seems could be null, although I guess defaultDataView.title could never includes null string, it just a bit weird to covert null to string.
There was a problem hiding this comment.
yes its for a type reason, cant check if a string includes null
| @@ -74,7 +86,8 @@ export const useInitSourcerer = ( | |||
| signalIndexName != null && | |||
There was a problem hiding this comment.
Could you please give me an example of how it happen in UI between Line86-90?
There was a problem hiding this comment.
Ok I renamed signalIndexNameSelector to signalIndexNameSourcerer so maybe that will help.
if the signal index is not loading, the signalIndexName is defined in useSignalIndex, but the signalIndexNameSourcerer has not been defined. This can happen the first time signal index is created. We also check to make sure that the Timeline sourcerer isn't already initiated and that default exists. Does that help?
if (
!loadingSignalIndex &&
signalIndexName != null &&
signalIndexNameSourcerer == null &&
(activeTimeline == null || activeTimeline.savedObjectId == null) &&
initialTimelineSourcerer.current &&
defaultDataView.id.length > 0
)
💔 Build FailedFailed CI StepsMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Summary
Let's merge this into
elastic:sourcerer_kip_asto make life easier, double bug fixing is not ideal.Closes https://github.com/elastic/security-team/issues/1730
sourcererScopestokibanaDataViewsuseSourcererScope=> now renamed touseSourcererDataViewwhich combines the redux state of thesourcererScopeand its correspondingkibanaDataViewto get the activeSourcererDataViewIIndexPatterntype toDataViewBase