Skip to content

Commit

Permalink
fix: renamed apps redirection URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
Desvelao committed Sep 18, 2023
1 parent 0e13f44 commit 265db5e
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 25 deletions.
28 changes: 14 additions & 14 deletions plugins/main/common/wazuh-modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@
*/
export const WAZUH_MODULES = {
general: {
title: 'Security events',
appId: 'security-events',
title: 'Threat hunting',
appId: 'threat-hunting',
description:
'Browse through your security alerts, identifying issues and threats in your environment.',
},
fim: {
title: 'Integrity monitoring',
appId: 'integrity-monitoring',
title: 'File integrity monitoring',
appId: 'file-integrity-monitoring',
description:
'Alerts related to file changes, including permissions, content, ownership and attributes.',
},
pm: {
title: 'Policy monitoring',
appId: 'policy-monitoring',
title: 'Malware detection',
appId: 'malware-detection',
description:
'Verify that your systems are configured according to your security policies baseline.',
},
vuls: {
title: 'Vulnerabilities',
appId: 'vulnerabilities',
title: 'Vulnerability detection',
appId: 'vulnerability-detection',
description:
'Discover what applications in your environment are affected by well-known vulnerabilities.',
},
Expand Down Expand Up @@ -83,7 +83,7 @@ export const WAZUH_MODULES = {
'Configuration assessment using Center of Internet Security scanner and SCAP checks.',
},
aws: {
title: 'Amazon AWS',
title: 'AWS',
appId: 'amazon-web-services',
description:
'Security events related to your Amazon AWS services, collected directly via AWS API.',
Expand All @@ -94,7 +94,7 @@ export const WAZUH_MODULES = {
description: 'Security events related to your Office 365 services.',
},
gcp: {
title: 'Google Cloud Platform',
title: 'Google Cloud',
appId: 'google-cloud',
description:
'Security events related to your Google Cloud Platform services, collected directly via GCP API.', // TODO GCP
Expand Down Expand Up @@ -138,14 +138,14 @@ export const WAZUH_MODULES = {
'Osquery can be used to expose an operating system as a high-performance relational database.',
},
sca: {
title: 'Security configuration assessment',
appId: 'security-configuration-assessment',
title: 'Configuration assessment',
appId: 'configuration-assessment',
description:
'Scan your assets as part of a configuration assessment audit.',
},
docker: {
title: 'Docker listener',
appId: 'docker-listener',
title: 'Docker',
appId: 'docker',
description:
'Monitor and collect the activity from Docker containers such as creation, running, starting, stopping or pausing events.',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ export const EventsEnhanceDiscoverCell = {
href: (content, rowData) => {
const agentId = (((rowData || {})._source || {}).agent || {}).id;
return agentId !== '000'
? getNavigationAppURL(`#/agents?tab=welcome&agent=${agentId}`)
? getNavigationAppURL(
`/app/it-hygiene#/agents?tab=welcome&agent=${agentId}`,
)
: undefined;
},
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class GroupTruncate extends React.Component {
switch (this.props.action) {
case 'redirect':
return navigateAppURL(
`/app/groups#/manager/?tab=groups&group=${group}`,
`/app/endpoint-groups#/manager/?tab=groups&group=${group}`,
);
case 'filter':
return this.filterAction(group);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function FimTable({ agent }) {

function navigateToFim(agent, router) {
store.dispatch(updateCurrentAgentData(agent));
navigateAppURL('/app/integrity-monitoring');
navigateAppURL('/app/file-integrity-monitoring');
router.reload();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { getIndexPattern } from '../../../../overview/mitre/lib';
import { buildPhraseFilter } from '../../../../../../../../src/plugins/data/common';
import rison from 'rison-node';
import { WAZUH_MODULES } from '../../../../../../common/wazuh-modules';
import { navigateAppURL } from '../../../../../react-services/navigate-app';

const selectionOptionsCompliance = [
{ value: 'pci_dss', text: 'PCI DSS' },
Expand Down Expand Up @@ -73,9 +74,9 @@ export function RequirementVis(props) {
.map(e => e.join('='))
.join('&');
// TODO: redirection to gdpr will fail
window.location.href = `/app/${
WAZUH_MODULES[params.tab].appId
}#/overview?${url}`;
navigateAppURL(
`/app/${WAZUH_MODULES[params.tab].appId}#/overview?${url}`,
);
route.reload();
} catch (error) {}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export const ScaScan = compose(
store.dispatch(
updateCurrentAgentData(this.props.agent),
);
window.location.href = navigateAppURL(
navigateAppURL(
`/app/security-configuration-assessment#/overview?tab=sca&redirectPolicy=${lastScan.policy_id}`,
);
this.router.reload();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class WzConfigurationSwitch extends Component {
agentSynchronized,
masterNodeInfo,
} = this.state;
const { agent, goGroups } = this.props; // TODO: goGroups and exportConfiguration is used for Manager and depends of AngularJS
const { agent } = this.props; // TODO: goGroups and exportConfiguration is used for Manager and depends of AngularJS
return (
<EuiPage>
<EuiPanel>
Expand All @@ -211,7 +211,7 @@ class WzConfigurationSwitch extends Component {
key={`agent-group-${key}`}
onClick={() => {
navigateAppURL(
`/app/groups#/manager/?tab=groups&group=${group}`,
`/app/endpoint-groups#/manager/?tab=groups&group=${group}`,
);
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ export default class WzRuleInfo extends Component {
iconType='popout'
aria-label='popout'
href={getNavigationAppURL(
`/app/security-events#/overview?tab=general&tabView=panels&addRuleFilter=${id}`,
`/app/thread-hunting#/overview?tab=general&tabView=panels&addRuleFilter=${id}`,
)}
target='blank'
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export class WzStatisticsOverview extends Component {
<EuiButtonEmpty
onMouseDown={e =>
navigateAppURL(
'/app/configuration#/settings?tab=configuration&category=statistics',
'/app/wazuh-plugin-settings#/settings?tab=configuration&category=statistics',
)
}
iconType='gear'
Expand Down

0 comments on commit 265db5e

Please sign in to comment.