stackdriver: return friendly display name

This commit is contained in:
Erik Sundell
2018-11-09 13:55:08 +01:00
parent 4ab278dca4
commit 8c3874ee30
@@ -21,7 +21,8 @@ export default class StackdriverMetricFindQuery {
const metricDescriptors = await this.datasource.getMetricTypes(this.datasource.projectName);
const services = extractServicesFromMetricDescriptors(metricDescriptors);
return services.map(s => ({
text: s.name,
text: s.serviceShortName,
value: s.name,
expandable: true,
}));
}
@@ -32,7 +33,8 @@ export default class StackdriverMetricFindQuery {
}
const metricDescriptors = await this.datasource.getMetricTypes(this.datasource.projectName);
return getMetricTypesByService(metricDescriptors, service).map(s => ({
text: s.name,
text: s.displayName,
value: s.name,
expandable: true,
}));
}