Skip to content

Commit

Permalink
Fix after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
crespocarlos committed Nov 12, 2024
1 parent 535568b commit 21dd1a9
Showing 1 changed file with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { EuiSpacer } from '@elastic/eui';
import { ENTITY_TYPE } from '@kbn/observability-shared-plugin/common';
import React from 'react';
import useEffectOnce from 'react-use/lib/useEffectOnce';
import { flattenObject } from '@kbn/observability-utils/object/flatten_object';
import { useInventoryAbortableAsync } from '../../hooks/use_inventory_abortable_async';
import { useKibana } from '../../hooks/use_kibana';
import { useUnifiedSearchContext } from '../../hooks/use_unified_search_context';
Expand Down Expand Up @@ -52,15 +53,18 @@ export function GroupedInventory() {
<>
<InventorySummary totalEntities={value.entitiesCount} totalGroups={value.groups.length} />
<EuiSpacer size="m" />
{value.groups.map((group) => (
<InventoryGroupAccordion
key={`${value.groupBy}-${group[value.groupBy]}`}
groupBy={value.groupBy}
groupValue={group[value.groupBy]}
groupCount={group.count}
isLoading={loading}
/>
))}
{value.groups.map((group) => {
const groupValue = flattenObject(group)[value.groupBy];
return (
<InventoryGroupAccordion
key={`${value.groupBy}-${groupValue}`}
groupBy={value.groupBy}
groupValue={groupValue}
groupCount={group.count}
isLoading={loading}
/>
);
})}
</>
);
}

0 comments on commit 21dd1a9

Please sign in to comment.