mirror of
https://github.com/grafana/grafana.git
synced 2025-08-06 20:59:35 +08:00
add None to metric column suggestions
This commit is contained in:
@ -111,7 +111,7 @@ export class PostgresQueryCtrl extends QueryCtrl {
|
||||
getMetricColumnSegments() {
|
||||
return this.datasource
|
||||
.metricFindQuery(this.queryBuilder.buildColumnQuery('metric'))
|
||||
.then(this.transformToSegments({}))
|
||||
.then(this.transformToSegments({ addNone: true }))
|
||||
.catch(this.handleQueryError.bind(this));
|
||||
}
|
||||
|
||||
@ -182,6 +182,10 @@ export class PostgresQueryCtrl extends QueryCtrl {
|
||||
}
|
||||
}
|
||||
|
||||
if (config.addNone) {
|
||||
segments.unshift(this.uiSegmentSrv.newSegment({ type: 'template', value: 'None', expandable: true }));
|
||||
}
|
||||
|
||||
return segments;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user