diff --git a/site/src/components/Stats/Stats.tsx b/site/src/components/Stats/Stats.tsx index 8fa17d7385a83..a54f8f3a0b260 100644 --- a/site/src/components/Stats/Stats.tsx +++ b/site/src/components/Stats/Stats.tsx @@ -1,6 +1,6 @@ import { type CSSObject, type Interpolation, type Theme } from "@emotion/react"; import Box from "@mui/material/Box"; -import { type ComponentProps, type FC } from "react"; +import { ReactNode, type ComponentProps, type FC } from "react"; export const Stats: FC> = (props) => { return ; @@ -9,7 +9,7 @@ export const Stats: FC> = (props) => { export const StatsItem: FC< { label: string; - value: string | number | JSX.Element; + value: ReactNode; } & ComponentProps > = ({ label, value, ...divProps }) => { return ( diff --git a/site/src/components/WorkspaceOutdatedTooltip/WorkspaceOutdatedTooltip.tsx b/site/src/components/WorkspaceOutdatedTooltip/WorkspaceOutdatedTooltip.tsx index 080357f3c9c7b..578924159e785 100644 --- a/site/src/components/WorkspaceOutdatedTooltip/WorkspaceOutdatedTooltip.tsx +++ b/site/src/components/WorkspaceOutdatedTooltip/WorkspaceOutdatedTooltip.tsx @@ -20,7 +20,7 @@ export const Language = { outdatedLabel: "Outdated", versionTooltipText: "This workspace version is outdated and a newer version is available.", - updateVersionLabel: "Update version", + updateVersionLabel: "Update", }; interface TooltipProps { diff --git a/site/src/pages/WorkspacePage/BuildRow.tsx b/site/src/pages/WorkspacePage/BuildRow.tsx index 693e1508dd5af..0356a87fa757e 100644 --- a/site/src/pages/WorkspacePage/BuildRow.tsx +++ b/site/src/pages/WorkspacePage/BuildRow.tsx @@ -58,7 +58,11 @@ export const BuildRow: React.FC = ({ build }) => { - + Reason: {build.reason} @@ -94,6 +98,9 @@ const styles = { buildSummary: (theme) => ({ ...(theme.typography.body1 as CSSObject), fontFamily: "inherit", + "& strong": { + fontWeight: 600, + }, }), buildInfo: (theme) => ({ diff --git a/site/src/pages/WorkspacePage/WorkspaceStats.tsx b/site/src/pages/WorkspacePage/WorkspaceStats.tsx index 861eaed5cd809..ba043b868df2d 100644 --- a/site/src/pages/WorkspacePage/WorkspaceStats.tsx +++ b/site/src/pages/WorkspacePage/WorkspaceStats.tsx @@ -4,9 +4,7 @@ import Link from "@mui/material/Link"; import { WorkspaceOutdatedTooltip } from "components/WorkspaceOutdatedTooltip/WorkspaceOutdatedTooltip"; import { type FC } from "react"; import { Link as RouterLink } from "react-router-dom"; -import { createDayString } from "utils/createDayString"; import { - getDisplayWorkspaceBuildInitiatedBy, getDisplayWorkspaceTemplateName, isWorkspaceOn, workspaceUpdatePolicy, @@ -38,12 +36,6 @@ import { Stack } from "components/Stack/Stack"; const Language = { workspaceDetails: "Workspace Details", templateLabel: "Template", - statusLabel: "Workspace Status", - versionLabel: "Version", - lastBuiltLabel: "Last built", - outdated: "Outdated", - upToDate: "Up to date", - byLabel: "Last built by", costLabel: "Daily cost", updatePolicy: "Update policy", }; @@ -72,9 +64,6 @@ export const WorkspaceStats: FC = ({ onDeadlinePlus, }) => { const theme = useTheme(); - const initiatedBy = getDisplayWorkspaceBuildInitiatedBy( - workspace.latest_build, - ); const displayTemplateName = getDisplayWorkspaceTemplateName(workspace); const deadlinePlusEnabled = maxDeadlineIncrease >= 1; const deadlineMinusEnabled = maxDeadlineDecrease >= 1; @@ -103,24 +92,12 @@ export const WorkspaceStats: FC = ({ css={styles.statsItem} label={Language.templateLabel} value={ - - {displayTemplateName} - - } - /> - +
- {workspace.latest_build.template_version_name} + {displayTemplateName} {workspace.outdated && ( @@ -131,19 +108,10 @@ export const WorkspaceStats: FC = ({ ariaLabel="update version" /> )} - - } - /> - - {upperFirst(createDayString(workspace.latest_build.created_at))}{" "} - by {initiatedBy} - +
} /> + {shouldDisplayScheduleLabel(workspace) && (