Skip to content

Commit 947b4a0

Browse files
committed
switch to TTL (hours)
1 parent 1166924 commit 947b4a0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

site/src/components/WorkspaceStats/WorkspaceScheduleForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export const Language = {
4040
startTimeLabel: "Start time",
4141
startTimeHelperText: "Your workspace will automatically start at this time.",
4242
timezoneLabel: "Timezone",
43-
ttlLabel: "Runtime (minutes)",
44-
ttlHelperText: "Your workspace will automatically shutdown after the runtime.",
43+
ttlLabel: "TTL (hours)",
44+
ttlHelperText: "Your workspace will automatically shutdown after the TTL.",
4545
}
4646

4747
export interface WorkspaceScheduleFormProps {

site/src/pages/WorkspaceSchedulePage/WorkspaceSchedulePage.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ describe("WorkspaceSchedulePage", () => {
129129
// 2 Hours = 7.2e+12 case
130130
{
131131
...validValues,
132-
ttl: 120,
132+
ttl: 2,
133133
},
134134
{
135135
ttl: 7_200_000_000_000,
@@ -139,7 +139,7 @@ describe("WorkspaceSchedulePage", () => {
139139
// 8 hours = 2.88e+13 case
140140
{
141141
...validValues,
142-
ttl: 60 * 8,
142+
ttl: 8,
143143
},
144144
{
145145
ttl: 28_800_000_000_000,

site/src/pages/WorkspaceSchedulePage/WorkspaceSchedulePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const formValuesToAutoStartRequest = (
7777
export const formValuesToTTLRequest = (values: WorkspaceScheduleFormValues): TypesGen.UpdateWorkspaceTTLRequest => {
7878
return {
7979
// minutes to nanoseconds
80-
ttl: values.ttl ? values.ttl * 60 * 1000 * 1_000_000 : undefined,
80+
ttl: values.ttl ? values.ttl * 60 * 60 * 1000 * 1_000_000 : undefined,
8181
}
8282
}
8383

0 commit comments

Comments
 (0)