-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security solution] Fixing console errors #163119
Changes from all commits
c1b4e0f
20d9ca0
b268a36
6874675
459851f
7633504
f4ebaae
366402a
313a098
66d3cfe
8729f96
4254ddf
e3b7184
dd89b93
ff2c4ae
d018cd0
930355f
1f1c644
9459f99
0141b5a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,7 @@ export const ConnectorSelector: React.FC<Props> = React.memo( | |
dropdownDisplay: ( | ||
<EuiFlexGroup gutterSize="none" key={ADD_NEW_CONNECTOR}> | ||
<EuiFlexItem grow={true}> | ||
<EuiButtonEmpty iconType="plus" size="xs"> | ||
<EuiButtonEmpty href="#" iconType="plus" size="xs"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
{i18n.ADD_NEW_CONNECTOR} | ||
</EuiButtonEmpty> | ||
</EuiFlexItem> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,7 @@ | |
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
import { | ||
EuiCard, | ||
EuiFlexGroup, | ||
EuiFlexItem, | ||
EuiImage, | ||
EuiText, | ||
EuiTitle, | ||
useEuiTheme, | ||
} from '@elastic/eui'; | ||
import { EuiCard, EuiFlexGroup, EuiFlexItem, EuiImage, EuiTitle, useEuiTheme } from '@elastic/eui'; | ||
import React from 'react'; | ||
import { css } from '@emotion/react'; | ||
import { withLink } from '../links'; | ||
|
@@ -96,11 +88,8 @@ export const LandingLinksImageCards: React.FC<LandingLinksImagesProps> = React.m | |
{isBeta && <BetaBadge text={betaOptions?.text} />} | ||
</div> | ||
} | ||
description={ | ||
<EuiText size="s" color="text" css={styles.description}> | ||
{description} | ||
</EuiText> | ||
} | ||
titleElement="span" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
description={<span css={styles.description}>{description}</span>} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
/> | ||
</EuiFlexItem> | ||
); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -261,8 +261,6 @@ export const useTimelineEventsHandler = ({ | |
totalCount: response.totalCount, | ||
updatedAt: Date.now(), | ||
}; | ||
setUpdated(newTimelineResponse.updatedAt); | ||
setTotalCount(newTimelineResponse.totalCount); | ||
if (onNextHandler) onNextHandler(newTimelineResponse); | ||
return newTimelineResponse; | ||
}); | ||
|
@@ -294,19 +292,7 @@ export const useTimelineEventsHandler = ({ | |
asyncSearch(); | ||
refetch.current = asyncSearch; | ||
}, | ||
[ | ||
skip, | ||
data, | ||
setTotalCount, | ||
entityType, | ||
dataViewId, | ||
setUpdated, | ||
addWarning, | ||
startTracking, | ||
dispatch, | ||
id, | ||
prevFilterStatus, | ||
] | ||
[skip, data, entityType, dataViewId, addWarning, startTracking, dispatch, id, prevFilterStatus] | ||
); | ||
|
||
useEffect(() => { | ||
|
@@ -392,6 +378,13 @@ export const useTimelineEventsHandler = ({ | |
filterStatus, | ||
]); | ||
|
||
useEffect(() => { | ||
if (timelineResponse.totalCount > -1) { | ||
setUpdated(timelineResponse.updatedAt); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
setTotalCount(timelineResponse.totalCount); | ||
} | ||
}, [setTotalCount, setUpdated, timelineResponse]); | ||
|
||
const timelineEventsSearchHandler = useCallback( | ||
(onNextHandler?: OnNextResponseHandler) => { | ||
if (!deepEqual(prevTimelineRequest.current, timelineRequest)) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,13 +63,19 @@ export const useFieldBrowserOptions: UseFieldBrowserOptions = ({ | |
scopeIdSelector(state, sourcererScope) | ||
); | ||
useEffect(() => { | ||
let ignore = false; | ||
const fetchAndSetDataView = async (dataViewId: string) => { | ||
const aDatView = await dataViews.get(dataViewId); | ||
if (ignore) return; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
setDataView(aDatView); | ||
}; | ||
if (selectedDataViewId != null && !missingPatterns.length) { | ||
fetchAndSetDataView(selectedDataViewId); | ||
} | ||
|
||
return () => { | ||
ignore = true; | ||
}; | ||
}, [selectedDataViewId, missingPatterns, dataViews]); | ||
|
||
const openFieldEditor = useCallback<OpenFieldEditor>( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -214,6 +214,13 @@ export const useTimelineEventsHandler = ({ | |
loadPage: wrappedLoadPage, | ||
updatedAt: 0, | ||
}); | ||
|
||
useEffect(() => { | ||
if (timelineResponse.updatedAt !== 0) { | ||
setUpdated(timelineResponse.updatedAt); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
}, [setUpdated, timelineResponse.updatedAt]); | ||
|
||
const { addWarning } = useAppToasts(); | ||
|
||
const timelineSearch = useCallback( | ||
|
@@ -252,7 +259,6 @@ export const useTimelineEventsHandler = ({ | |
totalCount: response.totalCount, | ||
updatedAt: Date.now(), | ||
}; | ||
setUpdated(newTimelineResponse.updatedAt); | ||
if (id === TimelineId.active) { | ||
activeTimeline.setExpandedDetail({}); | ||
activeTimeline.setPageName(pageName); | ||
|
@@ -336,7 +342,6 @@ export const useTimelineEventsHandler = ({ | |
startTracking, | ||
data.search, | ||
dataViewId, | ||
setUpdated, | ||
addWarning, | ||
refetchGrid, | ||
wrappedLoadPage, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes: