Skip to content
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] Remove graphQL host #94592

Merged
merged 29 commits into from
Apr 6, 2021

Conversation

angorayc
Copy link
Contributor

@angorayc angorayc commented Mar 15, 2021

Summary

This PR is to remove graphQL endpoint for host entirely. Before this PR we've replace every endpoint of host with search strategy except from host details.

Steps to verify:

  1. Go to host page.
  2. Enable the dev tool of Chrome and switch to network tab, filter graphql, make sure nothing appears.
  3. Click any host name on the page and land on host details page. Wait for the page to load. Observe the network panel in dev tool, make sure no graphql request appears.

@angorayc angorayc added Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.13.0 Team:Threat Hunting Security Solution Threat Hunting Team release_note:skip Skip the PR/issue when compiling release notes labels Mar 16, 2021
@angorayc angorayc marked this pull request as ready for review March 17, 2021 13:28
@angorayc angorayc requested a review from a team as a code owner March 17, 2021 13:28
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@angorayc
Copy link
Contributor Author

@elasticmachine merge upstream

@angorayc
Copy link
Contributor Author

@elasticmachine merge upstream

@angorayc
Copy link
Contributor Author

@elasticmachine merge upstream

@angorayc
Copy link
Contributor Author

@elasticmachine merge upstream

@angorayc
Copy link
Contributor Author

@elasticmachine merge upstream

@michaelolo24 michaelolo24 requested a review from a team March 29, 2021 18:36
field: string;
};
aggs?: {
[aggSortField: string]: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure that 's aggSortField here?

Copy link
Contributor Author

@angorayc angorayc Mar 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@patrykkopycinski patrykkopycinski Mar 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we could switch to elasticsearch types now? #83808

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, replaced line 27 - 62 with estypes.AggregationContainer

import { RequestOptionsPaginated } from '../..';
import { HostsFields } from '../common';

export interface HostFirstLastSeenRequestOptions
extends Partial<RequestOptionsPaginated<HostsFields>> {
hostName: string;
order: 'asc' | 'desc';
order: Direction.asc | Direction.desc;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@angorayc
Copy link
Contributor Author

@elasticmachine merge upstream

@angorayc
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@XavierM XavierM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I think we should not just call the factoryQueryType details but hostDetails

@angorayc
Copy link
Contributor Author

angorayc commented Apr 6, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 2209 2208 -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 7.3MB 7.3MB -7.0KB

History

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

@angorayc angorayc merged commit 8b5e2fb into elastic:master Apr 6, 2021
angorayc added a commit to angorayc/kibana that referenced this pull request Apr 6, 2021
* rm host from graphql

* clean up

* rm SortRequestDirection

* fix types

* rm comment

* fix types

* fix unit test

* fix unit test

* Update x-pack/plugins/security_solution/public/hosts/components/hosts_table/columns.tsx

Co-authored-by: Xavier Mouligneau <[email protected]>

* revert assertUnreachable

* use estypes

* rename details to HostDetails

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Xavier Mouligneau <[email protected]>
angorayc added a commit that referenced this pull request Apr 6, 2021
* rm host from graphql

* clean up

* rm SortRequestDirection

* fix types

* rm comment

* fix types

* fix unit test

* fix unit test

* Update x-pack/plugins/security_solution/public/hosts/components/hosts_table/columns.tsx

Co-authored-by: Xavier Mouligneau <[email protected]>

* revert assertUnreachable

* use estypes

* rename details to HostDetails

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Xavier Mouligneau <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Xavier Mouligneau <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting Security Solution Threat Hunting Team v7.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants