grafana/public
Virginia Cepeda e5cb1ceae0
Alerting: Suggest previously entered custom labels (#57783)
* [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
2022-11-11 10:29:59 -03:00
..
app Alerting: Suggest previously entered custom labels (#57783) 2022-11-11 10:29:59 -03:00
dashboards Chore: Update version of @grafana/eslint-config (#53403) 2022-08-08 15:19:15 +01:00
emails Alerting: Support values in notification templates (#56457) 2022-10-10 13:40:21 +01:00
fonts chore: remove executable permissions of source files and docs (#46303) 2022-05-03 12:08:14 +02:00
gazetteer Geomap: Add GeoJSON gazetteer (#40589) 2021-10-19 21:05:55 -07:00
img use inherited colors on svg (#57427) 2022-10-21 15:24:02 +02:00
lib AzureMonitor: Kusto language support (#33528) 2021-05-11 16:48:59 +02:00
locales Internationalization: Translate TimeZonePicker component (#58461) 2022-11-08 17:25:35 +01:00
maps Geomap: include sample geojson files (#39057) 2021-09-10 09:05:03 -07:00
sass Accessibility: Enable rule jsx-a11y/no-noninteractive-element-interactions (#58077) 2022-11-03 10:55:58 +00:00
test Variables: SceneVariable update process (#57784) 2022-11-09 08:02:24 +01:00
testdata MarketTrend: add new alpha panel (#40909) 2021-11-05 18:01:26 -07:00
vendor Security: Fixes javascript security warnings in old vendored libs (#50382) 2022-06-08 13:55:08 +02:00
views Implementing OpenApi 3 specs (converted from Swagger 2) (#53243) 2022-08-04 13:51:12 -03:00
api-merged.json API: Support creating a nested folder (#58508) 2022-11-10 04:41:03 -05:00
api-spec.json API: Support creating a nested folder (#58508) 2022-11-10 04:41:03 -05:00
openapi3.json API: Support creating a nested folder (#58508) 2022-11-10 04:41:03 -05:00
robots.txt