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

Add overview home last 24 hours KPI #6379

Merged
merged 7 commits into from
Feb 1, 2024

Conversation

asteriscos
Copy link
Member

@asteriscos asteriscos commented Jan 31, 2024

Description

This pull request removes the pending and never connected agents KPIs from the home view and also adds a new last 24 hours alerts KPI.

The last 24 hours alerts KPI is a call to action that redirects to the Discover plugin with the predefined filters.

Issues Resolved

Evidence

image

Test

  • Go to Home -> Overview
  • Check the only KPIs that exist are: Active agents, Disconnected agents, Last 24 hours alerts
  • Check the Last 24 hours alerts is also a link to the Discover plugin
    • The Discover plugin must have the cluster.name or manager.name pre-filtered (whether the cluster mode is enabled or not)
    • The Discover plugin must be filtered by the last 24 hours
    • The Discover plugin must use wazuh-alerts-* index pattern
    • The results of the Discover plugin must match the Last 24 hours alerts KPI count number
  • All the cases should be tested with different APIs selected. Check the cluster.name or manager.name matches the API selected

Check List

  • All tests pass
    • yarn test:jest
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@asteriscos asteriscos self-assigned this Jan 31, 2024
@asteriscos asteriscos requested a review from a team as a code owner January 31, 2024 13:01
@asteriscos asteriscos linked an issue Jan 31, 2024 that may be closed by this pull request
4 tasks
@yenienserrano yenienserrano self-requested a review February 1, 2024 15:35
@lucianogorza lucianogorza self-requested a review February 1, 2024 16:13
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.

CR: ✅
Test: ✅

Screenshot

image
image

image
image

@lucianogorza
Copy link
Contributor

CR 🟢

Test 🟢

Without pinned agent and other pinned filters

KPI.webm

With pinned agent

KPI-pinned-agent.webm

With other pinned filters

KPI-pinned-filters.webm

Copy link
Contributor

@lucianogorza lucianogorza left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

github-actions bot commented Feb 1, 2024

Wazuh Core plugin code coverage (Jest) test % values
Statements 20.85% ( 186 / 892 )
Branches 17.91% ( 79 / 441 )
Functions 13.79% ( 36 / 261 )
Lines 21.05% ( 183 / 869 )

Copy link
Contributor

github-actions bot commented Feb 1, 2024

Wazuh Check Updates plugin code coverage (Jest) test % values
Statements 76.78% ( 172 / 224 )
Branches 58.65% ( 61 / 104 )
Functions 61.7% ( 29 / 47 )
Lines 76.78% ( 172 / 224 )

Copy link
Contributor

github-actions bot commented Feb 1, 2024

Main plugin code coverage (Jest) test % values
Statements 12.2% ( 4218 / 34558 )
Branches 8.25% ( 1916 / 23203 )
Functions 11.69% ( 962 / 8229 )
Lines 12.37% ( 4104 / 33151 )

@asteriscos asteriscos merged commit 04984b1 into 4.8.0 Feb 1, 2024
4 checks passed
@asteriscos asteriscos deleted the enhance/rework-overview-home-kpis-6367 branch February 1, 2024 17:32
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.

Refactor the home section top kpi
3 participants