fix: bad syntax
This commit is contained in:
parent
4149a4753e
commit
723708cf8b
|
|
@ -97,8 +97,9 @@
|
||||||
<% if (barPings.length > 0) { %>
|
<% if (barPings.length > 0) { %>
|
||||||
<% barPings.forEach(function(c) {
|
<% 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 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,'>');
|
||||||
%>
|
%>
|
||||||
<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="<%- JSON.stringify(c.regions).replace(/"/g, '"') %>"></div>
|
<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>
|
||||||
<% }) %>
|
<% }) %>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<div class="flex-1 bg-gray-800/50 text-center text-xs text-gray-600 leading-8 rounded-lg">No data</div>
|
<div class="flex-1 bg-gray-800/50 text-center text-xs text-gray-600 leading-8 rounded-lg">No data</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue