diff --git a/app/CHANGELOG.md b/app/CHANGELOG.md index c1f9886..eb6e0a0 100644 --- a/app/CHANGELOG.md +++ b/app/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog — Alpinux Static +## [1.5.2] — 2026-05-06 + +### Ajouté +- Erreurs 404 : champ de recherche dynamique — filtre les lignes par chemin ou adresse IP à chaque frappe, avec compteur de résultats + +--- + ## [1.5.1] — 2026-05-06 ### Corrigé diff --git a/app/VERSION b/app/VERSION index 26ca594..4cda8f1 100644 --- a/app/VERSION +++ b/app/VERSION @@ -1 +1 @@ -1.5.1 +1.5.2 diff --git a/app/static/app.css b/app/static/app.css index b375b69..dab19ef 100644 --- a/app/static/app.css +++ b/app/static/app.css @@ -326,6 +326,10 @@ footer { background: var(--blue-dark); color: rgba(255,255,255,.6); margin-top: .err-header h2 { margin: 0; } .err-total-badge { font-size: .75rem; font-weight: 400; color: var(--muted); margin-left: .5rem; } .btn-sm { font-size: .8rem; padding: .3rem .7rem; background: var(--blue-light); color: var(--blue); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; } +.err-search-wrap { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; } +.err-search { flex: 1; max-width: 380px; padding: .4rem .75rem; border: 1px solid var(--border); border-radius: 8px; font-size: .9rem; background: var(--bg); color: var(--text); } +.err-search:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-light); } +.err-search-count { font-size: .8rem; color: var(--muted); } .err-table .err-path code { font-size: .82rem; color: var(--text); word-break: break-all; } .col-err-status { width: 1.5rem; text-align: center; } diff --git a/app/templates/errors_404.html b/app/templates/errors_404.html index 4333b0d..7fc2cc2 100644 --- a/app/templates/errors_404.html +++ b/app/templates/errors_404.html @@ -18,6 +18,10 @@ {% if not entries %}

Aucune erreur 404 dans les logs récents.

{% else %} +
+ + +
@@ -31,7 +35,7 @@ {% for path, info in entries %} - +
{ + const match = !q + || row.dataset.path.toLowerCase().includes(q) + || row.dataset.ips.toLowerCase().includes(q); + const detailRow = row.nextElementSibling; + row.style.display = match ? '' : 'none'; + if (!match && detailRow && detailRow.classList.contains('err-detail-row')) { + detailRow.style.display = 'none'; + row.querySelector('.btn-detail').textContent = '▼'; + if (openRow === detailRow) openRow = null; + } + if (match) visible++; + }); + searchCount.textContent = q ? `${visible} / ${allRows.length}` : ''; + } + + if (searchInput) searchInput.addEventListener('input', applyFilter); + /* ── Expand/collapse detail ── */ let openRow = null; diff --git a/scripts/deploy-app.sh b/scripts/deploy-app.sh index 3ed5a14..b6acd36 100755 --- a/scripts/deploy-app.sh +++ b/scripts/deploy-app.sh @@ -48,8 +48,8 @@ if $DRY_RUN; then exit 0 fi -ssh "$REMOTE_HOST" "sudo mkdir -p $REMOTE_DEST && sudo chown static-cdn:static-cdn $REMOTE_DEST" -rsync "${RSYNC_OPTS[@]}" "$APP_DIR/" "$REMOTE_HOST:$REMOTE_DEST/" +ssh "$REMOTE_HOST" "sudo mkdir -p $REMOTE_DEST" +rsync "${RSYNC_OPTS[@]}" --rsync-path="sudo rsync" "$APP_DIR/" "$REMOTE_HOST:$REMOTE_DEST/" ssh "$REMOTE_HOST" "sudo chown -R static-cdn:static-cdn $REMOTE_DEST" echo -e " ${GREEN}✓ Fichiers copiés${RESET}"