Fix(status-monitor): Correction des guillemets dans le JavaScript - Resout SyntaxError loading
- Remplace class=\" par class=' dans les strings JS - Corrigé onclick et title attributs pour éviter les erreurs de syntaxe - La ligne 277 (style=) également corrigée Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
+10
-10
@@ -261,20 +261,20 @@ def generate_html():
|
||||
const bc = getClass(s);
|
||||
const pi = c.url ? c.host + ":" + c.port + c.url : c.host + ":" + c.port;
|
||||
|
||||
h += "<div class=\"card " + bc + "\">";
|
||||
h += "<button class=\"refresh-btn\" onclick=\"refreshService('" + id + "')\" title=\"Refresh\">🔄</button>";
|
||||
h += "<div class=\"header\"><div class=\"name\">" + c.name + "</div><span class=\"type\">" + c.type + "</span></div>";
|
||||
h += "<span class=\"badge " + bc + "\">" + s.replace(/_/g, " ") + "</span>";
|
||||
h += "<div class=\"details\">" + pi + "</div>";
|
||||
if (r.error) h += "<div class=\"error\">" + r.error + "</div>";
|
||||
if (r.status_code) h += "<div class=\"details\">Status: " + r.status_code + "</div>";
|
||||
h += "<div class=\"details\">Checked: " + new Date(v.time).toLocaleTimeString() + "</div>";
|
||||
h += "<div class='card ' + bc + '>";
|
||||
h += "<button class='refresh-btn' onclick="refreshService('" + id + "')" title="Refresh">🔄</button>";
|
||||
h += "<div class='header'><div class='name'>" + c.name + "</div><span class='type'>" + c.type + "</span></div>";
|
||||
h += "<span class='badge " + bc + "'>" + s.replace(/_/g, " ") + "</span>";
|
||||
h += "<div class='details'>" + pi + "</div>";
|
||||
if (r.error) h += "<div class='error'>" + r.error + "</div>";
|
||||
if (r.status_code) h += "<div class='details'>Status: " + r.status_code + "</div>";
|
||||
h += "<div class='details'>Checked: " + new Date(v.time).toLocaleTimeString() + "</div>";
|
||||
const hist = fmtHist(id);
|
||||
if (hist) h += "<div class=\"history-note\">" + hist + "</div>";
|
||||
if (hist) h += "<div class='history-note'>" + hist + "</div>";
|
||||
h += "</div>";
|
||||
}
|
||||
|
||||
document.getElementById("grid").innerHTML = h || "<p style=\"color:#64748b;text-align:center;\">No services to display</p>";
|
||||
document.getElementById("grid").innerHTML = h || "<p style='color:#64748b;text-align:center;'>No services to display</p>";
|
||||
document.getElementById("total").textContent = t;
|
||||
document.getElementById("ok").textContent = ok;
|
||||
document.getElementById("ko").textContent = ko;
|
||||
|
||||
Reference in New Issue
Block a user