-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Azure: Resource picker improvements (#109458) #109520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Create feature toggle
|
Since you've added the |
1 similar comment
|
Since you've added the |
This comment has been minimized.
This comment has been minimized.
|
💻 Deploy preview deleted. |
# Conflicts: # packages/grafana-data/src/types/featureToggles.gen.ts # pkg/services/featuremgmt/registry.go # pkg/services/featuremgmt/toggles_gen.csv # pkg/services/featuremgmt/toggles_gen.go
* Create feature toggle * Fix namespace typo * Retrieving default subscription ID * Style updates - Filter input styling - Improved modal styling * Pass data source to resource field * Search style updates * Function to support fetching filtered rows * Filtering nested rows * Filtering search * Support subscriptions filtering - Support filtering in resource graph functions - Subscriptions filter component * getSubscriptions tests * Fix logs query editor test * Update data source mock * Update resourcePickerData tests * Update tests, lint, and i18n * Lint and test * Simplify type
* Create feature toggle * Fix namespace typo * Retrieving default subscription ID * Style updates - Filter input styling - Improved modal styling * Pass data source to resource field * Search style updates * Function to support fetching filtered rows * Filtering nested rows * Filtering search * Support subscriptions filtering - Support filtering in resource graph functions - Subscriptions filter component * getSubscriptions tests * Fix logs query editor test * Update data source mock * Update resourcePickerData tests * Add types filter * Update tests, lint, and i18n * Lint and test * Simplify type * Rename variable for clarity
* Create feature toggle * Fix namespace typo * Retrieving default subscription ID * Style updates - Filter input styling - Improved modal styling * Pass data source to resource field * Search style updates * Function to support fetching filtered rows * Filtering nested rows * Filtering search * Support subscriptions filtering - Support filtering in resource graph functions - Subscriptions filter component * getSubscriptions tests * Fix logs query editor test * Update data source mock * Update resourcePickerData tests * Add types filter * Locations filter * Update tests, lint, and i18n * Minor test updates * Imports * Lint and test * Simplify type * Rename variable for clarity * Rename var
* Create feature toggle * Fix namespace typo * Retrieving default subscription ID * Style updates - Filter input styling - Improved modal styling * Pass data source to resource field * Search style updates * Function to support fetching filtered rows * Filtering nested rows * Filtering search * Support subscriptions filtering - Support filtering in resource graph functions - Subscriptions filter component * getSubscriptions tests * Fix logs query editor test * Update data source mock * Update resourcePickerData tests * Add types filter * Locations filter * Update tests, lint, and i18n * Minor test updates * Imports * Lint and test * Resource picker filter tests * Update tests * Simplify type * Rename variable for clarity * Rename var
* Create feature toggle * Fix namespace typo * Retrieving default subscription ID * Style updates - Filter input styling - Improved modal styling * Pass data source to resource field * Search style updates * Function to support fetching filtered rows * Filtering nested rows * Filtering search * Support subscriptions filtering - Support filtering in resource graph functions - Subscriptions filter component * getSubscriptions tests * Fix logs query editor test * Update data source mock * Update resourcePickerData tests * Add types filter * Locations filter * Update tests, lint, and i18n * Minor test updates * Imports * Lint and test * Resource picker filter tests * Update tests * Event for filter usage * Function to support local storage * Recent resources view - Add LocalStorageValueProvider to store recent resources - Add tabbed view to support switching between recent resources and resource picker - Extract the base resource picker out to a functional component for reusability - Extract the base resource table out to a functional component for reusability * Update i18n keys * Export resource key * Add no recent resources text * Run legacy tests with feature toggle off * Add filters test without feature toggle * Don't use as type assertions * Add tests for recent resources * Store resources for each query type * i18n-extract * Simplify type * Minor performance improvement * Rename variable for clarity * Rename var * Add placeholders
* Minor simplifying refactor * Add more tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, will let you make the decision on what to do with my comment, but would recommend taking a look.
| if (selection.resourceGroup && !findRow(resources, resourceGroupURI)) { | ||
| const resourceGroups = await this.getResourceGroupsBySubscriptionId(selection.subscription, type); | ||
| resources = addResources(resources, `/subscriptions/${selection.subscription}`, resourceGroups); | ||
| let resources = subscriptions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this was here before you updated it here, but I'd encourage you to refactor this section. The mutation of the resources variable asynchronously inside the map here is an anti-pattern and a bug waiting to happen.
# Conflicts: # packages/grafana-data/src/types/featureToggles.gen.ts # pkg/services/featuremgmt/registry.go # pkg/services/featuremgmt/toggles_gen.csv # pkg/services/featuremgmt/toggles_gen.go
What is this feature?
Major improvements to the Azure resource picker used for metrics, logs, and traces query types.
This PR introduces filters for the subscription, resource type, and resource location. This change allows users with large Azure estates to more effectively find the resources they would like to query.
Things worth noting:
azureResourcePickerUpdateswhich is disabled by default.getSubscriptions,getResourceGroups, andgetResourceNamesfunctions. When filters are applied the containing subscription and resource group will still be returned to preserve the hierarchical display.Why do we need this feature?
To improve the UX for Azure users with large Azure estates.
Who is this feature for?
Users of Azure Monitor.
Which issue(s) does this PR fix?:
Closes #108925
Closes #108927
Closes #108928
Closes #108931
Closes #108932
Part of #99467
Special notes for your reviewer:
Please check that: