From 3c164959c4e833ca0e02bed72c8179af24a176e3 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 31 Aug 2023 11:50:01 +0200 Subject: [PATCH] for sub_filter view fix time for grafana and grant --- views.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/views.pl b/views.pl index bffb582..e3b2678 100755 --- a/views.pl +++ b/views.pl @@ -68,7 +68,7 @@ where pn = $pn $time push @sql_location, qq{ select - to_char(time, 'YYYY-MM-DD HH24:MI:SS') as time, x_axis_angle + $offset_x as x_axis_angle, y_axis_angle + $offset_y as y_axis_angle, sensor_temperature, power_source_voltage, zc.pn + timezone('UTC-2'::text, "time") AS "time", x_axis_angle + $offset_x as x_axis_angle, y_axis_angle + $offset_y as y_axis_angle, sensor_temperature, power_source_voltage, zc.pn from zc where pn = $pn $time }; @@ -116,4 +116,7 @@ drop view sub_$filter ; create or replace view sub_$filter as }, join(' union ', @sql_location) . qq{ order by 1 asc +; +grant select on sub_$filter to grafana; }; + -- 2.20.1