mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
when changing table reset columns
This commit is contained in:
parent
be978d1a8f
commit
483f6cc5e1
@ -209,12 +209,22 @@ export class PostgresQueryCtrl extends QueryCtrl {
|
|||||||
this.timeColumnSegment.html = segment.html;
|
this.timeColumnSegment.html = segment.html;
|
||||||
this.timeColumnSegment.value = segment.value;
|
this.timeColumnSegment.value = segment.value;
|
||||||
|
|
||||||
|
this.target.where = [];
|
||||||
|
this.target.updatePersistedParts();
|
||||||
this.timeColumnChanged();
|
this.timeColumnChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.panelCtrl.refresh();
|
this.datasource.metricFindQuery(this.metaBuilder.buildColumnQuery('value')).then(result => {
|
||||||
|
// check if value columns are still valid
|
||||||
|
if (result.length > 0) {
|
||||||
|
this.target.select = [[{ type: 'column', params: [result[0].text] }]];
|
||||||
|
this.target.group = [];
|
||||||
|
}
|
||||||
|
this.updateProjection();
|
||||||
|
this.panelCtrl.refresh();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
getTimeColumnSegments() {
|
getTimeColumnSegments() {
|
||||||
|
Loading…
Reference in New Issue
Block a user