Add alarm styles

This commit is contained in:
Christopher Cookman 2025-08-31 23:28:18 -06:00
parent 0c672e717a
commit 258c99850d

View file

@ -79,6 +79,9 @@
const reasons = <% - JSON.stringify(dataTypes.EventReason) %>;
const tr = document.createElement('tr');
if (log.Type === 3) {
tr.style.background = '#f7c5c5';
}
tr.innerHTML = `
<td>${log.Controller}</td>
<td>${log.EventIndex}</td>
@ -128,7 +131,7 @@
</thead>
<tbody>
<% logs.forEach(function(log) { %>
<tr>
<tr style="<%= log.Type === 3 ? 'background:#f7c5c5;' : '' %>"></tr>
<td>
<%= log.Controller %>
</td>
@ -145,13 +148,12 @@
const ss = pad(date.getSeconds());
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
%>
%>
<%= `${yyyy}-${mm}-${dd} ${HH}:${MM}:${ss} ${tz}` %>
</td>
<td>
<%= dataTypes.EventType[log.Type] %>
</td>
<td style="<%= log.Type === 1 ? `background:${log.Granted ? '#c8f7c5' : '#f7c5c5'};` : '' %>">
<td style="<%= (log.Type === 1 || log.Type === 2) ? `background:${log.Granted ? '#c8f7c5' : '#f7c5c5'};` : '' %>">
<%= log.Granted ? "True" : "False" %>
</td>
<td>