Check interval when determining if 'collecting results' (#14523)

## Addresses #14515 

- Include a check that a query's interval is set to something other than
never when deciding whether to display "Collecting results"

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
This commit is contained in:
Jacob Shandling 2023-10-13 10:27:38 -07:00 committed by GitHub
parent 8c6cefc4f4
commit defd64d806
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,8 @@ const NoResults = ({
};
// Update status of collecting cached results
const collectingResults = secondsCheckbackTime() > 0;
const collectingResults =
(queryInterval ?? 0) > 0 && secondsCheckbackTime() > 0;
// Converts seconds takes to update to human readable format
const readableCheckbackTime = formatDistance(