grafana/pkg/tsdb/azuremonitor
Andreas Christou d7c16e06d2
AzureMonitor: Add support for not equals and startsWith operators when creating Azure Metrics dimension filters. (#48077)
* Allow dimension operator selection

- Add dimension operators and function to update the operator in the query
- Add logic to ensure the same dimension cannot be selected multiple times (Azure restriction)
- Add selection component

* Update backend logic to default operation and filter to eq '*'

- This must be done as the ne and sw operators do not work with the wildcard filter

* Add tests on dimension operators

* Correct placement of 'and' when building query

* Add comment and simplify filtering logic

* Allow multiSelect for eq and ne operators

- Pass PanelData to DimensionFields component
- Add logic to retrieve labels from PanelData
- Add MultiSelect component for relevant operators
- Update frontend types to allow filter to be an array of strings
- Update backend types to allow filter to be an array of strings
- Update filter string building

* Improve setting of labels

* Update go tests

* Update frontend tests

- Add panelData mock (to be expanded later)
- Update null check in DimensionFields

* Allow custom value and set default

* Add frontend test and fix lint issues

* Improved handling of options for sw operator

* Remove changes related to multiselect

* Add check on refId to ensure dimension labels are correct for query

* Extract custom hook for setting dimension labels

* Add documentation around Azure Monitor metrics dimensions

* Update MetricQueryEditor tests

- Add missing data prop

* Correctly set field values

* Add additional expect for onQueryChange

* Correctly set operators

- Simplify onFilterInputChange

* Ensure no duplicate filters appear

* Ensure that filters are displayed correctly for saved queries

* Update dimension filter test

* Include additional test around changing dimension labels

* Pass panel data through new metrics query editor
2022-04-29 17:01:13 +01:00
..
azlog AzureMonitor: Move Application Insights and Insight Analytics to a deprecated package (#45834) 2022-03-02 15:41:07 +01:00
loganalytics chore: remove all remaining uses of golang.org/x/net/context (#47564) 2022-04-11 14:20:10 -04:00
macros AzureMonitor: Move Application Insights and Insight Analytics to a deprecated package (#45834) 2022-03-02 15:41:07 +01:00
metrics AzureMonitor: Add support for not equals and startsWith operators when creating Azure Metrics dimension filters. (#48077) 2022-04-29 17:01:13 +01:00
resourcegraph chore: remove all remaining uses of golang.org/x/net/context (#47564) 2022-04-11 14:20:10 -04:00
testdata Azure Monitor: Add support for numeric fields in ARG (#38728) 2021-09-01 09:02:08 +02:00
time AzureMonitor: Move Application Insights and Insight Analytics to a deprecated package (#45834) 2022-03-02 15:41:07 +01:00
types AzureMonitor: Use Resource Picker in Metrics Query Editor (#47164) 2022-04-08 08:49:46 -07:00
azuremonitor_test.go AzureMonitor: Remove deprecated code (#48328) 2022-04-28 10:27:39 +02:00
azuremonitor-resource-handler_test.go Migrate to Grafana Azure SDK (#47232) 2022-04-04 11:23:13 +02:00
azuremonitor-resource-handler.go AzureMonitor: Remove deprecated code (#48328) 2022-04-28 10:27:39 +02:00
azuremonitor.go AzureMonitor: Remove deprecated code (#48328) 2022-04-28 10:27:39 +02:00
credentials_test.go Migrate to Grafana Azure SDK (#47232) 2022-04-04 11:23:13 +02:00
credentials.go Migrate to Grafana Azure SDK (#47232) 2022-04-04 11:23:13 +02:00
httpclient_test.go AzureMonitor: Remove deprecated code (#48328) 2022-04-28 10:27:39 +02:00
httpclient.go AzureMonitor: Remove deprecated code (#48328) 2022-04-28 10:27:39 +02:00
routes.go AzureMonitor: Remove deprecated code (#48328) 2022-04-28 10:27:39 +02:00