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

[Feature] Add the ability to configure record limit/count from the UI #395

Merged
merged 13 commits into from
Sep 9, 2024

Conversation

szkly
Copy link
Contributor

@szkly szkly commented Jul 25, 2024

Description

Enable users to configure record limit/count for their report definitions (based on saved searches) from the UI. The default limit (10000) can be overriden for both new and already existing reports.

Snapshots have also been updated to comply with the layout changes.

image

image

image

Issues Resolved

fix #328

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

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.

Signed-off-by: Simeon Widdis <[email protected]>
Copy link
Member

@joshuali925 joshuali925 left a comment

Choose a reason for hiding this comment

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

thanks

@Swiddis
Copy link
Collaborator

Swiddis commented Sep 9, 2024

Thanks for the contribution! Sorry we didn't get back sooner, got lost in the backlog. We went ahead and fast-tracked this to get merged into 2.17, which is releasing in a few days so there wasn't really enough time left to do proper review-revision cycles. I fixed merge conflicts and added some warning text for large limits based on reviewing with the team and some local testing.

Thanks again!

@Swiddis Swiddis merged commit d4f95c9 into opensearch-project:main Sep 9, 2024
8 of 11 checks passed
@opensearch-trigger-bot
Copy link
Contributor

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/dashboards-reporting/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/dashboards-reporting/backport-2.x
# Create a new branch
git switch --create backport/backport-395-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d4f95c906974b6e65fb2298f912b4327604102c3
# Push it to GitHub
git push --set-upstream origin backport/backport-395-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/dashboards-reporting/backport-2.x

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.17 failed:

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

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/dashboards-reporting/backport-2.17 2.17
# Navigate to the new working tree
pushd ../.worktrees/dashboards-reporting/backport-2.17
# Create a new branch
git switch --create backport/backport-395-to-2.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d4f95c906974b6e65fb2298f912b4327604102c3
# Push it to GitHub
git push --set-upstream origin backport/backport-395-to-2.17
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/dashboards-reporting/backport-2.17

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

Swiddis added a commit to Swiddis/dashboards-reporting that referenced this pull request Sep 9, 2024
…opensearch-project#395)

* feat(components/report-settings): add field for variable record limits

Signed-off-by: Károly Szakály <[email protected]>

* fix(components/report-settings): set type for event target

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-settings): load existing record limit in edit mode

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-definition-details): show record limit on report definition details page

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-definition-details): omit record limit for non saved search sources

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-details): show record limit on report details page

Signed-off-by: Károly Szakály <[email protected]>

* tests(cypress): add `force: true` to name input

Signed-off-by: Károly Szakály <[email protected]>

* tests(jest/snapshots): update snapshots

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-settings): add proper i18n label for record limit input

Signed-off-by: Károly Szakály <[email protected]>

* Update release notes

Signed-off-by: Simeon Widdis <[email protected]>

* Add potential OOM warning for large record limits

Signed-off-by: Simeon Widdis <[email protected]>

* Make memory warning more conservative based on original limit

Signed-off-by: Simeon Widdis <[email protected]>

---------

Signed-off-by: Károly Szakály <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Co-authored-by: Simeon Widdis <[email protected]>
Swiddis added a commit to Swiddis/dashboards-reporting that referenced this pull request Sep 9, 2024
…opensearch-project#395)

* feat(components/report-settings): add field for variable record limits

Signed-off-by: Károly Szakály <[email protected]>

* fix(components/report-settings): set type for event target

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-settings): load existing record limit in edit mode

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-definition-details): show record limit on report definition details page

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-definition-details): omit record limit for non saved search sources

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-details): show record limit on report details page

Signed-off-by: Károly Szakály <[email protected]>

* tests(cypress): add `force: true` to name input

Signed-off-by: Károly Szakály <[email protected]>

* tests(jest/snapshots): update snapshots

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-settings): add proper i18n label for record limit input

Signed-off-by: Károly Szakály <[email protected]>

* Update release notes

Signed-off-by: Simeon Widdis <[email protected]>

* Add potential OOM warning for large record limits

Signed-off-by: Simeon Widdis <[email protected]>

* Make memory warning more conservative based on original limit

Signed-off-by: Simeon Widdis <[email protected]>

---------

Signed-off-by: Károly Szakály <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Co-authored-by: Simeon Widdis <[email protected]>
Swiddis added a commit to Swiddis/dashboards-reporting that referenced this pull request Sep 9, 2024
…opensearch-project#395)

* feat(components/report-settings): add field for variable record limits

Signed-off-by: Károly Szakály <[email protected]>

* fix(components/report-settings): set type for event target

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-settings): load existing record limit in edit mode

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-definition-details): show record limit on report definition details page

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-definition-details): omit record limit for non saved search sources

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-details): show record limit on report details page

Signed-off-by: Károly Szakály <[email protected]>

* tests(cypress): add `force: true` to name input

Signed-off-by: Károly Szakály <[email protected]>

