CI / test (push) Successful in 1m53s
- Comptes en base (PBKDF2), rôles, désactivation qui tue la session, audit ; secours environnement pour l'opérateur ; liaison draco par utilisateur ; page /profile. - Espaces de travail : connexions, membres, sélection de projets ; board/notes/épingles/journal scopés par espace ; sélecteur d'espace, badge connexion. - Panneaux /admin (utilisateurs, connexions, espaces, paramètres — l'environnement amorce, le panneau gouverne). - /archives : archive locale réversible, archivage forge confirmé, purge de l'état local, export Markdown, file « à archiver ? » avec archivage en lot. - Correctif session : les comptes membres résolus par la base (la session n'est plus limitée à l'opérateur d'environnement). - 231 tests verts (12 nouveaux au palier 19).
79 lines
4.9 KiB
HTML
79 lines
4.9 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="fr" data-theme="dark">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta name="csrf-token" content="{{ csrf_token }}">
|
||
<title>Connexions — Administration — Kanbante</title>
|
||
<link rel="stylesheet" href="/static/css/style.css?v={{ version }}">
|
||
</head>
|
||
<body>
|
||
{% include "_header.html" %}
|
||
|
||
<main class="focus-main">
|
||
<div class="page-head">
|
||
<h1>🔌 Connexions aux forges</h1>
|
||
<p class="page-sub">Chaque connexion est un accès Gitea ou GitHub. Les jetons sont <strong>chiffrés au repos</strong> et ne sont <strong>jamais réaffichés</strong> — pour en changer un, saisis la nouvelle valeur.</p>
|
||
</div>
|
||
{% if msg %}<p class="chip-ok">✅ {{ msg }}</p>{% endif %}
|
||
{% if err %}<p class="chip-warn">⚠️ {{ err }}</p>{% endif %}
|
||
|
||
{% for c in connections %}
|
||
<section class="briefing-card">
|
||
<h2>{% if c.kind == 'github' %}🐙{% else %}🍵{% endif %} {{ c.name }}
|
||
<span class="muted">({{ c.slug }})</span>
|
||
{% if c.owner_user_id %}<span class="chip-warn">personnelle</span>{% endif %}
|
||
{% if not c.enabled %}<span class="chip-warn">désactivée</span>{% endif %}
|
||
</h2>
|
||
<p class="muted">
|
||
{{ c.kind }} · {{ c.base_url }} · compte : <strong>{{ c.account_login or 'à tester' }}</strong> · jeton : {{ c.token_mask }}<br>
|
||
Webhook : <code>/webhooks/{{ c.slug }}</code> (secret {% if c.webhook_secret %}défini{% else %}hérité ou absent{% endif %})
|
||
{% if c.used_by %} · Utilisée par : {{ c.used_by|join(', ') }}{% endif %}
|
||
</p>
|
||
<form method="post" action="/admin/connections/{{ c.id }}" class="admin-form">
|
||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||
<label>Nom <input type="text" name="name" value="{{ c.name }}"></label>
|
||
<label>URL de base <input type="text" name="base_url" value="{{ c.base_url }}"></label>
|
||
<label>Nouveau jeton (vide = inchangé) <input type="password" name="token" autocomplete="off" placeholder="••••••••"></label>
|
||
<label>Secret webhook (vide = inchangé) <input type="password" name="hook_secret" autocomplete="off" placeholder="••••••••"></label>
|
||
<button type="submit" class="btn-save btn-inline">Enregistrer</button>
|
||
</form>
|
||
<p class="admin-actions">
|
||
<form method="post" action="/admin/connections/{{ c.id }}/test" class="inline-form">
|
||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||
<button type="submit" class="btn-mini">🧪 Tester la connexion</button>
|
||
</form>
|
||
<form method="post" action="/admin/connections/{{ c.id }}/toggle" class="inline-form">
|
||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||
<button type="submit" class="btn-mini">{% if c.enabled %}Désactiver{% else %}Activer{% endif %}</button>
|
||
</form>
|
||
<form method="post" action="/admin/connections/{{ c.id }}/delete" class="inline-form" onsubmit="return confirm('Supprimer définitivement cette connexion ?');">
|
||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||
<button type="submit" class="btn-mini btn-danger">Supprimer</button>
|
||
</form>
|
||
</p>
|
||
</section>
|
||
{% endfor %}
|
||
|
||
<section class="briefing-card">
|
||
<h2>➕ Nouvelle connexion</h2>
|
||
<form method="post" action="/admin/connections" class="admin-form">
|
||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||
<label>Type
|
||
<select name="kind">
|
||
<option value="gitea">Gitea</option>
|
||
<option value="github">GitHub</option>
|
||
</select>
|
||
</label>
|
||
<label>Nom <input type="text" name="name" required placeholder="GitHub perso"></label>
|
||
<label>URL de base <input type="text" name="base_url" required placeholder="https://api.github.com ou https://git.exemple.net"></label>
|
||
<label>Jeton d'accès <input type="password" name="token" autocomplete="off"></label>
|
||
<label>Secret webhook (optionnel) <input type="password" name="hook_secret" autocomplete="off"></label>
|
||
<button type="submit" class="btn-save btn-inline">Ajouter</button>
|
||
</form>
|
||
<p class="notes-hint">Pour GitHub, un jeton personnel (PAT) avec accès aux dépôts visés suffit. Ajoute ensuite la connexion à un espace (Administration → Espaces) pour voir ses projets.</p>
|
||
</section>
|
||
</main>
|
||
</body>
|
||
</html>
|