From 2a88541fa202f6206b3781cbdcf8d7f429b6abe6 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Tue, 4 Aug 2020 20:20:53 -0700 Subject: [PATCH] Force mock error scale events to be annotations --- ui/mirage/factories/scale-event.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/mirage/factories/scale-event.js b/ui/mirage/factories/scale-event.js index eeb7399d3..b9456f119 100644 --- a/ui/mirage/factories/scale-event.js +++ b/ui/mirage/factories/scale-event.js @@ -17,4 +17,10 @@ export default Factory.extend({ 'nomad_autoscaler.reason_history': ['scaling down because factor is 0.000000'], } : {}, + + afterCreate(scaleEvent) { + if (scaleEvent.error) { + scaleEvent.update({ count: null }); + } + }, });