Skip to content

Commit

Permalink
[8.13] [Security Solution][Data Quality Dashboard] Add missing same-f…
Browse files Browse the repository at this point in the history
…amily field in summary chart (#178167) (#178282)

# Backport

This will backport the following commits from `main` to `8.13`:
- [[Security Solution][Data Quality Dashboard] Add missing same-family
field in summary chart
(#178167)](#178167)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Karen
Grigoryan","email":"karen.grigoryan@elastic.co"},"sourceCommit":{"committedDate":"2024-03-08T09:56:08Z","message":"[Security
Solution][Data Quality Dashboard] Add missing same-family field in
summary chart (#178167)\n\nFixes #177780\r\n\r\n##
Summary\r\n\r\nsame-field category is missing in summary tab hollow
chart. This PR\r\nenables same-field category display in summary tab
hollow chart.\r\n\r\n####
Before:\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/1625373/b747657a-78c6-4b06-91e0-414317d13d7c\r\n\r\n####
After:\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/1625373/0878c593-3a33-418a-94db-54d7922776f9\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"0f6c834a26d91aaa942fc41dfe17eb13c34e2bd8","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Threat
Hunting","Team:Threat
Hunting:Explore","v8.13.0","v8.14.0"],"title":"[Security Solution][Data
Quality Dashboard] Add missing same-family field in summary
chart","number":178167,"url":"https://github.com/elastic/kibana/pull/178167","mergeCommit":{"message":"[Security
Solution][Data Quality Dashboard] Add missing same-family field in
summary chart (#178167)\n\nFixes #177780\r\n\r\n##
Summary\r\n\r\nsame-field category is missing in summary tab hollow
chart. This PR\r\nenables same-field category display in summary tab
hollow chart.\r\n\r\n####
Before:\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/1625373/b747657a-78c6-4b06-91e0-414317d13d7c\r\n\r\n####
After:\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/1625373/0878c593-3a33-418a-94db-54d7922776f9\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"0f6c834a26d91aaa942fc41dfe17eb13c34e2bd8"}},"sourceBranch":"main","suggestedTargetBranches":["8.13"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/178167","number":178167,"mergeCommit":{"message":"[Security
Solution][Data Quality Dashboard] Add missing same-family field in
summary chart (#178167)\n\nFixes #177780\r\n\r\n##
Summary\r\n\r\nsame-field category is missing in summary tab hollow
chart. This PR\r\nenables same-field category display in summary tab
hollow chart.\r\n\r\n####
Before:\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/1625373/b747657a-78c6-4b06-91e0-414317d13d7c\r\n\r\n####
After:\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/1625373/0878c593-3a33-418a-94db-54d7922776f9\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"0f6c834a26d91aaa942fc41dfe17eb13c34e2bd8"}}]}]
BACKPORT-->

Co-authored-by: Karen Grigoryan <karen.grigoryan@elastic.co>
  • Loading branch information
kibanamachine and kapral18 authored Mar 8, 2024
1 parent 5a0c20a commit 4b8fb70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { euiThemeVars } from '@kbn/ui-theme';
import { EMPTY_STAT } from '../../../helpers';

import { mockPartitionedFieldMetadata } from '../../../mock/partitioned_field_metadata/mock_partitioned_field_metadata';
import { mockPartitionedFieldMetadataWithSameFamily } from '../../../mock/partitioned_field_metadata/mock_partitioned_field_metadata_with_same_family';
import { PartitionedFieldMetadata } from '../../../types';
import {
ALL_TAB_ID,
Expand Down Expand Up @@ -38,10 +39,11 @@ import {
describe('helpers', () => {
describe('getSummaryData', () => {
test('it returns the expected `SummaryData`', () => {
expect(getSummaryData(mockPartitionedFieldMetadata)).toEqual([
expect(getSummaryData(mockPartitionedFieldMetadataWithSameFamily)).toEqual([
{ categoryId: 'incompatible', mappings: 3 },
{ categoryId: 'custom', mappings: 4 },
{ categoryId: 'ecs-compliant', mappings: 2 },
{ categoryId: 'same-family', mappings: 1 },
]);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const getSummaryData = (
{ categoryId: 'incompatible', mappings: partitionedFieldMetadata.incompatible.length },
{ categoryId: 'custom', mappings: partitionedFieldMetadata.custom.length },
{ categoryId: 'ecs-compliant', mappings: partitionedFieldMetadata.ecsCompliant.length },
{ categoryId: 'same-family', mappings: partitionedFieldMetadata.sameFamily.length },
];

export const getFillColor = (categoryId: CategoryId | string): string => {
Expand Down

0 comments on commit 4b8fb70

Please sign in to comment.