File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
web/src/components/Incidents Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -166,16 +166,7 @@ export function processAlerts(
166166 }
167167 const matchingRule = alertingRules . find ( ( rule ) => rule . name === alert . metric . alertname ) ;
168168
169- // Create a new timestamp 5 minutes (300 seconds) earlier than the first timestamp
170- const originalAlertsStartFiring = sortedValues [ 0 ] [ 0 ] * 1000 ;
171- const newFirstTimestamp = sortedValues [ 0 ] [ 0 ] - 5 * 60 ;
172-
173- // Create a copy of the first value from the array of timestamps and update its timestamp
174- const newFirstValue : [ number , string ] = [ newFirstTimestamp , sortedValues [ 0 ] [ 1 ] ] ;
175- // Unshift the new value to the beginning of the sortedValues array
176- sortedValues . unshift ( newFirstValue ) ;
177-
178- const alertsStartFiring = originalAlertsStartFiring - 5 * 60 * 1000 ;
169+ const alertsStartFiring = sortedValues [ 0 ] [ 0 ] * 1000 ;
179170 const alertsEndFiring = sortedValues [ sortedValues . length - 1 ] [ 0 ] * 1000 ;
180171 const resolved = Date . now ( ) - alertsEndFiring > 10 * 60 * 1000 ;
181172
You can’t perform that action at this time.
0 commit comments