From 8c3874ee30d849b86bdaa1c3e523dcd222c036b0 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Fri, 26 Oct 2018 16:35:12 +0200 Subject: [PATCH] stackdriver: return friendly display name --- .../datasource/stackdriver/StackdriverMetricFindQuery.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/datasource/stackdriver/StackdriverMetricFindQuery.ts b/public/app/plugins/datasource/stackdriver/StackdriverMetricFindQuery.ts index 1e8d1807f86..f314b6b9d31 100644 --- a/public/app/plugins/datasource/stackdriver/StackdriverMetricFindQuery.ts +++ b/public/app/plugins/datasource/stackdriver/StackdriverMetricFindQuery.ts @@ -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, })); }