Skip to content

Commit

Permalink
Merge branch '4.9.0' into feat/6503-implement-embeddable-dashboard-on…
Browse files Browse the repository at this point in the history
…-Google-cloud
  • Loading branch information
asteriscos authored May 3, 2024
2 parents 719e553 + c5bdf90 commit f30a38c
Show file tree
Hide file tree
Showing 9 changed files with 1,131 additions and 2 deletions.
2 changes: 2 additions & 0 deletions plugins/main/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ export const DATA_SOURCE_FILTER_CONTROLLED_PINNED_AGENT = 'pinned-agent';
export const DATA_SOURCE_FILTER_CONTROLLED_CLUSTER_MANAGER = 'cluster-manager';
export const DATA_SOURCE_FILTER_CONTROLLED_VULNERABILITIES_RULE_GROUP =
'vulnerabilities-rule-group';
export const DATA_SOURCE_FILTER_CONTROLLED_DOCKER_RULE_GROUP =
'docker-rule-group';
export const DATA_SOURCE_FILTER_CONTROLLED_MITRE_ATTACK_RULE =
'mitre-attack-rule';
export const DATA_SOURCE_FILTER_CONTROLLED_MITRE_ATTACK_RULE_ID =
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { tFilter } from '../../../index';
import { DATA_SOURCE_FILTER_CONTROLLED_DOCKER_RULE_GROUP } from '../../../../../../../common/constants';
import { AlertsDataSource } from '../alerts-data-source';

const DOCKER_GROUP_KEY = 'rule.groups';
const DOCKER_GROUP_VALUE = 'docker';

export class AlertsDockerDataSource extends AlertsDataSource {
constructor(id: string, title: string) {
super(id, title);
}

getRuleGroupsFilter() {
return super.getRuleGroupsFilter(
DOCKER_GROUP_KEY,
DOCKER_GROUP_VALUE,
DATA_SOURCE_FILTER_CONTROLLED_DOCKER_RULE_GROUP,
);
}

getFixedFilters(): tFilter[] {
return [...this.getRuleGroupsFilter(), ...super.getFixedFilters()];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './alerts-docker-data-source';
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export * from './alerts-fim';
export * from './alerts-data-source-repository';
export * from './alerts-data-source';
export * from './alerts-docker';
export * from './alerts-virustotal';
export * from './alerts-malware-detection';
export * from './alerts-aws';
export * from './vulnerabilities';
Expand Down
14 changes: 12 additions & 2 deletions plugins/main/public/components/common/modules/modules-defaults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ import { mitreAttackColumns } from '../../overview/mitre/events/mitre-attack-col
import { virustotalColumns } from '../../overview/virustotal/events/virustotal-columns';
import { malwareDetectionColumns } from '../../overview/malware-detection/events/malware-detection-columns';
import { WAZUH_VULNERABILITIES_PATTERN } from '../../../../common/constants';
import { DashboardDocker } from '../../overview/docker/dashboards';
import { DashboardMalwareDetection } from '../../overview/malware-detection/dashboard';
import { DashboardFIM } from '../../overview/fim/dashboard/dashboard';
import { MitreAttackDataSource } from '../data-source/pattern/alerts/mitre-attack/mitre-attack-data-source';
import {
AlertsDockerDataSource,
AlertsDataSource,
AlertsVulnerabilitiesDataSource,
AlertsAWSDataSource,
Expand Down Expand Up @@ -322,8 +324,16 @@ export const ModulesDefaults = {
docker: {
init: 'dashboard',
tabs: [
DashboardTab,
renderDiscoverTab(DEFAULT_INDEX_PATTERN, dockerColumns),
{
id: 'dashboard',
name: 'Dashboard',
buttons: [ButtonModuleExploreAgent, ButtonModuleGenerateReport],
component: DashboardDocker,
},
renderDiscoverTab({
tableColumns: dockerColumns,
DataSource: AlertsDockerDataSource,
}),
],
availableFor: ['manager', 'agent'],
},
Expand Down
Loading

0 comments on commit f30a38c

Please sign in to comment.