File tree 1 file changed +3
-2
lines changed
site/src/pages/WorkspaceSchedulePage 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { useMachine } from "@xstate/react"
3
3
import { AlertBanner } from "components/AlertBanner/AlertBanner"
4
4
import { ConfirmDialog } from "components/Dialogs/ConfirmDialog/ConfirmDialog"
5
5
import { Margins } from "components/Margins/Margins"
6
+ import dayjs from "dayjs"
6
7
import { scheduleToAutoStart } from "pages/WorkspaceSchedulePage/schedule"
7
8
import { ttlMsToAutoStop } from "pages/WorkspaceSchedulePage/ttl"
8
9
import React , { useEffect } from "react"
@@ -61,7 +62,7 @@ export const WorkspaceSchedulePage: React.FC = () => {
61
62
return < Navigate to = "/workspaces" />
62
63
}
63
64
64
- if ( scheduleState . hasTag ( "loading" ) ) {
65
+ if ( scheduleState . hasTag ( "loading" ) || ! template ) {
65
66
return < FullScreenLoader />
66
67
}
67
68
@@ -105,7 +106,7 @@ export const WorkspaceSchedulePage: React.FC = () => {
105
106
...getAutoStop ( workspace ) ,
106
107
} }
107
108
isLoading = { scheduleState . tags . has ( "loading" ) }
108
- defaultTTL = { template . default_ttl_ms }
109
+ defaultTTL = { dayjs . duration ( template . default_ttl_ms , "ms" ) . asHours ( ) }
109
110
onCancel = { ( ) => {
110
111
navigate ( `/@${ username } /${ workspaceName } ` )
111
112
} }
You can’t perform that action at this time.
0 commit comments