mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 12:32:13 +08:00

* 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>