mirror of
https://github.com/grafana/grafana.git
synced 2025-09-26 05:34:02 +08:00
get timecolumn datatype on timecolumn change
This commit is contained in:
@ -190,6 +190,11 @@ export class PostgresQueryCtrl extends QueryCtrl {
|
|||||||
|
|
||||||
timeColumnChanged() {
|
timeColumnChanged() {
|
||||||
this.target.timeColumn = this.timeColumnSegment.value;
|
this.target.timeColumn = this.timeColumnSegment.value;
|
||||||
|
this.datasource.metricFindQuery(this.metaBuilder.buildDatatypeQuery(this.target.timeColumn)).then(result => {
|
||||||
|
if (result.length === 1) {
|
||||||
|
this.target.timeColumnType = result[0];
|
||||||
|
}
|
||||||
|
});
|
||||||
this.panelCtrl.refresh();
|
this.panelCtrl.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user