AzureMonitor: Fix issue where resource group name is missing on the resource picker button (#36400) (#36462)

* AzureMonitor: Fix issue where resource group name is missing in the UI

* fix

(cherry picked from commit 2a4191a2ee)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2021-07-06 11:46:08 +02:00
committed by GitHub
co-authored by Josh Hunt
parent fd515d1318
commit efbfb42f15
2 changed files with 4 additions and 4 deletions
@@ -27,7 +27,7 @@ export function isGUIDish(input: string) {
export function findRow(rows: ResourceRowGroup, id: string): ResourceRow | undefined {
for (const row of rows) {
if (row.id === id) {
if (row.id.toLowerCase() === id.toLowerCase()) {
return row;
}
@@ -94,19 +94,19 @@ export default class ResourcePickerData {
const query = `
resourcecontainers
| where type == "microsoft.resources/subscriptions"
| where id == "${subscriptionURI}"
| where id =~ "${subscriptionURI}"
| project subscriptionName=name, subscriptionId
| join kind=leftouter (
resourcecontainers
| where type == "microsoft.resources/subscriptions/resourcegroups"
| where id == "${resourceGroupURI}"
| where id =~ "${resourceGroupURI}"
| project resourceGroupName=name, resourceGroup, subscriptionId
) on subscriptionId
| join kind=leftouter (
resources
| where id == "${resourceURI}"
| where id =~ "${resourceURI}"
| project resourceName=name, subscriptionId
) on subscriptionId