Skip to content

Commit

Permalink
Fixes redirection problem to inventory data, stats and configuration …
Browse files Browse the repository at this point in the history
…in an agent (#5685)

Fix redirect to inventory data, stats and configuration

(cherry picked from commit de033d2)
  • Loading branch information
yenienserrano authored and github-actions[bot] committed Jul 18, 2023
1 parent 33092a0 commit 3856162
Showing 1 changed file with 6 additions and 45 deletions.
51 changes: 6 additions & 45 deletions plugins/main/public/components/common/welcome/agents-welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@
*/
import React, { Component, Fragment } from 'react';
import {
EuiCard,
EuiIcon,
EuiLink,
EuiPanel,
EuiFlexItem,
EuiFlexGroup,
EuiSpacer,
EuiText,
EuiFlexGrid,
EuiButtonEmpty,
EuiTitle,
EuiPage,
EuiButton,
EuiPopover,
Expand All @@ -39,10 +37,8 @@ import {
RequirementVis,
} from './components';
import { AgentInfo } from './agents-info';
import { WAZUH_MODULES } from '../../../../common/wazuh-modules';
import store from '../../../redux/store';
import { updateGlobalBreadcrumb } from '../../../redux/actions/globalBreadcrumbActions';
import { ActionAgents } from '../../../react-services/action-agents';
import WzReduxProvider from '../../../redux/wz-redux-provider';
import MenuAgent from './components/menu-agent';
import './welcome.scss';
Expand All @@ -53,7 +49,6 @@ import { AppState } from '../../../react-services/app-state';
import { FilterHandler } from '../../../utils/filter-handler';
import { TabVisualizations } from '../../../factories/tab-visualizations';
import { updateCurrentAgentData } from '../../../redux/actions/appStateActions';
import WzTextWithTooltipIfTruncated from '../wz-text-with-tooltip-if-truncated';
import { getAngularModule } from '../../../kibana-services';
import { hasAgentSupportModule } from '../../../react-services/wz-agents';
import { withErrorBoundary, withReduxProvider } from '../hocs';
Expand Down Expand Up @@ -296,6 +291,7 @@ export const AgentsWelcome = compose(
}

renderTitle() {
const notNeedStatus = true;
return (
<EuiFlexGroup>
<EuiFlexItem className='wz-module-header-agent-title'>
Expand Down Expand Up @@ -378,43 +374,6 @@ export const AgentsWelcome = compose(
this.setState({ datePicker: { from, to } });
};

getOptions() {
return [
{ value: 'pci', text: 'PCI DSS' },
{ value: 'gdpr', text: 'GDPR' },
{ value: 'nist', text: 'NIST 800-53' },
{ value: 'hipaa', text: 'HIPAA' },
{ value: 'gpg13', text: 'GPG13' },
{ value: 'tsc', text: 'TSC' },
];
}

setSelectValue(e) {
this.setState({ selectedRequirement: e.target.value });
}

getRequirementVis() {
if (this.state.selectedRequirement === 'pci') {
return 'Wazuh-App-Agents-Welcome-Top-PCI';
}
if (this.state.selectedRequirement === 'gdpr') {
return 'Wazuh-App-Agents-Welcome-Top-GDPR';
}
if (this.state.selectedRequirement === 'hipaa') {
return 'Wazuh-App-Agents-Welcome-Top-HIPAA';
}
if (this.state.selectedRequirement === 'nist') {
return 'Wazuh-App-Agents-Welcome-Top-NIST-800-53';
}
if (this.state.selectedRequirement === 'gpg13') {
return 'Wazuh-App-Agents-Welcome-Top-GPG-13';
}
if (this.state.selectedRequirement === 'tsc') {
return 'Wazuh-App-Agents-Welcome-Top-TSC';
}
return 'Wazuh-App-Agents-Welcome-Top-PCI';
}

renderMitrePanel() {
return (
<Fragment>
Expand Down Expand Up @@ -530,14 +489,16 @@ export const AgentsWelcome = compose(
The agent has been registered but has not yet connected to the
manager.
</p>
<a
<EuiLink
href={webDocumentationLink(
'user-manual/agents/agent-connection.html',
)}
external
target='_blank'
rel='noopener noreferrer'
>
Checking connection with the Wazuh server
</a>
</EuiLink>
</Fragment>
}
actions={
Expand Down

0 comments on commit 3856162

Please sign in to comment.