{% extends 'base.html' %} {% block title %}{{ c.label or c.week_code }}{% endblock %} {% block content %}
← Campagnes

{{ c.label or c.week_code }}

{{ c.status }} {{ c.week_code }} {{ c.year }} {% if c.date_start %}{{ c.date_start.strftime('%d/%m/%Y') }}{% if c.date_end %} → {{ c.date_end.strftime('%d/%m/%Y') }}{% endif %}{% endif %} par {{ c.created_by_name or '-' }}
{% if can_edit_campaigns %} {% if c.status == 'draft' %} {% if can_plan %}
{% else %} {% endif %} {% elif c.status == 'pending_validation' %}
{% elif c.status == 'planned' %}
{% elif c.status == 'in_progress' %}
{% endif %} {% if c.status in ('draft', 'pending_validation', 'planned') %}
{% endif %} {% if c.status in ('draft', 'cancelled') %}
{% endif %} {% endif %}
{% if msg %}
{% if msg == 'excluded' %}Serveur exclu.{% elif msg == 'restored' %}Serveur restauré.{% elif msg == 'prereq_saved' %}Prérequis sauvegardés.{% elif msg == 'prereq_checked' %}Prérequis vérifié.{% elif msg == 'prereq_needed' %}Prérequis requis avant soumission COMEP.{% elif msg == 'taken' %}Serveur pris.{% elif msg == 'released' %}Serveur libéré.{% elif msg == 'assigned' %}Intervenant assigné.{% elif msg == 'scheduled' %}Planning ajusté.{% elif msg == 'limit_set' %}Limite intervenant définie.{% elif msg == 'already_taken' %}Ce serveur est déjà pris.{% elif msg == 'limit_reached' %}Limite de serveurs atteinte pour cette campagne.{% elif msg == 'forced_cant_release' %}Assignation forcée — seul le coordinateur peut modifier.{% elif msg.startswith('checked_') %}Vérification: {{ msg.split('_')[1] }} vérifiés, {{ msg.split('_')[2] }} auto-exclus.{% endif %}
{% endif %}
{{ stats.total }}
Total
{{ stats.patched }}
Patches
{{ stats.failed }}
Échoués
{{ stats.pending }}
En attente
{{ stats.excluded }}
Exclus
{{ stats.assignéd }}
Assignés
{{ stats.unassigned }}
Libres
{% set patchable = stats.total - stats.excluded - stats.cancelled %}
{% if patchable > 0 %}{{ (stats.patched / patchable * 100)|int }}%{% else %}-{% endif %}
Progression
{% if op_counts %}
{% for oc in op_counts %}
{{ oc.display_name }} {{ oc.count }}
{% endfor %} {% if stats.unassigned > 0 %}
Non assignés {{ stats.unassigned }}
{% endif %}
{% endif %} {% if c.status == 'draft' and prereq and can_edit_campaigns %}

Prérequisuis ({{ prereq.prereq_ok }}/{{ prereq.total_pending }} valides)

A vérifiér{{ prereq.prereq_todo }}
SSH{{ prereq.ssh_ok }}
Satellite{{ prereq.sat_ok }}
Rollback{{ prereq.rollback_ok }}
Disque{{ prereq.disk_ok }}
{% if prereq.total_pending > 0 %}
{% endif %}
{% endif %}
{% if c.status == 'draft' %} {% endif %} {% for s in sessions %} {% if c.status == 'draft' %} {% endif %} {# Formulaires inline #} {% if s.status == 'pending' %} {% endif %} {% endfor %}
Hostname Domaine Env Tier Jour prevu Heure IntervenantSSH Sat DisqueStatut Actions
{{ s.hostname }} {{ s.domaine or '-' }} {{ (s.environnement or '-')[:6] }} {{ s.tier }} {% if s.date_prevue %}{% set jours = {0:'Lun',1:'Mar',2:'Mer',3:'Jeu',4:'Ven',5:'Sam',6:'Dim'} %}{{ jours[s.date_prevue.weekday()] }} {{ s.date_prevue.strftime('%d/%m') }}{% else %}-{% endif %} {{ s.heure_prevue or s.pref_patch_heure or '-' }} {% if s.intervenant_name %} {{ s.intervenant_name }} {% if s.forced_assignment %}🔒{% endif %} {% else %}{% endif %} {% if s.prereq_ssh == 'ok' %}OK{% elif s.prereq_ssh == 'ko' %}KO{% else %}-{% endif %} {% if s.prereq_satellite == 'ok' %}OK{% elif s.prereq_satellite == 'ko' %}KO{% else %}-{% endif %} {% if s.prereq_disk_ok is true %}OK{% elif s.prereq_disk_ok is false %}KO{% else %}-{% endif %} {{ s.status }} {% if s.exclusion_reason %}
{% if s.exclusion_reason == 'eol' %}EOL{% elif s.exclusion_reason == 'creneau_inadequat' %}Prérequis KO{% elif s.exclusion_reason == 'non_patchable' %}Non patchable{% else %}{{ s.exclusion_reason }}{% endif %} {% if s.excluded_by %}({{ s.excluded_by }}){% endif %}
{% endif %}
{% if s.status == 'excluded' and can_edit_campaigns %}
{% elif s.status == 'pending' %} {% if c.status == 'planned' %} {# Intervenant: prendre/liberer #} {% if not s.intervenant_id %}
{% elif s.intervenant_id == user.uid and not s.forced_assignment %}
{% endif %} {# Coordinateur: assigner + planifier #} {% if can_edit_campaigns %} {% endif %} {% elif c.status == 'draft' and can_edit_campaigns %}
{% endif %} {% endif %}
{% if can_edit_campaigns and c.status in ('planned', 'pending_validation') %}

Limites intervenants pour cette campagne

{% if op_limits %}
{% for ol in op_limits %}
{{ ol.display_name }} max {{ ol.max_servers }}{% if ol.note %} — {{ ol.note }}{% endif %}
{% endfor %}
{% endif %}
{% endif %} {% endblock %}