Aded joblines status view and updated graph to use the view. BOD-110
This commit is contained in:
@@ -0,0 +1 @@
|
||||
[]
|
||||
14
hasura/migrations/1596731097672_run_sql_migration/up.yaml
Normal file
14
hasura/migrations/1596731097672_run_sql_migration/up.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
- args:
|
||||
cascade: true
|
||||
read_only: false
|
||||
sql: "CREATE OR REPLACE FUNCTION public.parts_status_by_job_id(jobIdVar text)\n
|
||||
RETURNS SETOF joblines\n LANGUAGE plpgsql\n STABLE\nAS $function$\n\nBEGIN\n
|
||||
\ if jobIdVar = '' then\n return query select status ,count(1), part_type
|
||||
from joblines j group by status, part_type ;\n else \n return query select
|
||||
status ,count(1), part_type from joblines j where j.jobid =jobIdVar group by
|
||||
status, part_type;\n end if;\n\n\tEND\n$function$;"
|
||||
type: run_sql
|
||||
- args:
|
||||
name: parts_status_by_job_id
|
||||
schema: public
|
||||
type: track_function
|
||||
Reference in New Issue
Block a user