Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 50e8a27

Browse files
authored
fix: removing noisy shutdown snapshots (coder#2899)
* fix: removing noisy shutdown snapshots resolves coder#2685 * removing workspaceSchedule stories
1 parent 74d484e commit 50e8a27

File tree

3 files changed

+2
-98
lines changed

3 files changed

+2
-98
lines changed

site/src/components/WorkspaceSchedule/WorkspaceSchedule.stories.tsx

-47
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ import { WorkspaceSchedule, WorkspaceScheduleProps } from "./WorkspaceSchedule"
66

77
dayjs.extend(utc)
88

9-
// REMARK: There's a known problem with storybook and using date libraries that
10-
// call string.toLowerCase
11-
// SEE: https:github.com/storybookjs/storybook/issues/12208#issuecomment-697044557
12-
const ONE = 1
13-
const SEVEN = 7
14-
const THIRTY = 30
15-
169
export default {
1710
title: "components/WorkspaceSchedule",
1811
component: WorkspaceSchedule,
@@ -53,46 +46,6 @@ NoTTL.args = {
5346
},
5447
}
5548

56-
export const ShutdownRealSoon = Template.bind({})
57-
ShutdownRealSoon.args = {
58-
workspace: {
59-
...Mocks.MockWorkspace,
60-
latest_build: {
61-
...Mocks.MockWorkspaceBuild,
62-
deadline: dayjs().add(THIRTY, "minute").utc().format(),
63-
transition: "start",
64-
},
65-
ttl_ms: 2 * 60 * 60 * 1000, // 2 hours
66-
},
67-
}
68-
69-
export const ShutdownSoon = Template.bind({})
70-
ShutdownSoon.args = {
71-
workspace: {
72-
...Mocks.MockWorkspace,
73-
latest_build: {
74-
...Mocks.MockWorkspaceBuild,
75-
deadline: dayjs().add(ONE, "hour").utc().format(),
76-
transition: "start",
77-
},
78-
ttl_ms: 2 * 60 * 60 * 1000, // 2 hours
79-
},
80-
}
81-
82-
export const ShutdownLong = Template.bind({})
83-
ShutdownLong.args = {
84-
workspace: {
85-
...Mocks.MockWorkspace,
86-
87-
latest_build: {
88-
...Mocks.MockWorkspaceBuild,
89-
deadline: dayjs().add(SEVEN, "days").utc().format(),
90-
transition: "start",
91-
},
92-
ttl_ms: 7 * 24 * 60 * 60 * 1000, // 7 days
93-
},
94-
}
95-
9649
export const WorkspaceOffShort = Template.bind({})
9750
WorkspaceOffShort.args = {
9851
workspace: {

site/src/components/WorkspaceSchedule/WorkspaceSchedule.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,14 @@ export const WorkspaceSchedule: FC<WorkspaceScheduleProps> = ({
5454
</div>
5555
<div>
5656
<span className={styles.scheduleLabel}>{ScheduleLanguage.autoStartLabel}</span>
57-
<span className={[styles.scheduleValue, "chromatic-ignore"].join(" ")}>
57+
<span className={styles.scheduleValue}>
5858
{autoStartDisplay(workspace.autostart_schedule)}
5959
</span>
6060
</div>
6161
<div>
6262
<span className={styles.scheduleLabel}>{ScheduleLanguage.autoStopLabel}</span>
6363
<Stack direction="row">
64-
<span className={[styles.scheduleValue, "chromatic-ignore"].join(" ")}>
65-
{autoStopDisplay(workspace)}
66-
</span>
64+
<span className={styles.scheduleValue}>{autoStopDisplay(workspace)}</span>
6765
</Stack>
6866
</div>
6967
{canUpdateWorkspace && (

site/src/components/WorkspaceScheduleButton/WorkspaceScheduleButton.stories.tsx

-47
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ import { WorkspaceScheduleButton, WorkspaceScheduleButtonProps } from "./Workspa
66

77
dayjs.extend(utc)
88

9-
// REMARK: There's a known problem with storybook and using date libraries that
10-
// call string.toLowerCase
11-
// SEE: https:github.com/storybookjs/storybook/issues/12208#issuecomment-697044557
12-
const ONE = 1
13-
const SEVEN = 7
14-
const THIRTY = 30
15-
169
export default {
1710
title: "components/WorkspaceScheduleButton",
1811
component: WorkspaceScheduleButton,
@@ -55,46 +48,6 @@ NoTTL.args = {
5548
},
5649
}
5750

58-
export const ShutdownRealSoon = Template.bind({})
59-
ShutdownRealSoon.args = {
60-
workspace: {
61-
...Mocks.MockWorkspace,
62-
latest_build: {
63-
...Mocks.MockWorkspaceBuild,
64-
deadline: dayjs().add(THIRTY, "minute").utc().format(),
65-
transition: "start",
66-
},
67-
ttl_ms: 2 * 60 * 60 * 1000, // 2 hours
68-
},
69-
}
70-
71-
export const ShutdownSoon = Template.bind({})
72-
ShutdownSoon.args = {
73-
workspace: {
74-
...Mocks.MockWorkspace,
75-
latest_build: {
76-
...Mocks.MockWorkspaceBuild,
77-
deadline: dayjs().add(ONE, "hour").utc().format(),
78-
transition: "start",
79-
},
80-
ttl_ms: 2 * 60 * 60 * 1000, // 2 hours
81-
},
82-
}
83-
84-
export const ShutdownLong = Template.bind({})
85-
ShutdownLong.args = {
86-
workspace: {
87-
...Mocks.MockWorkspace,
88-
89-
latest_build: {
90-
...Mocks.MockWorkspaceBuild,
91-
deadline: dayjs().add(SEVEN, "days").utc().format(),
92-
transition: "start",
93-
},
94-
ttl_ms: 7 * 24 * 60 * 60 * 1000, // 7 days
95-
},
96-
}
97-
9851
export const WorkspaceOffShort = Template.bind({})
9952
WorkspaceOffShort.args = {
10053
workspace: {

0 commit comments

Comments
 (0)