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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to select last 24h compliance report #4358

Merged
merged 3 commits into from
Nov 11, 2020
Merged

Conversation

scottopherson
Copy link
Contributor

WIP: depends on #4310

馃敥 Description: What code changed, and why?

This commit adds the option to view the last 24h of compliance data. Compliance API endpoints were recently updated to return last 24h window of data if start_time and end_time are excluded from requests.

鉀擄笍 Related Resources

#4263
#4310

@netlify
Copy link

netlify bot commented Sep 21, 2020

Deploy preview for chef-automate ready!

Built with commit 00b44d5

https://deploy-preview-4358--chef-automate.netlify.app

Copy link
Contributor

@msorens msorens left a comment

Choose a reason for hiding this comment

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

Looks good; just a few questions/comments.
FYI: My review is just from code-reading; have not exercised the code.

@alexpop
Copy link
Contributor

alexpop commented Sep 25, 2020

Hey Scott, looking great overall. While doing some testing I noticed two things I want to bring up.

1. When I go to Compliance > Nodes > click on a node > Scan History
I see only reports from the last 24h. Looking at the API call to /compliance/reporting/reports, it doesn't have start_time and end_time filters. This results in only the last 24 hour reports to be listed for the node. See below screenshot:

scan_history_24h

2. When I go to Compliance > Nodes > click on a node > REFRESH PAGE > Scan History
I see reports for more than 24h. Looking at the API call to /compliance/reporting/reports, it has start_time and end_time filters spanning the last 10 days. I'm expecting for the above (1) to see the same date range:

scan_history_10_days

@alexpop
Copy link
Contributor

alexpop commented Sep 28, 2020

The date picker goes under the controls label here:

calendar

@alexpop
Copy link
Contributor

alexpop commented Sep 28, 2020

Also, we noticed in standup today while reviewing the change that the range displayed below the trend graph:

calendar_range

In this case ^ Thu, 17 Sep 2020 - Sun, 27 Sep 2020 doesn't match the actual range of the bucket displayed (18 Sept - 28 Sept).
Would be great to get the two ranges aligned as well.
We also talked about displaying UTC somewhere in there to make it clear that the vertical buckets are UTC dates. Will let @jonong1972 expand on that.

@scottopherson scottopherson force-pushed the sc/compliance-last-24h branch 3 times, most recently from a866894 to 9050508 Compare October 29, 2020 02:24
@scottopherson scottopherson removed the WIP label Oct 29, 2020
@scottopherson scottopherson requested a review from a team October 29, 2020 02:27
@scottopherson scottopherson changed the title WIP: Add option to select last 24h compliance report Add option to select last 24h compliance report Oct 29, 2020
This commit adds the option to view the last 24h of compliance data. Compliance API endpoints were recently updated to return last 24h window of data if `start_time` and `end_time` are excluded from requests.

Signed-off-by: Scott Christopherson <scott@chef.io>
Signed-off-by: Alex Pop <apop@chef.io>
Signed-off-by: Alex Pop <apop@chef.io>
@alexpop alexpop merged commit 6555651 into master Nov 11, 2020
@alexpop alexpop deleted the sc/compliance-last-24h branch November 11, 2020 13:04
alexpop pushed a commit that referenced this pull request Nov 18, 2020
author Michael Sorens <msorens@chef.io> 1604676405 -0800
committer Alex Pop <apop@chef.io> 1605705520 +0000

Pin semgrep for custom rules (#4426)

sample-data-service mock infra client data (#4398)

Co-authored-by: Steven Danna <steve@chef.io>

Compliance APIs default to 24h without end_time (#4310)

* Compliance APIs default to 24h without end_time

Signed-off-by: Alex Pop <apop@chef.io>

Fix overlapping

Signed-off-by: Alex Pop <apop@chef.io>

* Update docker test based on new inspec error output

Signed-off-by: Alex Pop <apop@chef.io>

* Remove fmt package

Signed-off-by: Alex Pop <apop@chef.io>

Add option to select last 24h compliance report (#4358)

* Add option to select last 24h compliance report

This commit adds the option to view the last 24h of compliance data. Compliance API endpoints were recently updated to return last 24h window of data if `start_time` and `end_time` are excluded from requests.

Signed-off-by: Scott Christopherson <scott@chef.io>

* Align filters

Signed-off-by: Alex Pop <apop@chef.io>

* Update docker test based on new inspec error output

Signed-off-by: Alex Pop <apop@chef.io>

Co-authored-by: Alex Pop <apop@chef.io>

Add Compliance Knowledge Transfer notes

Signed-off-by: Alex Pop <apop@chef.io>

small updates

Signed-off-by: Alex Pop <apop@chef.io>

before call

Signed-off-by: Alex Pop <apop@chef.io>

before call

Signed-off-by: Alex Pop <apop@chef.io>

added filters and migrations

added some filter types

ingest clarifications

Signed-off-by: Alex Pop <apop@chef.io>

Before second kt call

Signed-off-by: Alex Pop <apop@chef.io>

changes post second call

Signed-off-by: Alex Pop <apop@chef.io>
alexpop pushed a commit that referenced this pull request Nov 23, 2020
author Michael Sorens <msorens@chef.io> 1604676405 -0800
committer Alex Pop <apop@chef.io> 1605705520 +0000

Pin semgrep for custom rules (#4426)

sample-data-service mock infra client data (#4398)

Co-authored-by: Steven Danna <steve@chef.io>

Compliance APIs default to 24h without end_time (#4310)

* Compliance APIs default to 24h without end_time

Signed-off-by: Alex Pop <apop@chef.io>

Fix overlapping

Signed-off-by: Alex Pop <apop@chef.io>

* Update docker test based on new inspec error output

Signed-off-by: Alex Pop <apop@chef.io>

* Remove fmt package

Signed-off-by: Alex Pop <apop@chef.io>

Add option to select last 24h compliance report (#4358)

* Add option to select last 24h compliance report

This commit adds the option to view the last 24h of compliance data. Compliance API endpoints were recently updated to return last 24h window of data if `start_time` and `end_time` are excluded from requests.

Signed-off-by: Scott Christopherson <scott@chef.io>

* Align filters

Signed-off-by: Alex Pop <apop@chef.io>

* Update docker test based on new inspec error output

Signed-off-by: Alex Pop <apop@chef.io>

Co-authored-by: Alex Pop <apop@chef.io>

Add Compliance Knowledge Transfer notes

Signed-off-by: Alex Pop <apop@chef.io>

small updates

Signed-off-by: Alex Pop <apop@chef.io>

before call

Signed-off-by: Alex Pop <apop@chef.io>

before call

Signed-off-by: Alex Pop <apop@chef.io>

added filters and migrations

added some filter types

ingest clarifications

Signed-off-by: Alex Pop <apop@chef.io>

Before second kt call

Signed-off-by: Alex Pop <apop@chef.io>

changes post second call

Signed-off-by: Alex Pop <apop@chef.io>
alexpop pushed a commit that referenced this pull request Nov 23, 2020
author Michael Sorens <msorens@chef.io> 1604676405 -0800
committer Alex Pop <apop@chef.io> 1605705520 +0000

Pin semgrep for custom rules (#4426)

sample-data-service mock infra client data (#4398)

Co-authored-by: Steven Danna <steve@chef.io>

Compliance APIs default to 24h without end_time (#4310)

* Compliance APIs default to 24h without end_time

Signed-off-by: Alex Pop <apop@chef.io>

Fix overlapping

Signed-off-by: Alex Pop <apop@chef.io>

* Update docker test based on new inspec error output

Signed-off-by: Alex Pop <apop@chef.io>

* Remove fmt package

Signed-off-by: Alex Pop <apop@chef.io>

Add option to select last 24h compliance report (#4358)

* Add option to select last 24h compliance report

This commit adds the option to view the last 24h of compliance data. Compliance API endpoints were recently updated to return last 24h window of data if `start_time` and `end_time` are excluded from requests.

Signed-off-by: Scott Christopherson <scott@chef.io>

* Align filters

Signed-off-by: Alex Pop <apop@chef.io>

* Update docker test based on new inspec error output

Signed-off-by: Alex Pop <apop@chef.io>

Co-authored-by: Alex Pop <apop@chef.io>

Add Compliance Knowledge Transfer notes

Signed-off-by: Alex Pop <apop@chef.io>

small updates

Signed-off-by: Alex Pop <apop@chef.io>

before call

Signed-off-by: Alex Pop <apop@chef.io>

before call

Signed-off-by: Alex Pop <apop@chef.io>

added filters and migrations

added some filter types

ingest clarifications

Signed-off-by: Alex Pop <apop@chef.io>

Before second kt call

Signed-off-by: Alex Pop <apop@chef.io>

changes post second call

Signed-off-by: Alex Pop <apop@chef.io>

Co-authored-by: Michael Sorens <msorens@chef.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants