45 lines
2.1 KiB
Text
45 lines
2.1 KiB
Text
|
|
{#- UNE VUE METIER (2026-10-04) — `bpm_vue` (cle), sur les controles calcules par
|
||
|
|
`bpm-membres.json.j2`. Syntaxe : module businessprocess 2.5 (parseur « legacy ») —
|
||
|
|
`noeud = a & b`, `display <priorite>;<noeud>;<libelle>` (priorite 0 : libelle seul, pas
|
||
|
|
a la racine). -#}
|
||
|
|
{%- set vue = serveur_icingaweb2_bpm_vues[bpm_vue] -%}
|
||
|
|
{%- set membres = serveur_icingaweb2_bpm_membres -%}
|
||
|
|
{%- set services = serveur_icingaweb2_bpm_services | selectattr("vues", "contains", bpm_vue)
|
||
|
|
| selectattr("cle", "in", membres.keys() | list) | list -%}
|
||
|
|
{%- set regrouper = bpm_vue == "direction" -%}
|
||
|
|
### Business Process Config File ###
|
||
|
|
#
|
||
|
|
# Title : {{ serveur_icingaweb2_bpm_nom }} — {{ vue.titre }}
|
||
|
|
# Description : {{ vue.description }}
|
||
|
|
# Statetype : hard
|
||
|
|
#
|
||
|
|
# GENERE par Set-OPS (role serveur_icingaweb2, vue « {{ bpm_vue }} »). Ne pas editer :
|
||
|
|
# modifier le catalogue (serveur_icingaweb2_bpm_services) ou le `metier:` des sondes.
|
||
|
|
###################################
|
||
|
|
|
||
|
|
{% set rang = namespace(v=0) -%}
|
||
|
|
{% for s in services -%}
|
||
|
|
{% set controles = membres[s.cle] -%}
|
||
|
|
{% if s.par_machine | default(false) -%}
|
||
|
|
{% for hote in controles | map("first") | unique | sort -%}
|
||
|
|
machine_{{ s.cle }}_{{ hote }} = {{ controles | selectattr("0", "equalto", hote) | map("join", ";") | join(" & ") }}
|
||
|
|
display 0;machine_{{ s.cle }}_{{ hote }};{{ hote }}
|
||
|
|
{% endfor -%}
|
||
|
|
svc_{{ s.cle }} = {% for hote in controles | map("first") | unique | sort %}machine_{{ s.cle }}_{{ hote }}{{ " & " if not loop.last }}{% endfor %}
|
||
|
|
|
||
|
|
{% else -%}
|
||
|
|
svc_{{ s.cle }} = {{ controles | map("join", ";") | join(" & ") }}
|
||
|
|
{% endif -%}
|
||
|
|
{% if regrouper and s.fondation | default(false) -%}
|
||
|
|
display 0;svc_{{ s.cle }};{{ s.titre }}
|
||
|
|
{% else -%}
|
||
|
|
{% set rang.v = rang.v + 1 -%}
|
||
|
|
display {{ rang.v }};svc_{{ s.cle }};{{ s.titre }}
|
||
|
|
{% endif %}
|
||
|
|
{% endfor -%}
|
||
|
|
{% set fondations = services | selectattr("fondation", "defined") | selectattr("fondation") | list -%}
|
||
|
|
{% if regrouper and fondations | length > 0 -%}
|
||
|
|
fondations = {{ fondations | map(attribute="cle") | map("regex_replace", "^", "svc_") | join(" & ") }}
|
||
|
|
display {{ rang.v + 1 }};fondations;Fondations techniques
|
||
|
|
{% endif -%}
|