Skip to content

Commit 716df4b

Browse files
committed
chore: rename to total stage duration
1 parent 433a361 commit 716df4b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

site/src/modules/workspaces/WorkspaceTiming/ResourcesChart.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,12 @@ export const ResourcesChart: FC<ResourcesChartProps> = ({
8989
<YAxisSection>
9090
<YAxisHeader>{stage.name} stage</YAxisHeader>
9191
<YAxisLabels>
92-
{visibleTimings.map((t) => (
93-
<YAxisLabel key={t.name} id={encodeURIComponent(t.name)}>
94-
{t.name}
92+
{visibleTimings.map((t) => {
93+
const label = isStageBoundary(t.name) ? "total stage duration" : t.name
94+
return <YAxisLabel key={label} id={encodeURIComponent(t.name)}>
95+
{label}
9596
</YAxisLabel>
96-
))}
97+
})}
9798
</YAxisLabels>
9899
</YAxisSection>
99100
</YAxis>
@@ -104,6 +105,7 @@ export const ResourcesChart: FC<ResourcesChartProps> = ({
104105
const stageBoundary = isStageBoundary(t.name);
105106
const duration = calcDuration(t.range);
106107
const legend = legendsByAction[t.action] ?? { label: t.action };
108+
const label = stageBoundary ? "total stage duration" : t.name
107109

108110
return (
109111
<XAxisRow
@@ -113,7 +115,7 @@ export const ResourcesChart: FC<ResourcesChartProps> = ({
113115
<Tooltip
114116
title={
115117
<>
116-
<TooltipTitle>{t.name}</TooltipTitle>
118+
<TooltipTitle>{label}</TooltipTitle>
117119
{/* Stage boundaries should not have these links */}
118120
{!stageBoundary && (
119121
<TooltipLink to="">view template</TooltipLink>

0 commit comments

Comments
 (0)