mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[8.13] [Security Solution][Data Quality Dashboard] Add missing same-family 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)](https://github.com/elastic/kibana/pull/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\nb747657a
-78c6-4b06-91e0-414317d13d7c\r\n\r\n#### After:\r\n\r\n\r\n0878c593
-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\nb747657a
-78c6-4b06-91e0-414317d13d7c\r\n\r\n#### After:\r\n\r\n\r\n0878c593
-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\nb747657a
-78c6-4b06-91e0-414317d13d7c\r\n\r\n#### After:\r\n\r\n\r\n0878c593
-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>
This commit is contained in:
parent
5a0c20a2fc
commit
4b8fb70e5c
2 changed files with 4 additions and 1 deletions
|
@ -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,
|
||||
|
@ -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 },
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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 => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue