Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve alerts summary performance #4376

Merged
merged 14 commits into from
Sep 8, 2022

Conversation

asteriscos
Copy link
Member

@asteriscos asteriscos commented Aug 2, 2022

Description

This PR changes the way the Alerts Summary tables are created in PDF reports to improve the dashboards loading time. Now the tables configuration is the PDF report folder segregated by modules and the request to obtain the data is made by the backend of the app instead of the frontend.
This avoids unnecessary loading times when the user does not use the reporting feature.

Closes #3812

Comparative

Before

image

After

image

@asteriscos asteriscos marked this pull request as ready for review August 9, 2022 17:53
@asteriscos asteriscos self-assigned this Aug 9, 2022
width: 40
}
]
}
]
},
fim: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: This file could be deprecated. We should check and remove it if it is not necessary anymore.

@Desvelao
Copy link
Member

issue: There are some hidden visualizations in the dashboards, we should remove them.

@Desvelao Desvelao linked an issue Aug 11, 2022 that may be closed by this pull request
@AlexRuiz7
Copy link
Member

AlexRuiz7 commented Sep 1, 2022

Needs performance comparative

@asteriscos asteriscos requested a review from Desvelao September 7, 2022 10:47
@Mayons95
Copy link
Contributor

Mayons95 commented Sep 7, 2022

TR: ✔️
LGTM
Screencast from 07-09-22 09:25:09.webm

Copy link
Member

@yenienserrano yenienserrano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Screenshots

image

@Mayons95 Mayons95 self-requested a review September 8, 2022 12:18
@asteriscos asteriscos merged commit 395fb8a into 4.4-7.10 Sep 8, 2022
@asteriscos asteriscos deleted the enhance/improve-alerts-summary-performance branch September 8, 2022 12:43
github-actions bot pushed a commit that referenced this pull request Sep 8, 2022
* Reduced alerts summary bucket size

* Added Alerts Summary table class

* Added Alerts Summary table class

* Added base configuration tables

* feat: add structures for aggregation queries of summary tables of modules without selected agent

* Split extended information and added agents tables

* Code cleaning

* Added optional chaining to conditionals

* Added missing alerts summary definitions

* Delete hidden vis and fix merge conflicts

* Fix merge

* Add changelog

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
(cherry picked from commit 395fb8a)
@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2022

The backport to 4.4-1.2-wzd failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.4-1.2-wzd 4.4-1.2-wzd
# Navigate to the new working tree
cd .worktrees/backport-4.4-1.2-wzd
# Create a new branch
git switch --create backport-4376-to-4.4-1.2-wzd
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 395fb8a485e8bcac6f96a4fbc8dd07100f7dc2c7
# Push it to GitHub
git push --set-upstream origin backport-4376-to-4.4-1.2-wzd
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.4-1.2-wzd

Then, create a pull request where the base branch is 4.4-1.2-wzd and the compare/head branch is backport-4376-to-4.4-1.2-wzd.

AlexRuiz7 pushed a commit that referenced this pull request Sep 8, 2022
Improve alerts summary performance (#4376)

* Reduced alerts summary bucket size

* Added Alerts Summary table class

* Added Alerts Summary table class

* Added base configuration tables

* feat: add structures for aggregation queries of summary tables of modules without selected agent

* Split extended information and added agents tables

* Code cleaning

* Added optional chaining to conditionals

* Added missing alerts summary definitions

* Delete hidden vis and fix merge conflicts

* Fix merge

* Add changelog

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
(cherry picked from commit 395fb8a)

Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
AlexRuiz7 pushed a commit that referenced this pull request Sep 8, 2022
* Reduced alerts summary bucket size

* Added Alerts Summary table class

* Added Alerts Summary table class

* Added base configuration tables

* feat: add structures for aggregation queries of summary tables of modules without selected agent

* Split extended information and added agents tables

* Code cleaning

* Added optional chaining to conditionals

* Added missing alerts summary definitions

* Delete hidden vis and fix merge conflicts

* Fix merge

* Add changelog

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
(cherry picked from commit 395fb8a)
AlexRuiz7 added a commit that referenced this pull request Sep 8, 2022
Improve alerts summary performance (#4376)

* Reduced alerts summary bucket size

* Added Alerts Summary table class

* Added Alerts Summary table class

* Added base configuration tables

* feat: add structures for aggregation queries of summary tables of modules without selected agent

* Split extended information and added agents tables

* Code cleaning

* Added optional chaining to conditionals

* Added missing alerts summary definitions

* Delete hidden vis and fix merge conflicts

* Fix merge

* Add changelog

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
(cherry picked from commit 395fb8a)

Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce main bucket in summary visualizations
5 participants