(entry)
| 155 | } |
| 156 | |
| 157 | function appendLogEntry(entry) { |
| 158 | const row = document.createElement("div"); |
| 159 | row.className = "log-entry"; |
| 160 | |
| 161 | const time = document.createElement("span"); |
| 162 | time.className = "log-time"; |
| 163 | time.textContent = formatTimestamp(entry.timestamp); |
| 164 | |
| 165 | const msg = document.createElement("span"); |
| 166 | msg.className = `log-msg log-${entry.level || "info"}`; |
| 167 | msg.textContent = entry.message; |
| 168 | |
| 169 | row.appendChild(time); |
| 170 | row.appendChild(msg); |
| 171 | logViewerBody.appendChild(row); |
| 172 | |
| 173 | // Auto-scroll to bottom |
| 174 | logViewerBody.scrollTop = logViewerBody.scrollHeight; |
| 175 | } |
| 176 | |
| 177 | async function pollJob() { |
| 178 | if (!activeJobId) return; |
no test coverage detected