Skip to content

Conversation

@zqr10159
Copy link
Member

7e379cbc3eb9caf3ffa50720065cbb24 b9ab63ccdb22175093e6674b939350e9 c624115b4064deb77f6a00c219d31d6e

This pull request adds support for dynamically detecting and displaying the availability of query executors (PromQL, SQL) for periodic alerts in the alert settings UI. It improves the user experience by disabling or enabling periodic alert options and query language choices based on backend executor configuration, and provides contextual descriptions and tooltips for query languages. Several UI improvements and backend API additions support these changes.

Backend: Executor Status API and Service Enhancements

  • Added a new method getAvailableExecutors() to DataSourceService and its implementation, which checks and returns the availability of PromQL and SQL executors. This enables the frontend to determine which query languages are supported for periodic alerts. [1] [2]
  • Added a new API endpoint /datasource/status to AlertDefineController to expose executor status to the frontend. [1] [2] [3]

Frontend: Alert Setting UI and Logic Improvements

  • The alert setting UI now dynamically enables or disables periodic alert options and query language choices (PromQL, SQL) based on the backend executor status. Disabled options show tooltips explaining why they are unavailable. [1] [2] [3] [4] [5] [6]
  • Added contextual descriptions and sample queries for PromQL and SQL, displayed when the user selects a query language. [1] [2]
  • Improved UI/UX for disabled periodic alert cards and query language buttons, including visual cues and tooltips. [1] [2]

Internationalization and Usability

  • Added new i18n strings (English and Chinese) for query language labels, tooltips, descriptions, and periodic alert availability messages. [1] [2]
  • Improved placeholder and icon usage for log expression input fields and variable insertion logic. [1] [2] [3] [4]

API Integration

  • Added a method to AlertDefineService for fetching executor status from the new backend API.

@zqr10159 zqr10159 requested review from Copilot and removed request for Copilot January 18, 2026 16:08
@zqr10159 zqr10159 requested a review from bigcyy January 18, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants