mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 00:49:03 +00:00
Live query percent fix (#4768)
This commit is contained in:
parent
345de5d8d4
commit
cf34466e7f
2 changed files with 8 additions and 8 deletions
|
|
@ -66,11 +66,11 @@ const QueryResults = ({
|
|||
|
||||
useEffect(() => {
|
||||
const calculatePercent =
|
||||
Math.round(
|
||||
((totalRowsCount + errors?.length) / targetsTotalCount) * 100
|
||||
) || 0;
|
||||
targetsTotalCount !== 0
|
||||
? Math.round((campaign.hosts_count.total / targetsTotalCount) * 100)
|
||||
: 0;
|
||||
setTargetsRespondedPercent(calculatePercent);
|
||||
}, [totalRowsCount, errors]);
|
||||
}, [campaign]);
|
||||
|
||||
useEffect(() => {
|
||||
if (isQueryFinished) {
|
||||
|
|
|
|||
|
|
@ -63,11 +63,11 @@ const QueryResults = ({
|
|||
|
||||
useEffect(() => {
|
||||
const calculatePercent =
|
||||
Math.round(
|
||||
((totalRowsCount + errors?.length) / targetsTotalCount) * 100
|
||||
) || 0;
|
||||
targetsTotalCount !== 0
|
||||
? Math.round((campaign.hosts_count.total / targetsTotalCount) * 100)
|
||||
: 0;
|
||||
setTargetsRespondedPercent(calculatePercent);
|
||||
}, [totalRowsCount, errors]);
|
||||
}, [campaign]);
|
||||
|
||||
useEffect(() => {
|
||||
if (isQueryFinished) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue