add min interval to postgres datasource

This commit is contained in:
Sven Klemm
2018-08-25 18:14:39 +02:00
parent ea110b5931
commit 21e7b0b92d
3 changed files with 19 additions and 2 deletions

View File

@ -317,7 +317,7 @@ export class PostgresQueryCtrl extends QueryCtrl {
case 'aggregate':
// add group by if no group by yet
if (this.target.group.length === 0) {
this.addGroup('time', '1m');
this.addGroup('time', '$__interval');
}
let aggIndex = this.findAggregateIndex(selectParts);
if (aggIndex !== -1) {