-
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][Endpoint][Response Actions] Show Actions history on Endpoint Details for platinum users #145837
Merged
ashokaditya
merged 4 commits into
elastic:main
from
ashokaditya:fix/olm-response-actions-history-5489
Nov 21, 2022
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
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
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 |
---|---|---|
|
@@ -27,6 +27,7 @@ import { RESPONSE_ACTION_API_COMMANDS_NAMES } from '../../../../common/endpoint/ | |
import { useUserPrivileges as _useUserPrivileges } from '../../../common/components/user_privileges'; | ||
import { responseActionsHttpMocks } from '../../mocks/response_actions_http_mocks'; | ||
import { waitFor } from '@testing-library/react'; | ||
import { getUserPrivilegesMockDefaultValue } from '../../../common/components/user_privileges/__mocks__'; | ||
|
||
let mockUseGetEndpointActionList: { | ||
isFetched?: boolean; | ||
|
@@ -138,8 +139,7 @@ jest.mock('../../hooks/response_actions/use_get_file_info', () => { | |
|
||
const mockUseGetEndpointsList = useGetEndpointsList as jest.Mock; | ||
|
||
// FLAKY https://github.com/elastic/kibana/issues/145635 | ||
describe.skip('Response actions history', () => { | ||
describe('Response actions history', () => { | ||
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. Assuming these tests (and the others below) are not flaky anymore because these changes. |
||
const useUserPrivilegesMock = _useUserPrivileges as jest.Mock< | ||
ReturnType<typeof _useUserPrivileges> | ||
>; | ||
|
@@ -195,6 +195,7 @@ describe.skip('Response actions history', () => { | |
...baseMockedActionList, | ||
}; | ||
jest.clearAllMocks(); | ||
useUserPrivilegesMock.mockImplementation(getUserPrivilegesMockDefaultValue); | ||
}); | ||
|
||
describe('When index does not exist yet', () => { | ||
|
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
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
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 |
---|---|---|
|
@@ -38,7 +38,7 @@ jest.mock('../../services'); | |
const mockGetActionList = getActionList as jest.Mock; | ||
const mockGetActionListByStatus = getActionListByStatus as jest.Mock; | ||
|
||
describe(' Action List Handler', () => { | ||
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. cleaned up typo here |
||
describe('Action List Handler', () => { | ||
let endpointAppContextService: EndpointAppContextService; | ||
let mockResponse: jest.Mocked<KibanaResponseFactory>; | ||
|
||
|
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.
Maybe we could name this
canAccessEndpointListActionsLog
? @paul-tavares.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.
I'm ok introducing the additional property, but can we name it consistency with how other are named? So in this case, it would be something like
canReadSingleEndpointAcitonLog
(notice I also renamed it a bit).Also, looking at this change, are we saying that Action logs can be seen in Endpoint Details panel if license is Platinum++, but Action Log page is Enterprise?
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.
Actually - never mind. I think the naming you created is good. I see there is precedence. Sorry for the noise.