Skip to content

Commit f3e5bb9

Browse files
authored
fix: convert workspace id in db2sdk.WorkspaceAppStatus (#17201)
This was causing no status to be rendered in the list, and `latest_app_status` to always be nil.
1 parent 900e125 commit f3e5bb9

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
@@ -4,6 +4,7 @@ import AppsIcon from "@mui/icons-material/Apps";
44
import CheckCircle from "@mui/icons-material/CheckCircle";
55
import ErrorIcon from "@mui/icons-material/Error";
66
import HelpOutline from "@mui/icons-material/HelpOutline";
7+
import HourglassEmpty from "@mui/icons-material/HourglassEmpty";
78
import InsertDriveFile from "@mui/icons-material/InsertDriveFile";
89
import OpenInNew from "@mui/icons-material/OpenInNew";
910
import Warning from "@mui/icons-material/Warning";
@@ -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