Event Log Viewer

<% logs.forEach(function(log) { %> <% }); %>
Controller Event Index Timestamp Type Granted Door Direction Card Number 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}` %> <%= log.Type %> <%= log.Granted %> <%= log.Door %> <%= log.Direction %> <%= log.CardNumber %> <%= log.Reason %>