mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AzureMonitor: Make ResourceNames() case insensitive (#40690)
This commit is contained in:
parent
302fef394a
commit
ed68056b88
@ -573,6 +573,16 @@ describe('AzureMonitorDatasource', () => {
|
||||
expect(results[0].value).toEqual('nodeapp');
|
||||
});
|
||||
});
|
||||
|
||||
it('should return ignore letter case', () => {
|
||||
return ctx.ds
|
||||
.getResourceNames('9935389e-9122-4ef9-95f9-1513dd24753f', 'nodeapp', 'microsoft.insights/Components')
|
||||
.then((results: Array<{ text: string; value: string }>) => {
|
||||
expect(results.length).toEqual(1);
|
||||
expect(results[0].text).toEqual('nodeapp');
|
||||
expect(results[0].value).toEqual('nodeapp');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('and the metric definition is blobServices', () => {
|
||||
|
@ -40,7 +40,10 @@ export default class ResponseParser {
|
||||
}
|
||||
|
||||
for (let i = 0; i < result.value.length; i++) {
|
||||
if (result.value[i].type === metricDefinition) {
|
||||
if (
|
||||
typeof result.value[i].type === 'string' &&
|
||||
result.value[i].type.toLocaleLowerCase() === metricDefinition.toLocaleLowerCase()
|
||||
) {
|
||||
list.push({
|
||||
text: result.value[i].name,
|
||||
value: result.value[i].name,
|
||||
|
Loading…
Reference in New Issue
Block a user