Skip to content

[7.x] [Security Solution][Endpoint] Actions Log API (#101032)#102064

Merged
kibanamachine merged 1 commit intoelastic:7.xfrom
kibanamachine:backport/7.x/pr-101032
Jun 14, 2021
Merged

[7.x] [Security Solution][Endpoint] Actions Log API (#101032)#102064
kibanamachine merged 1 commit intoelastic:7.xfrom
kibanamachine:backport/7.x/pr-101032

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backports the following commits to 7.x:

* WIP

add tabs for endpoint details

* fetch activity log for endpoint

this is work in progress with dummy data

* refactor to hold host details and activity log within endpointDetails

* api for fetching actions log

* add a selector for getting selected agent id

* use the new api to show actions log

* review changes

* move util function to common/utils

in order to use it in endpoint_hosts as well as in trusted _apps

review suggestion

* use util function to get API path

review suggestion

* sync url params with details active tab

review suggestion

* fix types due to merge commit

refs 3722552

* use AsyncResourseState type

review suggestions

* sort entries chronologically with recent at the top

* adjust icon sizes within entries to match mocks

* remove endpoint list paging stuff (not for now)

* fix import after sync with master

* make the search bar work (sort of)

this needs to be fleshed out in a later PR

* add tests to middleware for now

* use snake case for naming routes

review changes

* rename and use own relative time function

review change

* use euiTheme tokens

review change

* add a comment

review changes

* log errors to kibana log and unwind stack

review changes

* search on two indices

* fix types

* use modified data

* distinguish between responses and actions and respective states in UI

* use indices explicitly and tune the query

* fix types after sync with master

* fix lint

* do better types

review suggestion

* add paging to API call

* add paging info to redux store for activityLog

* decouple paging action from other API requests

* use a button for now to fetch more data

* add index to fleet indices

else we get a type check error about the constant not being exported correctly
from `x-pack/plugins/fleet/common/constants/agent`

* add tests for audit log API

* do semantic paging from first request

* fix ts error

review changes

* add document id and total to API

review suggestions

* update test

* update frontend to consume the modified api correctly

* update mock

* rename action

review changes

* wrap mock into function to create anew on each test

review changes

* wrap with schema.maybe and increase page size

review changes

* ignore 404

review changes

* use i18n

review changes

* abstract logEntry component logic

review changes

* move handler logic to a service

review changes

* update response object

review changes

* fix paging to use 50 as initial fetch size

* fix translations and move custom hook to component file

review changes

* add return type

review changes

* update default value for page_size

review changes

* remove default values

review changes

https://github.com/elastic/kibana/tree/master/packages/kbn-config-schema#schemamaybe

https://github.com/elastic/kibana/tree/master/packages/kbn-config-schema#default-values

* fix mock data

refs 1f9ae70

* add selectors for data

review changes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Jun 14, 2021
@kibanamachine kibanamachine enabled auto-merge (squash) June 14, 2021 13:42
@kibanamachine
Copy link
Copy Markdown
Contributor Author

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 2242 2243 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
fleet 1006 1007 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 6.9MB 7.0MB +7.3KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 434.8KB 435.2KB +343.0B
Unknown metric groups

API count

id before after diff
fleet 1096 1097 +1

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @ashokaditya

@kibanamachine kibanamachine merged commit aa95a81 into elastic:7.x Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants