File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
metric_threshold/components
inventory_metric_threshold Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -520,7 +520,7 @@ export const ExpressionRow: React.FC<ExpressionRowProps> = (props) => {
520520 threshold = { threshold }
521521 updateComparator = { updateComparator }
522522 updateThreshold = { updateThreshold }
523- errors = { errors . critical as IErrorObject }
523+ errors = { ( errors . critical as IErrorObject ) ?? { } }
524524 metric = { metric }
525525 />
526526 ) ;
@@ -531,7 +531,7 @@ export const ExpressionRow: React.FC<ExpressionRowProps> = (props) => {
531531 threshold = { warningThreshold }
532532 updateComparator = { updateWarningComparator }
533533 updateThreshold = { updateWarningThreshold }
534- errors = { errors . warning as IErrorObject }
534+ errors = { ( errors . warning as IErrorObject ) ?? { } }
535535 metric = { metric }
536536 />
537537 ) ;
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ export const ExpressionRow: React.FC<ExpressionRowProps> = (props) => {
186186 threshold = { threshold }
187187 updateComparator = { updateComparator }
188188 updateThreshold = { updateThreshold }
189- errors = { errors . critical as IErrorObject }
189+ errors = { ( errors . critical as IErrorObject ) ?? { } }
190190 isMetricPct = { isMetricPct }
191191 />
192192 ) ;
@@ -197,7 +197,7 @@ export const ExpressionRow: React.FC<ExpressionRowProps> = (props) => {
197197 threshold = { warningThreshold }
198198 updateComparator = { updateWarningComparator }
199199 updateThreshold = { updateWarningThreshold }
200- errors = { errors . warning as IErrorObject }
200+ errors = { ( errors . warning as IErrorObject ) ?? { } }
201201 isMetricPct = { isMetricPct }
202202 />
203203 ) ;
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ export const createInventoryMetricThresholdExecutor = (libs: InfraBackendLibs) =
136136 const actionGroupId =
137137 nextState === AlertStates . OK
138138 ? RecoveredActionGroup . id
139- : AlertStates . WARNING
139+ : nextState === AlertStates . WARNING
140140 ? WARNING_ACTIONS . id
141141 : FIRED_ACTIONS . id ;
142142 alertInstance . scheduleActions (
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ export const createMetricThresholdExecutor = (
114114 const actionGroupId =
115115 nextState === AlertStates . OK
116116 ? RecoveredActionGroup . id
117- : AlertStates . WARNING
117+ : nextState === AlertStates . WARNING
118118 ? WARNING_ACTIONS . id
119119 : FIRED_ACTIONS . id ;
120120 alertInstance . scheduleActions ( actionGroupId , {
You can’t perform that action at this time.
0 commit comments