Skip to content

Commit 63a2fb2

Browse files
committed
fix: convert workspace id in db2sdk.WorkspaceAppStatus
This was causing no status to be rendered in the list, and `latest_app_status` to always be nil.
1 parent 583a0c6 commit 63a2fb2

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

coderd/database/db2sdk/db2sdk.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ func WorkspaceAppStatus(status database.WorkspaceAppStatus) codersdk.WorkspaceAp
539539
return codersdk.WorkspaceAppStatus{
540540
ID: status.ID,
541541
CreatedAt: status.CreatedAt,
542+
WorkspaceID: status.WorkspaceID,
542543
AgentID: status.AgentID,
543544
AppID: status.AppID,
544545
NeedsUserAttention: status.NeedsUserAttention,

site/src/pages/WorkspacePage/AppStatuses.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import HelpOutline from "@mui/icons-material/HelpOutline";
77
import InsertDriveFile from "@mui/icons-material/InsertDriveFile";
88
import OpenInNew from "@mui/icons-material/OpenInNew";
99
import Warning from "@mui/icons-material/Warning";
10+
import HourglassEmpty from "@mui/icons-material/HourglassEmpty";
1011
import CircularProgress from "@mui/material/CircularProgress";
1112
import Link from "@mui/material/Link";
1213
import Tooltip from "@mui/material/Tooltip";
@@ -18,7 +19,6 @@ import type {
1819
} from "api/typesGenerated";
1920
import { useProxy } from "contexts/ProxyContext";
2021
import { formatDistance, formatDistanceToNow } from "date-fns";
21-
import { DividerWithText } from "pages/DeploymentSettingsPage/LicensesSettingsPage/DividerWithText";
2222
import type { FC } from "react";
2323
import { createAppLinkHref } from "utils/apps";
2424

@@ -54,7 +54,12 @@ const getStatusIcon = (
5454
case "failure":
5555
return <ErrorIcon sx={{ color, fontSize: 18 }} />;
5656
case "working":
57-
return <CircularProgress size={18} sx={{ color }} />;
57+
// Use Hourglass for past "working" states, spinner for the current one
58+
return isLatest ? (
59+
<CircularProgress size={18} sx={{ color }} />
60+
) : (
61+
<HourglassEmpty sx={{ color, fontSize: 18 }} />
62+
);
5863
default:
5964
return <Warning sx={{ color, fontSize: 18 }} />;
6065
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy