3 const toDateString
= (ts
) => ts
? new Date(ts
* 1000).toISOString() : 'never';
5 module
.exports
= (ctx
, links
, pageTitle
) => {
6 return `<!DOCTYPE html>
10 <title>${pageTitle} - Link Report</title>
11 <link rel="stylesheet" href="../../static/theme.css">
21 <th scope="col">id</th>
22 <th scope="col">url</th>
23 <th scope="col">accesses</th>
24 <th scope="col">created</th>
25 <th scope="col">expires</th>
26 <th scope="col">last access</th>
32 <th scope="row"><a href="/${l.id}/info">${l.id}</a></th>
34 <td>${l.accesses}</td>
35 <td>${toDateString(l.created)}</td>
36 <td>${toDateString(l.expires)}</td>
37 <td>${toDateString(l.lastAccess)}</td>
38 </tr>`).join('\n') + `