details.eta 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <% const backIcon = `
  2. <svg class="icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
  3. <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m12 19l-7-7l7-7m7 7H5" />
  4. </svg>
  5. ` %>
  6. <% const resetIcon = `
  7. <svg class="icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
  8. <g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
  9. <path d="M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8" />
  10. <path d="M3 3v5h5" />
  11. </g>
  12. </svg>
  13. ` %>
  14. <% const currentIcon = `
  15. <svg class="icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
  16. <g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
  17. <path d="m9 10l2 2l4-4" />
  18. <rect width="20" height="14" x="2" y="3" rx="2" />
  19. <path d="M12 17v4m-4 0h8" />
  20. </g>
  21. </svg>
  22. ` %>
  23. <% const historyIcon = `
  24. <svg class="icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
  25. <g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
  26. <path d="M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8" />
  27. <path d="M3 3v5h5m4-1v5l4 2" />
  28. </g>
  29. </svg>
  30. ` %>
  31. <% const editIcon = `
  32. <svg class="icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
  33. <g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
  34. <path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" />
  35. <path d="M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" />
  36. </g>
  37. </svg>
  38. ` %>
  39. <% const deleteIcon = `
  40. <svg class="icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
  41. <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
  42. </svg>
  43. ` %>
  44. <div class="container-row">
  45. <a role="button" href="/panel/stations"><%~ backIcon %></a>
  46. <h2><%= it.meteostanica.name %></h2>
  47. </div>
  48. <% if (it.meteostanica.description) { %>
  49. <p><strong>popis:</strong> <%= it.meteostanica.description %></p>
  50. <% } %>
  51. <p><strong>vytvorená:</strong> <%= it.meteostanica.timestamp %></p>
  52. <div class="container-row">
  53. <p><strong>websocket kľúč:</strong> <%= it.meteostanica.websocketKey %></p>
  54. <a role="button" href="/panel/stations/<%= it.meteostanica.id %>/resetWebsocketKey"><%~ resetIcon %> reset</a>
  55. </div>
  56. <div class="container-row">
  57. <a role="button" class="primary" href="/panel/stations/<%= it.meteostanica.id %>/edit"><%~ editIcon %> upraviť</a>
  58. <a role="button" class="danger" href="/panel/stations/<%= it.meteostanica.id %>/delete"><%~ deleteIcon %> odstrániť</a>
  59. </div>
  60. <hr>
  61. <div class="container-row menu">
  62. <a role="button" href="/panel/stations/<%= it.meteostanica.id %>"><%~ currentIcon %> aktuálne</a>
  63. <a role="button" href="/panel/stations/<%= it.meteostanica.id %>/history"><%~ historyIcon %> história</a>
  64. </div>