From c90eb45ceffc39c6f50d99894b635b2f0a4cf7fa Mon Sep 17 00:00:00 2001 From: Sven Klemm Date: Tue, 14 Aug 2018 15:29:29 +0200 Subject: [PATCH] only show first/last aggregate when timescaledb is enabled --- public/app/plugins/datasource/postgres/query_ctrl.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/app/plugins/datasource/postgres/query_ctrl.ts b/public/app/plugins/datasource/postgres/query_ctrl.ts index 578c8875b1d..ee7fa9a64e8 100644 --- a/public/app/plugins/datasource/postgres/query_ctrl.ts +++ b/public/app/plugins/datasource/postgres/query_ctrl.ts @@ -114,9 +114,11 @@ export class PostgresQueryCtrl extends QueryCtrl { ], }; - // first and last are timescaledb specific - aggregates.submenu.push({ text: 'First', value: 'first' }); - aggregates.submenu.push({ text: 'Last', value: 'last' }); + // first and last aggregate are timescaledb specific + if (this.datasource.jsonData.timescaledb === true) { + aggregates.submenu.push({ text: 'First', value: 'first' }); + aggregates.submenu.push({ text: 'Last', value: 'last' }); + } this.selectMenu.push(aggregates);