From 3d44ec8feffd3bc57198c775e9761d090fb2aaca Mon Sep 17 00:00:00 2001 From: Sai Nikhil Date: Wed, 13 Aug 2025 16:00:27 +0530 Subject: [PATCH] fix: show error for threshold while user provides invalid input (#7990) ### **User description** 1. This PR fixes the issue in add alert page when user tries to provide invalid input for threshold it was showing under the input , it should show below the input ___ ### **PR Type** Bug fix ___ ### **Description** - Fix threshold error message positioning - Treat empty silence input as invalid - Standardize undefined/null checks with strict equality - Remove absolute positioning from threshold error ___ ### Diagram Walkthrough ```mermaid flowchart LR RT["RealTimeAlert.vue validation"] -- add '' check --> RTERR["Show 'Field is required!'"] SA1["ScheduledAlert.vue threshold error"] -- remove absolute --> SAERR["Inline error display"] SA2["ScheduledAlert.vue silence validation"] -- strict null/undef + '' --> SAERR2["Consistent required error"] ```

File Walkthrough

Relevant files
Bug fix
RealTimeAlert.vue
Add empty-string check to silence validation                         

web/src/components/alerts/RealTimeAlert.vue
  • Validate silence also for empty string
  • Ensure required error shows when input blank
+1/-1     
ScheduledAlert.vue
Improve threshold and silence error handling                         

web/src/components/alerts/ScheduledAlert.vue
  • Remove absolute class from threshold error
  • Add null check in silence validation
  • Use strict equality for undefined/null checks
  • Keep empty-string invalid for silence
+2/-2     
___ --- web/src/components/alerts/RealTimeAlert.vue | 2 +- web/src/components/alerts/ScheduledAlert.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/components/alerts/RealTimeAlert.vue b/web/src/components/alerts/RealTimeAlert.vue index d316d1ef52..b2455bb011 100644 --- a/web/src/components/alerts/RealTimeAlert.vue +++ b/web/src/components/alerts/RealTimeAlert.vue @@ -113,7 +113,7 @@ along with this program. If not, see .
diff --git a/web/src/components/alerts/ScheduledAlert.vue b/web/src/components/alerts/ScheduledAlert.vue index f368904371..02f539017b 100644 --- a/web/src/components/alerts/ScheduledAlert.vue +++ b/web/src/components/alerts/ScheduledAlert.vue @@ -370,7 +370,7 @@ along with this program. If not, see .
Field is required! @@ -756,7 +756,7 @@ along with this program. If not, see .