grafana/public/app/plugins/datasource/grafana-azure-monitor-datasource
Josh Hunt 13a47aede2
AzureMonitor: Migrate Metrics query editor to React (#30783)
* AzureMonitor: Remove anys from datasource to get the inferred type

* AzureMonitor: Cast some datasource types

TODO: we want proper types for these

* AzureMonitor: Initial react Metrics editor components

* start dimension fields

* replace replaceTemplateVariable with datasource.replace, and rename onQueryChange to onChange

* actually just do template variable replacement in the datasource

* don't use azureMonitorIsConfigured

* Refactors, mainly around the metric metadata

 - Convert all the metric metadata options for the Select before its set into state
 - Stop using SelectableValue because it's basically any when all the properties are optional
 - the onChange function passed to the fields now just accepts the direct value, rather than wrapped in a SelectableValue

* added proper fields, and adding and removing for DimensionFields

* Update query with Dimension changes

* Width

* subscription and query type fields

* Should be feature complete now, more or less

* fix missing import

* fix lint issues

* set default subscription ID

* Starting to write some tests

* tests for query editor

* Remove subscription ID from the label in Metrics

But we keep it there for the angular stuff

* MetricsQueryEditor tests

* Update index.test.tsx

* fix tests

* add template variables to dropdowns

* clean up

* update tests

* Reorganise react components

* Group query fields into rows

* Rename Option type, add Azure response type

* Refactor Metrics metric metadata

 - Types the Azure API
 - Moves default metadata values into datasource

* nit

* update test
2021-03-11 11:37:39 +00:00
..
__mocks__ AzureMonitor: Migrate Metrics query editor to React (#30783) 2021-03-11 11:37:39 +00:00
app_insights Eslint: no-duplicate-imports rule (bump grafana-eslint-config) (#30989) 2021-02-11 13:45:25 +01:00
azure_log_analytics AzureMonitor: Migrate Metrics query editor to React (#30783) 2021-03-11 11:37:39 +00:00
azure_monitor AzureMonitor: Migrate Metrics query editor to React (#30783) 2021-03-11 11:37:39 +00:00
components AzureMonitor: Migrate Metrics query editor to React (#30783) 2021-03-11 11:37:39 +00:00
css AzureMonitor: adds support for multiple subscriptions per datasource (#16922) 2019-05-07 15:45:15 +02:00
editor Routing NG: Replace Angular routing with react-router (#31463) 2021-03-10 18:03:36 +01:00
img azuremonitor: move files into grafana 2019-01-17 10:55:03 +01:00
insights_analytics Eslint: no-duplicate-imports rule (bump grafana-eslint-config) (#30989) 2021-02-11 13:45:25 +01:00
log_analytics Prettier: Upgrade to 2 (#30387) 2021-01-20 07:59:48 +01:00
partials AzureMonitor: Migrate Metrics query editor to React (#30783) 2021-03-11 11:37:39 +00:00
annotations_query_ctrl.ts Chore: Remove angular dependency from data sources (#27735) 2020-10-01 18:51:23 +01:00
datasource.ts AzureMonitor: Migrate Metrics query editor to React (#30783) 2021-03-11 11:37:39 +00:00
module.tsx Azure Monitor: Datasource Config Type (#20183) 2019-11-06 09:29:07 -05:00
plugin.json azuremonitor: port azure log analytics query function to the backend (#23839) 2020-04-27 17:43:02 +02:00
query_ctrl.test.ts Azure: Application Insights metrics to Frame and support multiple query dimensions (#25849) 2020-06-29 15:06:58 -04:00
query_ctrl.ts AzureMonitor: Migrate Metrics query editor to React (#30783) 2021-03-11 11:37:39 +00:00
query_help.md azuremonitor: move files into grafana 2019-01-17 10:55:03 +01:00
time_grain_converter.test.ts azuremonitor: move files into grafana 2019-01-17 10:55:03 +01:00
time_grain_converter.ts Prettier: Upgrade to 2 (#30387) 2021-01-20 07:59:48 +01:00
types.ts AzureMonitor: Migrate Metrics query editor to React (#30783) 2021-03-11 11:37:39 +00:00