* Update namespace endpoint to filter out only relevant namespaces
* Update tests
* Fix url builder tests
* Add todo comments
* Update func to use ARG to retrieve namespaces with metrics
* Refactor getMetricNamespaces for readability
* Lint
* Remove comments
* Remove type assertion
* Refactor ARG query
* Update tests and refactor class to use ARG
* Update resource group query
- Updates the resource groups query to support users/apps with restricted permissions
* Update resources request to be paginated
- Also order by name
- Add tests
* Start refactoring azure monitor util functions to resource graph
* Minor lint
* Add getMetricNamespaces resource graph function
* Modify getMetricNamespaces call
- Use resource graph function for variable queries
* Return names for getResourceNames values
* Use getMetricNamespaces variable specific req in editor
* Substantial refactor
- Update Azure Resource Graph data source with a method for making paged requests and a method for retrieving metric namespaces (and add tests)
- Extract helpers from azure_monitor_datasource to utils and generalise them (also revert previous changes to datasource and test file)
- Update mock with Azure Resource Graph data source
- Revert response parser changes
- Revert url builder changes
- Update get metric namespaces query to use the resource graph method for variable queries
- Update docs
* Lint
* Oops
* Fix type
* Lint and betterer
* Simplify imports
* Improve type
* Simplify resource picker class
* Start updating tests
* Fix naming and include missing error
* Update resource graph data source mock
* Update tests
* Remove unneeded parser
* Add get subscriptions to resource graph
* Generalise resource groups request
* Fix resource names request to ensure no clashing
* Update types
* Use resource graph queries for resource picker
* Correctly map resource group names
* Update mocks
* Update tests
* Fix mapping
* Refactor getResourceNames
- Remove most of the logic from resourcePickerData
- Add helper for parsing resource names as template vars
- Some renames for clarity
- Update types
- Update tests
* Ensure namespaces are lowercase
* Update docs/sources/datasources/azure-monitor/template-variables/index.md
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
* Prettier write
* Ensure we return all namespaces if resourceGroup isn't specified
---------
Co-authored-by: alyssabull <alyssabull@gmail.com>
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
* remove local graf templateSrv and use @grafana/runtime
* tests broken still 0.0
* wip
* moving around tests and fixing
* template var test using mocking and stuff
* AM ds tests fixed
* fix filter tests
* all tests work
* remove comment
* Update azure_log_analytics_datasource.ts
* remove deferred util - not used
* mock instead of spying
* not calling getTemplateSrv each time
* pass range down to filter instead of doing werid stuff
* use default time range if no time range
* prettierer
* remove note
* Revert "remove regions/locations from variable editor"
This reverts commit 41dc6a8bfb5dd90d56c108f7d76d20d79011d51a.
* Revert "remove region pieces from e2e"
This reverts commit 6b1f82f14a2f4f7338f5ad4b84a89c0e375e7348.
* e2e: open resource picker correctly
* AzureMonitor: Fix ResourcePicker hanging
Removed location fetching for every subscription.
Fixes#70523
* fix region for multi metricnames
* fix tests
* fix e2e
* remove regions/locations from variable editor
* remove region pieces from e2e
* Initial schema
- Add types based off of current frontend
* Rename and field-level comments
* Update report and regenerate files
* Rename frontend Azure folder
- Doing this for consistency and to ensure code-generation works
- Update betterer results due to file renames
* Remove default and add back enum vals that I deleted
* Set workspace prop as optional
* Replace template variable types
* Connect frontend query types
- Keep properties optional for now to avoid major changes
- Rename AzureMetricResource
- Correctly use ResultFormat
* Add TSVeneer decorator
* Update schema
* Update type
* Update CODEOWNERS
* Fix gen-cue issue
* Fix backend test
* Fix e2e test
* Update code coverage
* Remove references to old Azure Monitor path
* Review
* Regen files