Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! fix: workspace schedule time displays
  • Loading branch information
greyscaled committed Jun 10, 2022
commit c70c01a12fd620def31a733c8e96ec8f2a77e442
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const WorkspaceNotRunning = Template.bind({})
WorkspaceNotRunning.args = {
now: dayjs("2022-05-17T17:40:00Z"),
initialValues: {
...defaultWorkspaceSchedule(5, "asdfasdf"),
...defaultWorkspaceSchedule(5),
timezone: "UTC",
},
workspace: {
Expand All @@ -41,7 +41,7 @@ export const WorkspaceWillNotShutDown = Template.bind({})
WorkspaceWillNotShutDown.args = {
now: dayjs("2022-05-17T17:40:00Z"),
initialValues: {
...defaultWorkspaceSchedule(5, "asdfasdf"),
...defaultWorkspaceSchedule(5),
timezone: "UTC",
ttl: 0,
},
Expand All @@ -60,7 +60,7 @@ export const WorkspaceWillShutdown = Template.bind({})
WorkspaceWillShutdown.args = {
now: dayjs("2022-05-17T17:40:00Z"),
initialValues: {
...defaultWorkspaceSchedule(5, "asdfasdf"),
...defaultWorkspaceSchedule(5),
timezone: "UTC",
},
workspace: {
Expand All @@ -76,37 +76,39 @@ WorkspaceWillShutdown.args = {

export const WorkspaceWillShutdownSoon = Template.bind({})
WorkspaceWillShutdownSoon.args = {
now: dayjs("2022-05-17T18:10:00Z"),
now: dayjs("2022-05-17T16:39:00Z"),
initialValues: {
...defaultWorkspaceSchedule(5, "asdfasdf"),
...defaultWorkspaceSchedule(2),
timezone: "UTC",
ttl: 1,
},
workspace: {
...Mocks.MockWorkspace,
latest_build: {
...Mocks.MockWorkspaceBuild,
updated_at: "2022-05-17T17:39:00Z",
deadline: "2022-05-17T18:09:00Z",
},
ttl_ms: 2 * 60 * 60 * 1000, // 2 hours = shuts off at 18:09
},
onCancel: () => action("onCancel"),
onSubmit: () => action("onSubmit"),
}

export const WorkspaceWillShutdownImmediately = Template.bind({})
WorkspaceWillShutdownImmediately.args = {
now: dayjs("2022-05-17T18:40:00Z"),
now: dayjs("2022-05-17T17:09:00Z"),
initialValues: {
...defaultWorkspaceSchedule(5, "asdfasdf"),
...defaultWorkspaceSchedule(1),
timezone: "UTC",
ttl: 1,
},
workspace: {
...Mocks.MockWorkspace,
latest_build: {
...Mocks.MockWorkspaceBuild,
updated_at: "2022-05-17T17:39:00Z",
deadline: "2022-05-17T18:09:00Z",
},
ttl_ms: 2 * 60 * 60 * 1000, // 2 hours = shuts off at 18:09
},
onCancel: () => action("onCancel"),
onSubmit: () => action("onSubmit"),
Expand Down