-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into fix/site/cookie-loading
- Loading branch information
Showing
9 changed files
with
1,161 additions
and
1,278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
-- Deploy tet:indicateur/indicateurs_gaz_effet_serre to pg | ||
BEGIN; | ||
DROP function public.indicateurs_gaz_effet_serre(site_labellisation); | ||
create function public.indicateurs_gaz_effet_serre(site_labellisation) returns jsonb security definer language sql BEGIN ATOMIC | ||
SELECT to_jsonb(array_agg(d)) | ||
from ( | ||
SELECT iri.date_valeur, | ||
iri.resultat, | ||
id.identifiant_referentiel as identifiant, | ||
src.libelle as source | ||
FROM indicateur_valeur iri | ||
JOIN indicateur_definition id on iri.indicateur_id = id.id | ||
JOIN indicateur_source_metadonnee ism on ism.id = iri.metadonnee_id | ||
JOIN indicateur_source src on src.id = ism.source_id | ||
WHERE iri.collectivite_id = ($1).collectivite_id | ||
AND iri.metadonnee_id is not null | ||
AND iri.resultat is not null | ||
AND src.id in ('rare', 'citepa') | ||
AND id.identifiant_referentiel::text = ANY ( | ||
ARRAY [ | ||
'cae_1.g'::character varying, | ||
'cae_1.f'::character varying, | ||
'cae_1.h'::character varying, | ||
'cae_1.j'::character varying, | ||
'cae_1.i'::character varying, | ||
'cae_1.c'::character varying, | ||
'cae_1.e'::character varying, | ||
'cae_1.d'::character varying, | ||
'cae_1.a'::character varying | ||
]::text [] | ||
) | ||
) d; | ||
END; | ||
comment on function indicateurs_gaz_effet_serre(site_labellisation) is 'Indicateurs gaz à effet de serre.'; | ||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
-- Deploy tet:indicateur/indicateurs_gaz_effet_serre to pg | ||
BEGIN; | ||
DROP function public.indicateurs_gaz_effet_serre(site_labellisation); | ||
create or replace function public.indicateurs_gaz_effet_serre(site_labellisation) returns jsonb security definer language sql BEGIN ATOMIC | ||
SELECT to_jsonb(array_agg(d)) | ||
from ( | ||
SELECT iri.date_valeur, | ||
iri.resultat, | ||
id.identifiant_referentiel as identifiant, | ||
src.libelle as source | ||
FROM indicateur_valeur iri | ||
JOIN indicateur_definition id on iri.indicateur_id = id.id | ||
JOIN indicateur_source_metadonnee ism on ism.id = iri.metadonnee_id | ||
JOIN indicateur_source src on src.id = ism.source_id | ||
WHERE iri.collectivite_id = ($1).collectivite_id | ||
AND iri.metadonnee_id is not null | ||
AND id.identifiant_referentiel::text = ANY ( | ||
ARRAY [ | ||
'cae_1.g'::character varying, | ||
'cae_1.f'::character varying, | ||
'cae_1.h'::character varying, | ||
'cae_1.j'::character varying, | ||
'cae_1.i'::character varying, | ||
'cae_1.c'::character varying, | ||
'cae_1.e'::character varying, | ||
'cae_1.d'::character varying, | ||
'cae_1.a'::character varying | ||
]::text [] | ||
) | ||
) d; | ||
END; | ||
comment on function indicateurs_gaz_effet_serre(site_labellisation) is 'Indicateurs gaz à effet de serre.'; | ||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -735,3 +735,6 @@ cron/refresh_stats_views_locales [cron/[email protected]] 2024 | |
plan_action/plan_action [plan_action/[email protected]] 2024-09-25T11:24:37Z System Administrator <[email protected]> # Ajout de statuts pour les fiches action | ||
@v4.16.0 2024-10-16T14:16:21Z Frederic Arnoux <[email protected]> # Tag en v4.16.0 | ||
|
||
indicateur/indicateurs_gaz_effet_serre [indicateur/[email protected]] 2024-10-16T16:41:31Z System Administrator <[email protected]> # uniquement donnees citepa pour la page publique | ||
@v4.17.0 2024-10-16T17:05:46Z System Administrator <[email protected]> # uniquement donnees citepa pour la page publique | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Verify tet:indicateur/indicateurs_gaz_effet_serre on pg | ||
|
||
BEGIN; | ||
|
||
-- XXX Add verifications here. | ||
|
||
ROLLBACK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.