Add alarm styles
This commit is contained in:
parent
0c672e717a
commit
258c99850d
|
@ -79,6 +79,9 @@
|
||||||
const reasons = <% - JSON.stringify(dataTypes.EventReason) %>;
|
const reasons = <% - JSON.stringify(dataTypes.EventReason) %>;
|
||||||
|
|
||||||
const tr = document.createElement('tr');
|
const tr = document.createElement('tr');
|
||||||
|
if (log.Type === 3) {
|
||||||
|
tr.style.background = '#f7c5c5';
|
||||||
|
}
|
||||||
tr.innerHTML = `
|
tr.innerHTML = `
|
||||||
<td>${log.Controller}</td>
|
<td>${log.Controller}</td>
|
||||||
<td>${log.EventIndex}</td>
|
<td>${log.EventIndex}</td>
|
||||||
|
@ -128,7 +131,7 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% logs.forEach(function(log) { %>
|
<% logs.forEach(function(log) { %>
|
||||||
<tr>
|
<tr style="<%= log.Type === 3 ? 'background:#f7c5c5;' : '' %>"></tr>
|
||||||
<td>
|
<td>
|
||||||
<%= log.Controller %>
|
<%= log.Controller %>
|
||||||
</td>
|
</td>
|
||||||
|
@ -145,13 +148,12 @@
|
||||||
const ss = pad(date.getSeconds());
|
const ss = pad(date.getSeconds());
|
||||||
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||||
%>
|
%>
|
||||||
%>
|
|
||||||
<%= `${yyyy}-${mm}-${dd} ${HH}:${MM}:${ss} ${tz}` %>
|
<%= `${yyyy}-${mm}-${dd} ${HH}:${MM}:${ss} ${tz}` %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%= dataTypes.EventType[log.Type] %>
|
<%= dataTypes.EventType[log.Type] %>
|
||||||
</td>
|
</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" %>
|
<%= log.Granted ? "True" : "False" %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
Loading…
Reference in a new issue