fix: bad syntax
This commit is contained in:
parent
723708cf8b
commit
f9c835f591
|
|
@ -97,7 +97,7 @@
|
|||
<% if (barPings.length > 0) { %>
|
||||
<% barPings.forEach(function(c) {
|
||||
const color = c.down === 0 ? 'bg-green-500/70' : (c.up === 0 ? 'bg-red-500/70' : 'bg-orange-400/70');
|
||||
const regionsJson = JSON.stringify(c.regions).replace(/&/g,'&').replace(/"/g,'"').replace(/</g,'<').replace(/>/g,'>');
|
||||
const regionsJson = JSON.stringify(c.regions).split('&').join('&').split('"').join('"').split('<').join('<').split(String.fromCharCode(62)).join('>');
|
||||
%>
|
||||
<div class="flex-1 rounded-sm <%= color %> cursor-pointer" data-run="<%= c.run_id %>" data-up="<%= c.up %>" data-down="<%= c.down %>" data-total="<%= c.total %>" data-time="<%= c.checked_at %>" data-regions="<%~ regionsJson %>"></div>
|
||||
<% }) %>
|
||||
|
|
|
|||
Loading…
Reference in New Issue