You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
improve alert precision to match the threshold value (#1387)
Users reported that the precision was way off to what the threshold value was, this helps ensure the two numbers have the same precision.
Before:
<img width="1280" height="363" alt="image" src="https://github.com/user-attachments/assets/fc1bc72c-a70e-4068-aa06-3a01d6c65b2b" />
After:
<img width="1446" height="618" alt="Screenshot 2025-11-19 at 4 20 38 PM" src="https://github.com/user-attachments/assets/49be78eb-dac9-49f4-b490-a354fb69fb71" />
**Note:** One thing that could be better is if we instead used the Number Format specified on the frontend, this would require us to move the Numbro dependency and logic into common-utils, and we would also probably want to update the alert value UI to also use numbro.. I can take a stab at this if we think it's better. I figured this was a good interim solution.
Fixes HDX-2847
text: '🚨 Alert for "CPU" in "My Dashboard" - 6.25 exceeds 1',
2346
+
text: '🚨 Alert for "CPU" in "My Dashboard" - 6 exceeds 1',
2203
2347
blocks: [
2204
2348
{
2205
2349
text: {
2206
2350
text: [
2207
-
`*<http://app:8080/dashboards/${dashboard._id}?from=1700170200000&granularity=5+minute&to=1700174700000 | 🚨 Alert for "CPU" in "My Dashboard" - 6.25 exceeds 1>*`,
2351
+
`*<http://app:8080/dashboards/${dashboard._id}?from=1700170200000&granularity=5+minute&to=1700174700000 | 🚨 Alert for "CPU" in "My Dashboard" - 6 exceeds 1>*`,
2208
2352
'',
2209
-
'6.25 exceeds 1',
2353
+
'6 exceeds 1',
2210
2354
'Time Range (UTC): [Nov 16 10:05:00 PM - Nov 16 10:10:00 PM)',
0 commit comments