stackdriver: wip: split metric dropdown into two parts - resource and metric

This commit is contained in:
Erik Sundell
2018-09-25 16:51:12 +02:00
parent a41c5f7b37
commit 3f7314831f
3 changed files with 74 additions and 6 deletions

View File

@@ -159,7 +159,7 @@ export default class StackdriverDatasource {
try {
const metricsApiPath = `v3/projects/${projectId}/metricDescriptors`;
const { data } = await this.doRequest(`${this.baseUrl}${metricsApiPath}`);
return data.metricDescriptors.map(m => ({ id: m.type, name: m.displayName }));
return data.metricDescriptors;
} catch (error) {
console.log(error);
}