mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
* [Alerting] - replace label inputs with dropdowns (#57019) * Add AlertLabelDropdown component It will be used to pick from or create new labels * Adapt LabelsField component to use AlertLabelDropdown instead of inputs * Add tests for LabelsField component Plus a few other tests were adapted to work with the label dropdowns * Use ref in component * Fix showing placeholders in the label dropdowns * Minor syntax change * Remove unneeded import after rebase * Display custom labels When a label key is selected, its corresponding values are shown in the dropdown * Add tooltip explaining where labels in the dropdowns come from * Fix import of Stack component * Avoid duplicated values * Improvements based on review * Display labels for currently selected datasource only * Refactor AlertsField to allow to choose whether to suggest labels or not * Suggest labels for NotificationStep and tests * Don't suggest labels in TestContactPointModal * [LabelsField] - refactor: get dataSourceName as a parameter * [LabelsField] - extract common code into reusable components * Display loading spinner while fetching rules * LabelsField - refactor Removing the suggest prop and the default dataSource 'grafana'. Instead, the component now relies on the dataSourceName param. If it's set it means we want to show suggestions so we fetch the labels, otherwise, if not set, we show the plain input texts without suggestions. * Add test for LabelsField without suggestions * Show custom labels for grafana managed alerts When the dataSourceName in the NotificationsStep component has a null value, we can assume it's because we're dealing with grafana managed alerts. In that case we set the correct value. * Fix tests after latest changes Since we removed the combobox from the TestContactPoints modal, tests had to be adjusted * Update texts * initialize all new added inputs with empty data |
||
---|---|---|
.. | ||
components | ||
partials | ||
state | ||
unified | ||
utils | ||
AlertHowToModal.tsx | ||
AlertRuleItem.test.tsx | ||
AlertRuleItem.tsx | ||
AlertRuleList.test.tsx | ||
AlertRuleList.tsx | ||
AlertTab.tsx | ||
AlertTabCtrl.test.ts | ||
AlertTabCtrl.ts | ||
AlertTabIndex.tsx | ||
EditNotificationChannelPage.tsx | ||
FeatureTogglePage.tsx | ||
getAlertingValidationMessage.test.ts | ||
getAlertingValidationMessage.ts | ||
NewNotificationChannelPage.tsx | ||
NotificationsListPage.tsx | ||
routes.tsx | ||
StateHistory.tsx | ||
TestRuleResult.test.tsx | ||
TestRuleResult.tsx |