Skip to content
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ All notable changes to the Wazuh app project will be documented in this file.
### Added

- Support for Wazuh 4.14.0
- Create Users & Groups inventories [#7554](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7554) [#7587](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7587)
- Create Users & Groups inventories [#7554](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7554) [#7587](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7587) [#7792](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7792)
- Added ability to set the Wazuh data path (wazuh directory) within the directory defined through `path.data` setting [#7586](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7586)
- Added a new Browser Extensions tab in IT Hygiene [#7641](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7641) [#7696](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7696) [#7729](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7729) [#7774](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7774)
- Added Microsoft Graph API module [#7516](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7516) [#7644](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7644) [#7661](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7661)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,60 +1,9 @@
import { buildDashboardKPIPanels } from '../../../common/create-dashboard-panels-kpis';
import { STYLE } from '../../../common/saved-vis/constants';
import {
createIndexPatternReferences,
createSearchSource,
} from '../../../common/saved-vis/create-saved-vis-data';
import { getVisStateMetricUniqueCountByField } from '../../../common/saved-vis/generators';
import {
getVisStateHorizontalBarSplitSeries,
getVisStateHorizontalBarByField,
} from '../../../../../../services/visualizations';
import { SavedVis } from '../../../common/types';

const getVisStateUniqueGroupsMetric = (indexPatternId: string): SavedVis => {
return {
id: 'it-hygiene-groups-unique-count',
title: 'Unique groups',
type: 'metric',
params: {
addTooltip: true,
addLegend: false,
type: 'metric',
metric: {
percentageMode: false,
useRanges: false,
colorSchema: 'Green to Red',
metricColorMode: 'None',
colorsRange: [
{
from: 0,
to: 10000,
},
],
labels: {
show: true,
},
invertColors: false,
style: STYLE,
},
},
data: {
searchSource: createSearchSource(indexPatternId),
references: createIndexPatternReferences(indexPatternId),
aggs: [
{
id: '1',
enabled: true,
type: 'cardinality',
params: {
field: 'group.name',
customLabel: 'Unique groups',
},
schema: 'metric',
},
],
},
};
};

export const getOverviewUsersGroupsTab = (indexPatternId: string) => {
return buildDashboardKPIPanels([
Expand All @@ -63,30 +12,14 @@ export const getOverviewUsersGroupsTab = (indexPatternId: string) => {
'group.name',
'Top 5 groups',
'it-hygiene-groups',
{ fieldCustomLabel: 'Group name' },
{ fieldCustomLabel: 'Groups' },
),
// getVisStateHorizontalBarSplitSeries(
// indexPatternId,
// 'group.is_hidden',
// 'Groups is hidden',
// 'it-hygiene-groups',
// {
// fieldSize: 4,
// otherBucket: 'Others',
// metricCustomLabel: 'Groups is hidden count',
// valueAxesTitleText: ' ',
// seriesLabel: 'Type',
// seriesMode: 'stacked',
// fieldCustomLabel: 'Type',
// },
// ),
getVisStateUniqueGroupsMetric(indexPatternId),
getVisStateHorizontalBarByField(
getVisStateMetricUniqueCountByField(
indexPatternId,
'agent.name',
'Top 5 agents',
'it-hygiene-groups',
{ fieldCustomLabel: 'Agent groups' },
'group.name',
'Unique groups',
'it-hygiene-groups-unique-count',
'Unique groups',
),
]);
};
Loading