-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SearchProfiler] Fix handling of bad profile data and update tab beha…
…viour (#55806) (#55971) * Fix searchprofiler's ability to handle badly formed profile data Also fix tab changing upon subsequent requests * Fix comment typo # Conflicts: # x-pack/legacy/plugins/searchprofiler/public/np_ready/application/utils/has_aggregations.ts # x-pack/legacy/plugins/searchprofiler/public/np_ready/application/utils/has_searches.ts # x-pack/plugins/searchprofiler/public/application/components/profile_tree/__tests__/profile_tree.test.tsx # x-pack/plugins/searchprofiler/public/application/containers/main/main.tsx Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
- Loading branch information
1 parent
d3d2549
commit 8a6a29b
Showing
7 changed files
with
72 additions
and
15 deletions.
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
13 changes: 13 additions & 0 deletions
13
x-pack/legacy/plugins/searchprofiler/public/np_ready/application/utils/has_aggregations.ts
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { get } from 'lodash'; | ||
import { ShardSerialized } from '../types'; | ||
|
||
export function hasAggregations(profileResponse: ShardSerialized[]) { | ||
const aggs = get(profileResponse, '[0].aggregations', []); | ||
return aggs.length > 0; | ||
} |
13 changes: 13 additions & 0 deletions
13
x-pack/legacy/plugins/searchprofiler/public/np_ready/application/utils/has_searches.ts
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { get } from 'lodash'; | ||
import { ShardSerialized } from '../types'; | ||
|
||
export function hasSearch(profileResponse: ShardSerialized[]) { | ||
const aggs = get(profileResponse, '[0].searches', []); | ||
return aggs.length > 0; | ||
} |
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