patchcenter/app/services
Admin MPCZ 00998e9320 feat(pct): bouton Prevenance PCT + preview avant envoi + CC responsables/referents
- Service mail_service.py: send_html_mail via SMTP standard (host/port/user/pass/from/use_tls
  depuis Settings > SMTP). Gere SSL_465 et STARTTLS_587. Mode dry_run pour preview.
- Settings: nouvelle section 'smtp' avec smtp_host/port/user/pass/from/use_tls/pct_recipient
  (a configurer pour O365 SMTP submission)
- Router planning_import.py:
  * _build_pct_email(): construit subject + HTML pro/colore (header bleu degrade SANEF,
    cards avec border-left bleu/orange, tableau serveurs, footer)
  * Subject: 'Intervention sur <app>' si app uniforme, sinon liste des serveurs
  * Plage horaire = 20 min × N serveurs (formattee Hh MM)
  * 'Moyen d'exploitation prevu : Rollback en cas de probleme' ajoute en bas
  * _fetch_pct_cc_emails(): query distinct contacts depuis responsable_domaine_contact_id
    + referent_technique_contact_id + server_additional_referents
  * Endpoint POST /patching/import/pct-prevenance/preview retourne {subject, html, to, cc,
    smtp_configured, row_count} sans envoyer
  * Endpoint POST /patching/import/pct-prevenance/send envoie reellement, audit log,
    update pct_mail_sent_at sur les rows
- Template patching_import.html:
  * Bouton 'Prevenance PCT' (violet) a cote des autres actions
  * Modal preview avec iframe sandboxe pour le rendu HTML mail
  * Affiche destinataires, CC, objet, count serveurs
  * Warning rouge si SMTP non configure (envoi desactive, preview seulement)
  * 2 boutons: Annuler / Envoyer (avec confirmation)
2026-05-07 21:44:02 +02:00
..
__init__.py
agent_deploy_service.py
audit_service.py
cache.py
campaign_service.py
correspondance_service.py
itop_service.py fix(servers/edit): timeout iTop reduit (3s connect / 10s read au lieu de 30s) + indicateur de chargement htmx visible (bouton change en 'Sauvegarde...' + message en bas du form) 2026-05-05 15:47:12 +02:00
ldap_service.py
mail_service.py feat(pct): bouton Prevenance PCT + preview avant envoi + CC responsables/referents 2026-05-07 21:44:02 +02:00
patch_run_service.py feat(patching/iexec B3.6): bouton 3e Reboot manuel (double confirmation, jamais auto) + 3f Wait reconnexion (poll TCP/22 + SSH uptime, timeout 10min) - shutdown -r +1 avec audit log 2026-05-05 12:06:50 +02:00
prepatch_check_service.py feat(prepatch): iteration multi-candidats SSH selon priorite SANEF 2026-05-07 19:31:14 +02:00
prereq_service.py feat(servers): drop colonnes legacy (snapshot_required/pre_patch_script/post_patch_script/satellite_host/need_pct) avec migration donnees + recreation views v_servers / v_patchable / v_conformity_todo + adaptation prereq_service et server_detail.html 2026-05-05 15:11:30 +02:00
profile_service.py
qualys_service.py fix(qualys): strip() defensif sur credentials + extraction enrichie de l erreur Qualys (responseCode + errorMessage + errorResolution + RAW fallback si format inconnu) 2026-05-05 18:28:13 +02:00
qualys_tags_service.py fix(qualys): API 2.0 confirmee (3.0 OTHER_ERROR car endpoint inexistant, 5.0 INVALID_API_VERSION) + body XML + mapping field user-friendly vers nom Qualys (hostname->name, fqdn->dnsHostName, ip->address) - cause racine 401 = mot de passe API expire 2026-05-05 16:56:56 +02:00
query_helpers.py
quickwin_log_service.py
quickwin_prereq_service.py
quickwin_service.py
quickwin_snapshot_service.py chore(snapshot): strip() defensif sur credentials vCenter (copier-coller peut ajouter newline/CR) 2026-05-04 16:29:20 +02:00
realtime_audit_service.py feat(prepatch): iteration multi-candidats SSH selon priorite SANEF 2026-05-07 19:31:14 +02:00
secrets_service.py
server_service.py fix(servers): filtre Zone=LAN match aussi zone_id IS NULL (la colonne affiche 'LAN' par defaut quand zone vide) + comparaison case-insensitive sur z.name 2026-05-05 16:05:25 +02:00
snapshot_mgmt_service.py feat(snapshots): nouveau format <user>_YYYY-MM-DD_HH-MM_avant_patch + filtre PatchCenter only 2026-05-07 20:58:54 +02:00
teams_service.py feat(pct): workflow prevenance PCT (auto-detection + gate confirmation + suffixe Teams) 2026-05-07 08:19:19 +02:00