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>Requests</th>
|
||||
<th>Location</th>
|
||||
<th>Created</th>
|
||||
<th>Expires</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -96,6 +97,7 @@ tr:hover td { background: #161b22; }
|
||||
<td>{sb.serviceCount}</td>
|
||||
<td>{sb.totalRequests}</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>
|
||||
</tr>
|
||||
{/for}
|
||||
@@ -119,6 +121,10 @@ document.querySelectorAll('[data-expires]').forEach(td => {
|
||||
const days = Math.round((d - now) / 86400000);
|
||||
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>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user