Kiosk : git pull auto + diagnostic caméra dans admin

- kiosk-session.sh : git pull à chaque démarrage du backend
  (les correctifs Gitea sont maintenant déployés automatiquement)
- Log backend dans /tmp/photobooth-backend.log (lisible via admin)
- Admin > Infos : bouton "Diagnostic camera" → appelle /api/camera/debug
  et affiche mode, connectee, erreur capture_preview, widgets gphoto2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 09:56:55 +02:00
parent d3a71a9866
commit f977189a93
4 changed files with 29 additions and 1 deletions

View File

@@ -657,6 +657,13 @@
<div id="infos-systeme-contenu" class="infos-systeme-contenu">
<p class="infos-chargement">Chargement...</p>
</div>
<div class="infos-systeme-header" style="margin-top:1.5rem">
<h3>Diagnostic camera</h3>
<button class="btn-action btn-petit" onclick="chargerDiagCamera()">&#8635; Tester</button>
</div>
<div id="diag-camera-contenu" style="font-family:monospace;font-size:0.75rem;background:#111;color:#0f0;padding:0.75rem;border-radius:6px;white-space:pre-wrap;max-height:300px;overflow-y:auto">
Appuyer sur Tester...
</div>
</div>
</div>
</section>

View File

@@ -939,3 +939,22 @@ async function regenererBoothPassword() {
afficherStatut('Erreur connexion au serveur booth', 'erreur');
}
}
async function chargerDiagCamera() {
const el = document.getElementById('diag-camera-contenu');
el.textContent = 'Test en cours...';
try {
const data = await apiGet('/api/camera/debug');
let txt = '';
for (const [k, v] of Object.entries(data)) {
if (k === 'config_widgets_top') {
txt += `${k}: ${Array.isArray(v) ? v.join(', ') : v}\n`;
} else {
txt += `${k}: ${JSON.stringify(v)}\n`;
}
}
el.textContent = txt || 'Aucune donnee';
} catch (e) {
el.textContent = 'ERREUR : ' + e.message;
}
}