fix compliance graph not showing data of past n days (IN-864) #7748
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π© Description: What code changed, and why?
On first switch to Compliance tab, graph was not populating points for past 10 days, as it should by default. It was only showing for 1 day.
The reason was that api was not being hit with correct start date on first visit. Start date was being calculated correctly on switching tabs( nodes/profiles/controls).
Also, found that the start date was being incorrectly sent for other sections such as node status, node failures.. It should always be one day data and not past n days
βοΈ Related Resources
https://chefio.atlassian.net/browse/IN-864
https://chefio.atlassian.net/browse/CHEF-359
π Definition of Done
fixed the start date to be sent correctly for the API calls.
π How to Build and Test the Change
On first visit to Compliance Tab , graph should be loaded for past 10 days by default.
β Checklist
All PRs must tick these:
With occasional exceptions, all PRs from Progress employees must tick these:
make spell
in any component directory)All PRs from Progress employees should tick these if appropriate:
Please add a note next to any checkbox above if you are NOT ticking it.
π· Screenshots, if applicable
Screen.Recording.2023-02-24.at.3.19.08.PM.mov