* tests(jest/snapshots): update snapshots

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-settings): add proper i18n label for record limit input

Signed-off-by: Károly Szakály <[email protected]>

* Update release notes

Signed-off-by: Simeon Widdis <[email protected]>

* Add potential OOM warning for large record limits

Signed-off-by: Simeon Widdis <[email protected]>

* Make memory warning more conservative based on original limit

Signed-off-by: Simeon Widdis <[email protected]>

---------

Signed-off-by: Károly Szakály <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Co-authored-by: Simeon Widdis <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
@Swiddis
Copy link
Collaborator

Swiddis commented Sep 9, 2024

Backports: #427 #428

Swiddis added a commit that referenced this pull request Sep 9, 2024
* [Feature] Add the ability to configure record limit/count from the UI (#395)

* feat(components/report-settings): add field for variable record limits

Signed-off-by: Károly Szakály <[email protected]>

* fix(components/report-settings): set type for event target

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-settings): load existing record limit in edit mode

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-definition-details): show record limit on report definition details page

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-definition-details): omit record limit for non saved search sources

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-details): show record limit on report details page

Signed-off-by: Károly Szakály <[email protected]>

* tests(cypress): add `force: true` to name input

Signed-off-by: Károly Szakály <[email protected]>

* tests(jest/snapshots): update snapshots

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-settings): add proper i18n label for record limit input

Signed-off-by: Károly Szakály <[email protected]>

* Update release notes

Signed-off-by: Simeon Widdis <[email protected]>

* Add potential OOM warning for large record limits

Signed-off-by: Simeon Widdis <[email protected]>

* Make memory warning more conservative based on original limit

Signed-off-by: Simeon Widdis <[email protected]>

---------

Signed-off-by: Károly Szakály <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Co-authored-by: Simeon Widdis <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>

* Fix merge conflict markers

Signed-off-by: Simeon Widdis <[email protected]>

---------

Signed-off-by: Károly Szakály <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Co-authored-by: Károly Szakály <[email protected]>
Swiddis added a commit that referenced this pull request Sep 9, 2024
* [Feature] Add the ability to configure record limit/count from the UI (#395)

* feat(components/report-settings): add field for variable record limits

Signed-off-by: Károly Szakály <[email protected]>

* fix(components/report-settings): set type for event target

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-settings): load existing record limit in edit mode

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-definition-details): show record limit on report definition details page

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-definition-details): omit record limit for non saved search sources

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-details): show record limit on report details page

Signed-off-by: Károly Szakály <[email protected]>

* tests(cypress): add `force: true` to name input

Signed-off-by: Károly Szakály <[email protected]>

* tests(jest/snapshots): update snapshots

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-settings): add proper i18n label for record limit input

Signed-off-by: Károly Szakály <[email protected]>

* Update release notes

Signed-off-by: Simeon Widdis <[email protected]>

* Add potential OOM warning for large record limits

Signed-off-by: Simeon Widdis <[email protected]>

* Make memory warning more conservative based on original limit

Signed-off-by: Simeon Widdis <[email protected]>

---------

Signed-off-by: Károly Szakály <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Co-authored-by: Simeon Widdis <[email protected]>

* Fix merge conflict markers

Signed-off-by: Simeon Widdis <[email protected]>

---------

Signed-off-by: Károly Szakály <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Co-authored-by: Károly Szakály <[email protected]>
Swiddis added a commit that referenced this pull request Sep 10, 2024
* [Feature] Add the ability to configure record limit/count from the UI (#395)

* feat(components/report-settings): add field for variable record limits

Signed-off-by: Károly Szakály <[email protected]>

* fix(components/report-settings): set type for event target

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-settings): load existing record limit in edit mode

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-definition-details): show record limit on report definition details page

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-definition-details): omit record limit for non saved search sources

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-details): show record limit on report details page

Signed-off-by: Károly Szakály <[email protected]>

* tests(cypress): add `force: true` to name input

Signed-off-by: Károly Szakály <[email protected]>

* tests(jest/snapshots): update snapshots

Signed-off-by: Károly Szakály <[email protected]>

* feat(components/report-settings): add proper i18n label for record limit input

Signed-off-by: Károly Szakály <[email protected]>

* Update release notes

Signed-off-by: Simeon Widdis <[email protected]>

* Add potential OOM warning for large record limits

Signed-off-by: Simeon Widdis <[email protected]>

* Make memory warning more conservative based on original limit

Signed-off-by: Simeon Widdis <[email protected]>

---------

Signed-off-by: Károly Szakály <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Co-authored-by: Simeon Widdis <[email protected]>

* Fix merge conflict markers

Signed-off-by: Simeon Widdis <[email protected]>

* Update large record report warning (#429)

Signed-off-by: Simeon Widdis <[email protected]>

* Merge 2.x

Signed-off-by: Simeon Widdis <[email protected]>

---------

Signed-off-by: Károly Szakály <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Co-authored-by: Károly Szakály <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v2.17.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add the ability to configure the report record count limit from the UI.
3 participants