Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Adds a tooltip for the alert's SQL input #26317

Merged

Conversation

michael-s-molina
Copy link
Member

@michael-s-molina michael-s-molina commented Dec 20, 2023

SUMMARY

It's not very clear that the SQL used to create an alert should return a numeric value. When non-numeric values are returned, the error Alert query returned a non-number value is thrown when firing the alert. This PR adds a tooltip for the alert's SQL input to instruct users in advance.

Closes #26298

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screenshot 2023-12-20 at 09 03 28 Screenshot 2023-12-20 at 09 04 04

TESTING INSTRUCTIONS

1 - Open the alert creation modal
2 - Check the displayed tooltip

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Copy link

codecov bot commented Dec 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (eb65cea) 69.18% compared to head (fe2d2f6) 69.18%.
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #26317   +/-   ##
=======================================
  Coverage   69.18%   69.18%           
=======================================
  Files        1945     1945           
  Lines       75968    75970    +2     
  Branches     8467     8467           
=======================================
+ Hits        52557    52559    +2     
  Misses      21224    21224           
  Partials     2187     2187           
Flag Coverage Δ
javascript 56.52% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@john-bodley
Copy link
Member

john-bodley commented Dec 20, 2023

@michael-s-molina technically it doesn't need to be numeric, i.e., it could be a string, as we use the Python float() method. Maybe something like:

... a numeric-esque value

While we're at it, should we also simply remove tooltip for the threshold value,

Screenshot 2023-12-21 at 11 15 57 AM

given that it technically doesn't need to be a double precision number, e.g., an integer will work. It seems like the input box rejects non-numerical values (excluding the period) and thus the input in already sanitized.

@michael-s-molina
Copy link
Member Author

@john-bodley Applied your suggestions.

@michael-s-molina michael-s-molina merged commit 5bd7fd7 into apache:master Dec 22, 2023
30 checks passed
@michael-s-molina michael-s-molina added v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch labels Dec 22, 2023
michael-s-molina added a commit that referenced this pull request Dec 27, 2023
michael-s-molina added a commit that referenced this pull request Dec 27, 2023
josedev-union pushed a commit to Ortege-xyz/studio that referenced this pull request Jan 22, 2024
fisjac pushed a commit to fisjac/superset that referenced this pull request Jan 25, 2024
rtexelm pushed a commit to rtexelm/superset-RTM that referenced this pull request Feb 14, 2024
@mistercrunch mistercrunch added 🍒 3.0.3 🍒 3.0.4 🍒 3.1.0 🍒 3.1.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Mar 8, 2024
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/S v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch 🍒 3.0.3 🍒 3.0.4 🍒 3.1.0 🍒 3.1.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alerts aren't firing with error 'Alert query returned a non-number value.' when returning a date column
3 participants