From: Dobrica Pavlinusic Date: Thu, 31 Aug 2023 09:50:01 +0000 (+0200) Subject: for sub_filter view fix time for grafana and grant X-Git-Url: http://git.rot13.org/?p=zc;a=commitdiff_plain;h=3c164959c4e833ca0e02bed72c8179af24a176e3 for sub_filter view fix time for grafana and grant --- 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; }; +