|
|
8f9145 |
diff --git a/src/datasources/redis/datasource.ts b/src/datasources/redis/datasource.ts
|
|
|
8f9145 |
index aea11fc..5980ffa 100644
|
|
|
8f9145 |
--- a/src/datasources/redis/datasource.ts
|
|
|
8f9145 |
+++ b/src/datasources/redis/datasource.ts
|
|
|
8f9145 |
@@ -138,7 +138,7 @@ export class PCPRedisDatasource {
|
|
|
8f9145 |
}
|
|
|
8f9145 |
|
|
|
8f9145 |
static defaultLegendFormatter(metric: string, instance: MetricInstance<number | string> | undefined, labels: Record<string, any>) {
|
|
|
8f9145 |
- let label = instance && instance.id !== null ? instance.name : metric;
|
|
|
8f9145 |
+ let label = instance && instance.id !== "" ? instance.name : metric;
|
|
|
8f9145 |
if (!_.isEmpty(labels)) {
|
|
|
8f9145 |
const pairs: string[] = [];
|
|
|
8f9145 |
for (const label of ["hostname", "source"]) {
|
|
|
8f9145 |
@@ -182,7 +182,7 @@ export class PCPRedisDatasource {
|
|
|
8f9145 |
const descriptions = await this.pmSeriesSrv.getDescriptions(seriesList);
|
|
|
8f9145 |
const metricNames = await this.pmSeriesSrv.getMetricNames(seriesList);
|
|
|
8f9145 |
const instanceValuesGroupedBySeries = _.groupBy(instances, "series");
|
|
|
8f9145 |
- const labels = this.pmSeriesSrv.getMetricAndInstanceLabels(seriesList);
|
|
|
8f9145 |
+ const labels = await this.pmSeriesSrv.getMetricAndInstanceLabels(seriesList);
|
|
|
8f9145 |
const targetResults = await Promise.all(targets.map(target => this.handleTarget(
|
|
|
8f9145 |
_.pick(instanceValuesGroupedBySeries, seriesByExpr[target.expr]), metricNames, descriptions, labels, target
|
|
|
8f9145 |
)));
|