opensearch-project / security-analytics-dashboards-plugin

Front end (UI) plugin to support security-analytics
Apache License 2.0
10 stars 46 forks source link

Updated get findings & alerts to use duration filter and start showing results as they come in #1031

Closed amsiglan closed 4 months ago

amsiglan commented 4 months ago

Description

This PR improves the UI experience for the cases when there are huge numbers of alerts/findings by showing partial results as they come in. The PR also updates the logic to abort fetch calls when the user moves away from the alerts/findings pages or hits refresh so that we don't end up make redundant calls in the background.

Check List

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 31.74%. Comparing base (283fdd9) to head (30ed5a9).

:exclamation: Current head 30ed5a9 differs from pull request most recent head 8551512

Please upload reports for the commit 8551512 to get more accurate results.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1031 +/- ## ========================================== - Coverage 31.89% 31.74% -0.16% ========================================== Files 162 162 Lines 5417 5503 +86 Branches 1016 1024 +8 ========================================== + Hits 1728 1747 +19 - Misses 3484 3549 +65 - Partials 205 207 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

opensearch-trigger-bot[bot] commented 4 months ago

The backport to 2.13 failed:

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

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/security-analytics-dashboards-plugin/backport-2.13 2.13
# Navigate to the new working tree
pushd ../.worktrees/security-analytics-dashboards-plugin/backport-2.13
# Create a new branch
git switch --create backport-1031-to-2.13
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b8cb0ae8adb6999ed064f6f0c26c6ab34ac89f65
# Push it to GitHub
git push --set-upstream origin backport-1031-to-2.13
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/security-analytics-dashboards-plugin/backport-2.13

Then, create a pull request where the base branch is 2.13 and the compare/head branch is backport-1031-to-2.13.

opensearch-trigger-bot[bot] commented 4 months ago

The backport to 2.x failed:

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

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/security-analytics-dashboards-plugin/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/security-analytics-dashboards-plugin/backport-2.x
# Create a new branch
git switch --create backport-1031-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b8cb0ae8adb6999ed064f6f0c26c6ab34ac89f65
# Push it to GitHub
git push --set-upstream origin backport-1031-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/security-analytics-dashboards-plugin/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport-1031-to-2.x.

opensearch-trigger-bot[bot] commented 4 months ago

The backport to 2.11 failed:

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

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/security-analytics-dashboards-plugin/backport-2.11 2.11
# Navigate to the new working tree
pushd ../.worktrees/security-analytics-dashboards-plugin/backport-2.11
# Create a new branch
git switch --create backport-1031-to-2.11
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b8cb0ae8adb6999ed064f6f0c26c6ab34ac89f65
# Push it to GitHub
git push --set-upstream origin backport-1031-to-2.11
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/security-analytics-dashboards-plugin/backport-2.11

Then, create a pull request where the base branch is 2.11 and the compare/head branch is backport-1031-to-2.11.

opensearch-trigger-bot[bot] commented 4 months ago

The backport to 2.14 failed:

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

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/security-analytics-dashboards-plugin/backport-2.14 2.14
# Navigate to the new working tree
pushd ../.worktrees/security-analytics-dashboards-plugin/backport-2.14
# Create a new branch
git switch --create backport-1031-to-2.14
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b8cb0ae8adb6999ed064f6f0c26c6ab34ac89f65
# Push it to GitHub
git push --set-upstream origin backport-1031-to-2.14
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/security-analytics-dashboards-plugin/backport-2.14

Then, create a pull request where the base branch is 2.14 and the compare/head branch is backport-1031-to-2.14.

opensearch-trigger-bot[bot] commented 4 months ago

The backport to 2.12 failed:

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

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/security-analytics-dashboards-plugin/backport-2.12 2.12
# Navigate to the new working tree
pushd ../.worktrees/security-analytics-dashboards-plugin/backport-2.12
# Create a new branch
git switch --create backport-1031-to-2.12
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b8cb0ae8adb6999ed064f6f0c26c6ab34ac89f65
# Push it to GitHub
git push --set-upstream origin backport-1031-to-2.12
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/security-analytics-dashboards-plugin/backport-2.12

Then, create a pull request where the base branch is 2.12 and the compare/head branch is backport-1031-to-2.12.