Skip to content

Commit

Permalink
Merge pull request #542 from highcharts/cleanup/moving-avg-message
Browse files Browse the repository at this point in the history
cleanup/moving-avg-message
  • Loading branch information
PaulDalek authored Jul 24, 2024
2 parents bc64dd4 + 2b220f4 commit 87613fa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/server/routes/health.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ export default function addHealthRoutes(app) {
// Moving average
period,
movingAverage,
message: `Last ${period} minutes had a success rate of ${movingAverage.toFixed(2)}%.`,
message:
isNaN(movingAverage) || !successRates.length
? 'Too early to report. No exports made yet. Please check back soon.'
: `Last ${period} minutes had a success rate of ${movingAverage.toFixed(2)}%.`,

// SVG/JSON attempts
svgExportAttempts: stats.exportFromSvgAttempts,
Expand Down

0 comments on commit 87613fa

Please sign in to comment.