Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 36 additions & 20 deletions app/src/web/pages/Backups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Archive({ archive, onRestore }: { archive: BackupSummary; onRestore: ()
<td className="mono-sm whitespace-nowrap">{bytes(archive.bytes)}</td>
<td className="whitespace-nowrap">
{archive.bytes !== undefined && (
<span className="flex items-center gap-2">
<span className="flex items-center justify-end gap-2">
<MuiLink className="mono-sm" href={`/api/backups/${archive.project}/${archive.stamp}.tar`} underline="always">
download
</MuiLink>
Expand Down Expand Up @@ -117,24 +117,33 @@ export function Backups() {
{data.requests.length > 0 && (
<section className="stat-card space-y-2">
<h2 className="mono-sm text-muted">Recent requests</h2>
<table className="data-table">
<tbody>
{data.requests.map((entry) => (
<tr key={entry.id}>
<td className="whitespace-nowrap">
<TagChip color={requestColors[entry.state]} label={entry.state} />
</td>
<td className="mono-sm whitespace-nowrap">
{entry.action} {entry.project}
{entry.archive && <span className="text-faint"> {entry.archive}</span>}
</td>
<td className="mono-sm text-muted">{entry.by}</td>
<td className="mono-sm break-all text-muted">{entry.output}</td>
<td className="mono-sm whitespace-nowrap text-faint">{entry.at && timeAgo(entry.at)}</td>
</tr>
))}
</tbody>
</table>
<div className="overflow-x-auto">
<table className="data-table min-w-180 table-fixed">
<colgroup>
<col className="w-[12%]" />
<col className="w-[28%]" />
<col className="w-[14%]" />
<col className="w-[32%]" />
<col className="w-[14%]" />
</colgroup>
<tbody>
{data.requests.map((entry) => (
<tr key={entry.id}>
<td className="whitespace-nowrap">
<TagChip color={requestColors[entry.state]} label={entry.state} />
</td>
<td className="mono-sm truncate">
{entry.action} {entry.project}
{entry.archive && <span className="text-faint"> {entry.archive}</span>}
</td>
<td className="mono-sm truncate text-muted">{entry.by}</td>
<td className="mono-sm break-all text-muted">{entry.output}</td>
<td className="mono-sm whitespace-nowrap text-right text-faint">{entry.at && timeAgo(entry.at)}</td>
</tr>
))}
</tbody>
</table>
</div>
</section>
)}
{data.projects.map(({ project, archives }) => (
Expand All @@ -146,7 +155,14 @@ export function Backups() {
</Button>
</header>
<div className="overflow-x-auto">
<table className="data-table">
<table className="data-table min-w-180 table-fixed">
<colgroup>
<col className="w-[26%]" />
<col className="w-[14%]" />
<col className="w-[30%]" />
<col className="w-[10%]" />
<col className="w-[20%]" />
</colgroup>
<thead>
<tr>
<th>taken</th>
Expand Down
15 changes: 15 additions & 0 deletions app/src/web/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
@import '@xterm/xterm/css/xterm.css';
@source '../../node_modules/@project-graphite/ui/dist';

@layer base {
html,
.overflow-auto,
.overflow-y-auto,
.overflow-scroll,
.overflow-y-scroll,
.log-frame {
scrollbar-gutter: stable;
}

body {
padding-right: 0 !important;
}
}

@layer components {
.stat-card {
@apply rounded-xl border border-line bg-surface p-4;
Expand Down
Loading