feat(admin-ui): add Created column to sandbox list
createdAt was already in AdminSandboxSummary — now visible in the table, formatted as YYYY-MM-DD via JS (same pattern as expiresAt). Co-Authored-By: Mira Rehfeld <noreply@anthropic.com>
This commit is contained in:
@@ -83,6 +83,7 @@ tr:hover td { background: #161b22; }
|
|||||||
<th>Services</th>
|
<th>Services</th>
|
||||||
<th>Requests</th>
|
<th>Requests</th>
|
||||||
<th>Location</th>
|
<th>Location</th>
|
||||||
|
<th>Created</th>
|
||||||
<th>Expires</th>
|
<th>Expires</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -96,6 +97,7 @@ tr:hover td { background: #161b22; }
|
|||||||
<td>{sb.serviceCount}</td>
|
<td>{sb.serviceCount}</td>
|
||||||
<td>{sb.totalRequests}</td>
|
<td>{sb.totalRequests}</td>
|
||||||
<td>{#if sb.location != null}{sb.location}{#else}<span style="color:#484f58">—</span>{/if}</td>
|
<td>{#if sb.location != null}{sb.location}{#else}<span style="color:#484f58">—</span>{/if}</td>
|
||||||
|
<td data-created="{sb.createdAt}" style="color:#8b949e">{sb.createdAt}</td>
|
||||||
<td class="{#if sb.expired}expired{#else}ok{/if}" data-expires="{sb.expiresAt}">{sb.expiresAt}</td>
|
<td class="{#if sb.expired}expired{#else}ok{/if}" data-expires="{sb.expiresAt}">{sb.expiresAt}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/for}
|
{/for}
|
||||||
@@ -119,6 +121,10 @@ document.querySelectorAll('[data-expires]').forEach(td => {
|
|||||||
const days = Math.round((d - now) / 86400000);
|
const days = Math.round((d - now) / 86400000);
|
||||||
td.textContent = days < 0 ? ('expired ' + (-days) + 'd ago') : ('in ' + days + 'd');
|
td.textContent = days < 0 ? ('expired ' + (-days) + 'd ago') : ('in ' + days + 'd');
|
||||||
});
|
});
|
||||||
|
document.querySelectorAll('[data-created]').forEach(td => {
|
||||||
|
const d = new Date(td.dataset.created);
|
||||||
|
td.textContent = d.toISOString().slice(0, 10);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user