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][Endpoint] Do not display searchbar in security-trusted apps if there are no items #100853

Conversation

academo
Copy link
Contributor

@academo academo commented May 28, 2021

Summary

Do not display the search bar in the Security Administration - Trusted Apps panel if there are no items to filter out.

In addition fix two ts-server warnings in non-related tests in the same test file.

Before
image

After
image

Checklist

For maintainers

@academo academo requested a review from a team as a code owner May 28, 2021 09:12
@academo academo changed the title Do not display searchbar in security-trusted apps if there are no items [Security Solution][Endpoint] Do not display searchbar in security-trusted apps if there are no items May 28, 2021
@academo academo added v7.14.0 auto-backport Deprecated - use backport:version if exact versions are needed Team:Defend Workflows “EDR Workflows” sub-team of Security Solution labels May 28, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-onboarding-and-lifecycle-mgt (Team:Onboarding and Lifecycle Mgt)

@academo academo added release_note:skip Skip the PR/issue when compiling release notes v8.0.0 labels May 28, 2021
@@ -555,7 +563,7 @@ describe('When on the Trusted Apps Page', () => {
// to test the UI behaviours while the API call is in flight
coreStart.http.post.mockImplementation(
// @ts-ignore
async (path: string, options: HttpFetchOptions) => {
async (_path: string, options: HttpFetchOptions) => {
Copy link
Member

Choose a reason for hiding this comment

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

Nice. 🙏

@@ -555,7 +563,7 @@ describe('When on the Trusted Apps Page', () => {
// to test the UI behaviours while the API call is in flight
coreStart.http.post.mockImplementation(
// @ts-ignore
async (path: string, options: HttpFetchOptions) => {
async (_path: string, options: HttpFetchOptions) => {
Copy link
Contributor

@dasansol92 dasansol92 May 28, 2021

Choose a reason for hiding this comment

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

Out of curiosity, why did you changed this path to _path ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to silence the ts-warning about non used parameter.

Copy link
Contributor

Choose a reason for hiding this comment

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

That make sense. Personally I prefer to set an underscore without type since it's not going to be used, but both works in the same way:

async (_, options: HttpFetchOptions) => {

Thanks for fixing this warning 🤗

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, it looks way better. I'll do that next time :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I decided to change it in this PR

Copy link
Contributor

@dasansol92 dasansol92 left a comment

Choose a reason for hiding this comment

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

It LGTM!! Thanks for adding new test cases for this!! 🔥 🔥 🔥 🚢

Remove type and name from unused parameter
@academo
Copy link
Contributor Author

academo commented May 28, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

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 6.9MB +136.0B
Unknown metric groups

References to deprecated APIs

id before after diff
fleet 22 20 -2

History

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

@academo academo merged commit 4b486d3 into elastic:master May 28, 2021
@academo academo deleted the fix/trustedapps_searchbar_no_display_empty-95911 branch May 28, 2021 13:19
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request May 28, 2021
…usted apps if there are no items (elastic#100853)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request May 28, 2021
…usted apps if there are no items (#100853) (#100877)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Esteban Beltran <academo@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request May 28, 2021
* master: (77 commits)
  [RAC][Security Solution] Register Security Detection Rules with Rule Registry (elastic#96015)
  [Enterprise Search] Log warning for Kibana/EntSearch version mismatches (elastic#100809)
  updating the saved objects test to include more saved object types (elastic#100828)
  [ML] Fix categorization job view examples link when datafeed uses multiple indices (elastic#100789)
  Fixing ES archive mapping failure (elastic#100835)
  Fix bug with Observability > APM header navigation (elastic#100845)
  [Security Solution][Endpoint] Add event filters summary card to the fleet endpoint tab (elastic#100668)
  [Actions] Taking space id into account when creating email footer link (elastic#100734)
  Ensure comments on parameters in arrow functions are captured in the docs and ci metrics. (elastic#100823)
  [Security Solution] Improve find rule and find rule status route performance (elastic#99678)
  [DOCS] Adds video to introduction (elastic#100906)
  [Fleet] Improve combo box for fleet settings (elastic#100603)
  [Security Solution][Endpoint] Endpoint generator and data loader support for Host Isolation (elastic#100813)
  [DOCS] Adds Lens video (elastic#100898)
  [TSVB] [Table tab] Fix "Math" aggregation (elastic#100765)
  chore(NA): moving @kbn/io-ts-utils into bazel (elastic#100810)
  [Alerting] Adding feature flag for enabling/disabling rule import and export (elastic#100718)
  [TSVB] Fix Upgrading from 7.12.1 to 7.13.0 breaks TSVB (elastic#100864)
  [Lens] Adds dynamic table cell coloring (elastic#95217)
  [Security Solution][Endpoint] Do not display searchbar in security-trusted apps if there are no items (elastic#100853)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ Enhancement ] Search bar should not be displayed when there is no Trusted Application added
5 participants