-
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
Merged
Merged
Changes from 15 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
c1b4e0f
Fix dashboard page errors and field browsers error
stephmilovic 20d9ca0
revert
stephmilovic b268a36
fix discover container
stephmilovic 6874675
fix StatefulRecentTimelinesComponent
stephmilovic 459851f
Fixes OverviewComponent
stephmilovic 7633504
Merge branch 'main' into fixing_console
stephmilovic f4ebaae
Revert "fix discover container"
stephmilovic 366402a
Revert "Fixes OverviewComponent"
stephmilovic 313a098
Revert "revert"
stephmilovic 66d3cfe
revert
stephmilovic 8729f96
Merge remote-tracking branch 'upstream/main' into fixing_console
stephmilovic 4254ddf
fix d1
stephmilovic e3b7184
Fix d2
stephmilovic dd89b93
Merge branch 'main' into fixing_console
stephmilovic ff2c4ae
fix a1
stephmilovic d018cd0
Merge branch 'main' into fixing_console
stephmilovic 930355f
Merge branch 'main' into fixing_console
stephmilovic 1f1c644
Fix e1
stephmilovic 9459f99
fix merge
stephmilovic 0141b5a
fix lint
stephmilovic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>( | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: