Report uptime from the agents, and stop the Integrations page overflowing a phone
Linux agent 8 and Windows agent 7 say how long the machine has been up; the server stores it (migration 0086) and shows it as Up for in the status strip (left out while offline) and Uptime on the server page. The Integrations header wraps and its button no longer squeezes, and .table-responsive is positioned so hidden text in scrolled-off columns cannot widen the page. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d88a24b33a
commit
41fbbf3467
18 files changed
+9161
-10
No files matched your search
@@ -241,7 +241,7 @@ function IntegrationsList({ user, tabs }: { user: CurrentUser; tabs: ReactNode }
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="d-flex align-items-center mb-3">
|
||||
<div className="d-flex flex-wrap align-items-center gap-2 mb-3">
|
||||
<div>
|
||||
<h2 className="page-title mb-0">Integrations</h2>
|
||||
<div className="text-secondary small mt-1">
|
||||
@@ -249,7 +249,7 @@ function IntegrationsList({ user, tabs }: { user: CurrentUser; tabs: ReactNode }
|
||||
</div>
|
||||
</div>
|
||||
{isAdmin && !adding && !editingIntegration && (
|
||||
<button className="btn btn-primary ms-auto" onClick={() => setAdding(true)}>
|
||||
<button className="btn btn-primary ms-auto flex-shrink-0 text-nowrap" onClick={() => setAdding(true)}>
|
||||
Add integration
|
||||
</button>
|
||||
)}
|
||||
|
||||
@@ -220,6 +220,11 @@ html[data-env] .navbar-vertical {
|
||||
vertical-align: 0.1em;
|
||||
}
|
||||
|
||||
/* A table wider than its box scrolls inside it; its hidden-for-the-eye text (position: absolute) has to stay inside that box too, or it widens the whole page from a column that is scrolled out of sight. */
|
||||
.table-responsive {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* ── On a phone, wide tables become a stack of cards: each row a card, each cell labelled with its column (data-label is set by useStackedTables). ── */
|
||||
@media (max-width: 767.98px) {
|
||||
.card > .table-responsive {
|
||||
|
||||
@@ -134,6 +134,8 @@ export function serverStrip(i: StripInput): StripTile[] {
|
||||
tiles.push({ id: "load", label: "CPU · memory", value: [cpu !== null ? `${Math.round(cpu)}%` : "—", mem !== null ? `${mem}%` : "—"].join(" · "), sub: null, tone: busy ? "warn" : "muted" });
|
||||
}
|
||||
|
||||
if (typeof hardware.uptime === "number" && hardware.uptime > 0) tiles.push({ id: "uptime", label: "Up for", value: uptimeText(hardware.uptime), sub: null, tone: "muted" });
|
||||
// How long it had been up when it last reported; once it has stopped reporting that is no longer how long it has been up, so it is left out.
|
||||
const offline = tiles[0]?.id === "status" && tiles[0].value === "Offline";
|
||||
if (!offline && typeof hardware.uptime === "number" && hardware.uptime > 0) tiles.push({ id: "uptime", label: "Up for", value: uptimeText(hardware.uptime), sub: null, tone: "muted" });
|
||||
return tiles;
|
||||
}
|
||||
Reference in new issue
Block a user