Datasource/Loki: Empty metric name no longer replaced by query (#20924)

Closes #20762
This commit is contained in:
kay delaney 2019-12-06 14:30:27 +00:00 committed by GitHub
parent 30771f25bf
commit 6f4f327887
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -284,7 +284,7 @@ function createMetricLabel(labelData: { [key: string]: string }, options?: Trans
? getOriginalMetricName(labelData)
: renderTemplate(templateSrv.replace(options.legendFormat), labelData);
if (!label || label === '{}') {
if (!label) {
label = options.query;
}
return label;