Skip to content

Commit 0333ee1

Browse files
Merge pull request #559 from Fewwy/revert-550-OU-1011
OU-1011: REVERT add a 5 minute to the first alert timestamp
2 parents f49d2c5 + b569c79 commit 0333ee1

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

web/src/components/Incidents/processAlerts.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)