File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
thingconnect.pulse.client/src/components Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,11 @@ export function AvailabilityStats({
6363
6464 const availabilityPct = totalPoints > 0 ? ( upPoints / totalPoints ) * 100 : 0 ;
6565 const avgResponseTime = responseTimeCount > 0 ? totalResponseTime / responseTimeCount : null ;
66- const downEventPct = totalPoints > 0 ? ( totalDownEvents / totalPoints ) * 100 : 0 ;
67- // const downEventPct =
68- // totalPoints > 0
69- // ? totalDownEvents / totalPoints // average down events per bucket
70- // : 0;
66+ let downEventPct = 0 ;
67+ if ( totalPoints > 0 ) {
68+ if ( bucket !== 'daily' ) downEventPct = ( totalDownEvents / totalPoints ) * 100 ;
69+ else downEventPct = totalDownEvents / totalPoints ;
70+ }
7171
7272 return {
7373 availabilityPct,
You can’t perform that action at this time.
0 commit comments