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

Do not show an error in tasks stats if no tasks have run yet #2486

Merged
merged 4 commits into from
Feb 12, 2024

Conversation

dekkers
Copy link
Contributor

@dekkers dekkers commented Feb 12, 2024

Changes

When an organization has just been created and no tasks have run yet, we showed an error because we check for if stats and stats is empty. This adds a separate stats_error context variable to distinguish between empty and error.


Checklist for code reviewers:

Copy-paste the checklist from the docs/source/templates folder into your comment.


Checklist for QA:

Copy-paste the checklist from the docs/source/templates folder into your comment.

@dekkers dekkers requested a review from a team as a code owner February 12, 2024 11:31
@dekkers dekkers self-assigned this Feb 12, 2024
@underdarknl
Copy link
Contributor

Code looks good to me.

@underdarknl
Copy link
Contributor

underdarknl commented Feb 12, 2024

Checklist for QA:

  • I have checked out this branch, and successfully ran a fresh make reset.
  • I confirmed that there are no unintended functional regressions in this branch:
    • I have managed to pass the onboarding flow
    • Objects and Findings are created properly
    • Tasks are created and completed properly
  • I confirmed that the PR's advertised feature or hotfix works as intended.

What works:

  • Page does not show an error when no jobs have been running.

Maybe we'd like to check the ENV related to our scan interval and see if this is indeed something that should have happened, and hint the user on why not jobs where found. (eg, check the health page, check the katalogus for enabled boefjes, check the indemnifications and objects.

@underdarknl underdarknl merged commit 4288eeb into main Feb 12, 2024
10 checks passed
@underdarknl underdarknl deleted the error-no-tasks branch February 12, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants