<commit_before>{% extends "::private.html.twig" %}

{% block content %}
<ul class="breadcrumb">
    <li>
        <a href="{{ path('ghome_core_config_index') }}">Configuration</a>
        <span class="divider">/</span>
    </li>
    <li class="active">
        Règles de pilotage
    </li>
</ul>

<p><a href="{{ path('ghome_core_config_addrule') }}">Ajouter une nouvelle règle</a></p>

<table class="table table-striped">
    <thead>
        <tr>
            <th colspan="2">Condition(s)</th>
            <th colspan="2">Action(s)</th>
        </tr>
    </thead>
    <tbody>
        {% for rule in rules %}
        <tr>
            {% if loop.first %}
            <td rowspan="{{ max(rule.conditions|length, rule.actions|length) }}">SI</td>
            {% endif %}
            <td>
                {% for condition in rule.conditions %}
                {{ condition.metric.name }} 
                {{ rule.formatComparator(condition.comparator) }} 
                {{ condition.metric.formatSensor(condition.threshold) }}
                {% endfor %}
            </td>
            {% if loop.first %}
            <td rowspan="{{ max(rule.conditions|length, rule.actions|length) }}">ALORS</td>
            {% endif %}
            <td>
                {% for action in rule.actions %}
                {{ action.metric.name }} : 
                {{ action.metric.formatActuator(action.value) }}
                {% endfor %}
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>

{% endblock %}<commit_msg>L'affichage des règles fonctionne correctement.<commit_after>{% extends "::private.html.twig" %}

{% block content %}
<ul class="breadcrumb">
    <li>
        <a href="{{ path('ghome_core_config_index') }}">Configuration</a>
        <span class="divider">/</span>
    </li>
    <li class="active">
        Règles de pilotage
    </li>
</ul>

<p><a href="{{ path('ghome_core_config_addrule') }}">Ajouter une nouvelle règle</a></p>

<table class="table table-striped">
    <thead>
        <tr>
            <th colspan="2">Condition(s)</th>
            <th colspan="2">Action(s)</th>
        </tr>
    </thead>
    <tbody>
        {% for rule in rules %}
        <tr>
            <td>SI</td>
            <td>
                {% for condition in rule.conditions %}
                    {{ condition.metric.name }} 
                    {{ rule.formatComparator(condition.comparator) }} 
                    {{ condition.metric.formatSensor(condition.threshold) }}
                    {% if not loop.last %}<br />{% endif %}
                {% endfor %}
            </td>
            
            <td>ALORS</td>
            <td>
                {% for action in rule.actions %}
                    {{ action.metric.name }} : 
                    {{ action.metric.formatActuator(action.value) }}
                    {% if not loop.last %}<br />{% endif %}
                {% endfor %}
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>

{% endblock %}
{'fraction_non_alphanumeric': 0.17263298762127802, 'fraction_numerical': 0.0013382402141184342, 'mean_word_length': 1.6068003487358327, 'pattern_counts': {'":': 2, '<': 77, '<?xml version=': 0, '>': 77, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2494257', 'n_tokens_mistral': 957, 'n_tokens_neox': 879, 'n_words': 172}