mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Security Solution][Data Quality Dashboard] Add missing same-family field in summary chart (#178167)
Fixes #177780 ## Summary same-field category is missing in summary tab hollow chart. This PR enables same-field category display in summary tab hollow chart. #### Before:b747657a
-78c6-4b06-91e0-414317d13d7c #### After:0878c593
-3a33-418a-94db-54d7922776f9 ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
This commit is contained in:
parent
7edaa6821e
commit
0f6c834a26
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