mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
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.
This commit is contained in:
@ -539,6 +539,7 @@ func WorkspaceAppStatus(status database.WorkspaceAppStatus) codersdk.WorkspaceAp
|
|||||||
return codersdk.WorkspaceAppStatus{
|
return codersdk.WorkspaceAppStatus{
|
||||||
ID: status.ID,
|
ID: status.ID,
|
||||||
CreatedAt: status.CreatedAt,
|
CreatedAt: status.CreatedAt,
|
||||||
|
WorkspaceID: status.WorkspaceID,
|
||||||
AgentID: status.AgentID,
|
AgentID: status.AgentID,
|
||||||
AppID: status.AppID,
|
AppID: status.AppID,
|
||||||
NeedsUserAttention: status.NeedsUserAttention,
|
NeedsUserAttention: status.NeedsUserAttention,
|
||||||
|
@ -4,6 +4,7 @@ import AppsIcon from "@mui/icons-material/Apps";
|
|||||||
import CheckCircle from "@mui/icons-material/CheckCircle";
|
import CheckCircle from "@mui/icons-material/CheckCircle";
|
||||||
import ErrorIcon from "@mui/icons-material/Error";
|
import ErrorIcon from "@mui/icons-material/Error";
|
||||||
import HelpOutline from "@mui/icons-material/HelpOutline";
|
import HelpOutline from "@mui/icons-material/HelpOutline";
|
||||||
|
import HourglassEmpty from "@mui/icons-material/HourglassEmpty";
|
||||||
import InsertDriveFile from "@mui/icons-material/InsertDriveFile";
|
import InsertDriveFile from "@mui/icons-material/InsertDriveFile";
|
||||||
import OpenInNew from "@mui/icons-material/OpenInNew";
|
import OpenInNew from "@mui/icons-material/OpenInNew";
|
||||||
import Warning from "@mui/icons-material/Warning";
|
import Warning from "@mui/icons-material/Warning";
|
||||||
@ -18,7 +19,6 @@ import type {
|
|||||||
} from "api/typesGenerated";
|
} from "api/typesGenerated";
|
||||||
import { useProxy } from "contexts/ProxyContext";
|
import { useProxy } from "contexts/ProxyContext";
|
||||||
import { formatDistance, formatDistanceToNow } from "date-fns";
|
import { formatDistance, formatDistanceToNow } from "date-fns";
|
||||||
import { DividerWithText } from "pages/DeploymentSettingsPage/LicensesSettingsPage/DividerWithText";
|
|
||||||
import type { FC } from "react";
|
import type { FC } from "react";
|
||||||
import { createAppLinkHref } from "utils/apps";
|
import { createAppLinkHref } from "utils/apps";
|
||||||
|
|
||||||
@ -54,7 +54,12 @@ const getStatusIcon = (
|
|||||||
case "failure":
|
case "failure":
|
||||||
return <ErrorIcon sx={{ color, fontSize: 18 }} />;
|
return <ErrorIcon sx={{ color, fontSize: 18 }} />;
|
||||||
case "working":
|
case "working":
|
||||||
return <CircularProgress size={18} sx={{ color }} />;
|
// Use Hourglass for past "working" states, spinner for the current one
|
||||||
|
return isLatest ? (
|
||||||
|
<CircularProgress size={18} sx={{ color }} />
|
||||||
|
) : (
|
||||||
|
<HourglassEmpty sx={{ color, fontSize: 18 }} />
|
||||||
|
);
|
||||||
default:
|
default:
|
||||||
return <Warning sx={{ color, fontSize: 18 }} />;
|
return <Warning sx={{ color, fontSize: 18 }} />;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user