Event Log Viewer

Dashboard <% logs.forEach(function(log) { %> <% }); %>
Controller Event Index Timestamp Type Granted Door Direction Data Reason
<%= log.Controller %> <%= log.EventIndex %> <% const date=new Date(log.Timestamp); const pad=n=> n.toString().padStart(2, '0'); const yyyy = date.getFullYear(); const mm = pad(date.getMonth() + 1); const dd = pad(date.getDate()); const HH = pad(date.getHours()); const MM = pad(date.getMinutes()); const ss = pad(date.getSeconds()); const tz = Intl.DateTimeFormat().resolvedOptions().timeZone; %> <%= `${yyyy}-${mm}-${dd} ${HH}:${MM}:${ss} ${tz}` %> <%= dataTypes.EventType[log.Type] %> <%= log.Granted ? "True" : "False" %> <%= log.Door %> <%= dataTypes.Direction[log.Direction] %> <%= log.CardNumber %> <%= dataTypes.EventReason[log.Reason] %>