From 0048fc629110691aeb9b47353b87ee12fe633c72 Mon Sep 17 00:00:00 2001 From: Splunk Git Pusher Date: Sun, 1 Feb 2026 14:12:41 +0100 Subject: [PATCH] Fix Reset boutton Pushed by: admin License: 1CFBBDCA-31F (Starter) Timestamp: 2026-02-01T14:12:40.997957 --- .../appserver/static/git_pusher.js | 28 +++++++++++++++++-- apps/pusher_app_prem/local/usage_stats.json | 2 +- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/apps/pusher_app_prem/appserver/static/git_pusher.js b/apps/pusher_app_prem/appserver/static/git_pusher.js index 977b7fef..951f20e1 100755 --- a/apps/pusher_app_prem/appserver/static/git_pusher.js +++ b/apps/pusher_app_prem/appserver/static/git_pusher.js @@ -519,6 +519,7 @@ window.GitPusher = { // ============================================ (function attachButtonEvents() { function tryAttach() { + // Bouton Deploy to Git var pushBtn = document.getElementById('push-btn'); if (pushBtn) { pushBtn.addEventListener('click', function(e) { @@ -527,8 +528,31 @@ window.GitPusher = { pushDashboards(); }); console.log("✓ Push button event attached"); - } else { - // Réessayer dans 500ms + } + + // Bouton Reset - chercher par le texte ou la classe + var resetBtn = document.querySelector('button.btn-secondary'); + if (!resetBtn) { + // Chercher par le contenu + var allButtons = document.querySelectorAll('button.btn'); + allButtons.forEach(function(btn) { + if (btn.textContent.includes('Reset') || btn.textContent.includes('🔄')) { + resetBtn = btn; + } + }); + } + + if (resetBtn) { + resetBtn.addEventListener('click', function(e) { + e.preventDefault(); + console.log("Reset button clicked"); + resetForm(true); + }); + console.log("✓ Reset button event attached"); + } + + // Si les boutons ne sont pas encore là, réessayer + if (!pushBtn || !resetBtn) { setTimeout(tryAttach, 500); } } diff --git a/apps/pusher_app_prem/local/usage_stats.json b/apps/pusher_app_prem/local/usage_stats.json index 5eeeb672..b14a229a 100644 --- a/apps/pusher_app_prem/local/usage_stats.json +++ b/apps/pusher_app_prem/local/usage_stats.json @@ -1 +1 @@ -{"pushes_today": 2, "pushes_total": 11, "last_push_date": "2026-02-01", "apps_pushed": []} \ No newline at end of file +{"pushes_today": 3, "pushes_total": 12, "last_push_date": "2026-02-01", "apps_pushed": []} \ No newline at end of file