logs.ejs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!doctype html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title><%= title %></title>
  7. <link rel="stylesheet" href="/styles.css">
  8. </head>
  9. <body>
  10. <%- include('partials/nav') %>
  11. <main>
  12. <section class="hero tile-light compact page-intro logs-intro">
  13. <p class="eyebrow">History</p>
  14. <h1>开关记录</h1>
  15. <p class="lead">显示最近 200 条记录,系统自动保留 60 天。</p>
  16. </section>
  17. <section class="tile-parchment compact logs-section">
  18. <div class="utility-card wide log-table-card">
  19. <div class="table-wrap table-scroll">
  20. <table>
  21. <thead><tr><th>时间</th><th>来源</th><th>动作</th><th>目标</th><th>结果</th><th>说明</th><th>Topic</th></tr></thead>
  22. <tbody>
  23. <% logs.forEach((log) => { %>
  24. <tr>
  25. <td><%= dayjs(log.created_at).format('YYYY-MM-DD HH:mm:ss') %></td>
  26. <td><%= log.source %></td>
  27. <td><%= actionLabel(log.action) %></td>
  28. <td><%= targetLabel(log.target_channel) %></td>
  29. <td><%= log.result %></td>
  30. <td><%= log.message || '' %></td>
  31. <td><%= log.topic || '' %></td>
  32. </tr>
  33. <% }) %>
  34. </tbody>
  35. </table>
  36. </div>
  37. </div>
  38. </section>
  39. </main>
  40. </body>
  41. </html>