Skip to content

Commit

Permalink
fix(performance): removed the agent evolution status visualization an…
Browse files Browse the repository at this point in the history
…d most active agent from the agents section

- removed most active agent stat
- removed agent status evolution visualization
- allowed the Details panel to grow
- changed revision to heavy load and add entries to changelog
  • Loading branch information
Desvelao authored and Tostti committed Dec 12, 2023
1 parent a055127 commit f66a544
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 85 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

All notable changes to the Wazuh app project will be documented in this file.

## Wazuh v4.7.0 - OpenSearch Dashboards 2.8.0 - Revision 04-hl

### Removed

- Removed the visualization of agent status evolution due to performance problems in environments with heavy load
- Removed the stat of most active agent in the agents section due to performance problems in environments with heavy load

### Changed

- Allowed the Details panel in Agents section to grow

## Wazuh v4.7.0 - OpenSearch Dashboards 2.8.0 - Revision 04

### Added
Expand Down
4 changes: 2 additions & 2 deletions plugins/main/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wazuh",
"version": "4.7.0",
"revision": "04",
"revision": "04-hl",
"pluginPlatform": {
"version": "2.8.0"
},
Expand Down Expand Up @@ -83,4 +83,4 @@
"redux-mock-store": "^1.5.4",
"swagger-client": "^3.19.11"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export const AgentsPreview = compose(
this.state = {
loadingAgents: false,
loadingSummary: false,
showAgentsEvolutionVisualization: true,
agentTableFilters: [],
agentStatusSummary: {
active: '-',
Expand All @@ -95,24 +94,6 @@ export const AgentsPreview = compose(
async componentDidMount() {
this._isMount = true;
this.fetchAgentStatusDetailsData();
if (this.wazuhConfig.getConfig()['wazuh.monitoring.enabled']) {
this._isMount &&
this.setState({
showAgentsEvolutionVisualization: true,
});
const tabVisualizations = new TabVisualizations();
tabVisualizations.removeAll();
tabVisualizations.setTab('general');
tabVisualizations.assign({
general: 1,
});
const filterHandler = new FilterHandler(AppState.getCurrentPattern());
await VisFactoryHandler.buildOverviewVisualizations(
filterHandler,
'general',
null,
);
}
}

componentWillUnmount() {
Expand Down Expand Up @@ -168,11 +149,9 @@ export const AgentsPreview = compose(
} = await WzRequest.apiReq('GET', '/agents', {
params: { limit: 1, sort: '-dateAdd', q: 'id!=000' },
});
const agentMostActive = await this.props.tableProps.getMostActive();
this.setState({
loadingAgents: false,
lastRegisteredAgent,
agentMostActive,
});
}
async fetchAgentStatusDetailsData() {
Expand Down Expand Up @@ -255,7 +234,7 @@ export const AgentsPreview = compose(
</EuiFlexGroup>
</EuiCard>
</EuiFlexItem>
<EuiFlexItem grow={false} className='agents-details-card'>
<EuiFlexItem className='agents-details-card'>
<EuiCard title description betaBadgeLabel='Details'>
<EuiFlexGroup wrap={true} className='group-details'>
{this.agentStatus.map(({ status, label, color }) => (
Expand Down Expand Up @@ -320,72 +299,11 @@ export const AgentsPreview = compose(
titleColor='primary'
/>
</EuiFlexItem>
{
<EuiFlexItem className='agents-link-item'>
<EuiStat
className={
this.state.agentMostActive?.name
? 'euiStatLink'
: ''
}
isLoading={this.state.loadingAgents}
title={
<EuiToolTip
position='top'
content='View agent details'
>
<EuiLink
onClick={() =>
this.showAgent(this.state.agentMostActive)
}
>
{this.state.agentMostActive?.name || '-'}
</EuiLink>
</EuiToolTip>
}
titleSize='s'
description='Most active agent'
titleColor='primary'
/>
</EuiFlexItem>
}
</EuiFlexGroup>
</EuiCard>
</EuiFlexItem>
</>
}
<EuiFlexItem
grow={false}
className='agents-evolution-visualization'
style={{
margin: !this.state.loading ? '12px' : 0,
}}
>
<EuiCard
title
description
paddingSize='none'
betaBadgeLabel='Evolution'
>
<EuiFlexGroup>
<EuiFlexItem>
<div style={{ height: evolutionIsReady ? '180px' : 0 }}>
<WzReduxProvider>
<KibanaVis
visID={'Wazuh-App-Overview-General-Agents-status'}
tab={'general'}
/>
</WzReduxProvider>
</div>
{!evolutionIsReady && (
<div className='loading-chart-xl'>
<EuiLoadingChart size='xl' />
</div>
)}
</EuiFlexItem>
</EuiFlexGroup>
</EuiCard>
</EuiFlexItem>
</EuiFlexGroup>
<EuiSpacer size='m' />
<WzReduxProvider>
Expand Down

0 comments on commit f66a544

Please sign in to comment.