chore: rename template restart requirement to autostop requirement (#9295)

This commit is contained in:
Dean Sheather
2023-08-29 18:35:05 +00:00
committed by GitHub
parent fc4683d8b3
commit a572800d47
40 changed files with 925 additions and 891 deletions
+13 -13
View File
@@ -195,7 +195,7 @@ export interface CreateTemplateRequest {
readonly template_version_id: string
readonly default_ttl_ms?: number
readonly max_ttl_ms?: number
readonly restart_requirement?: TemplateRestartRequirement
readonly autostop_requirement?: TemplateAutostopRequirement
readonly allow_user_cancel_workspace_jobs?: boolean
readonly allow_user_autostart?: boolean
readonly allow_user_autostop?: boolean
@@ -910,7 +910,7 @@ export interface Template {
readonly icon: string
readonly default_ttl_ms: number
readonly max_ttl_ms: number
readonly restart_requirement: TemplateRestartRequirement
readonly autostop_requirement: TemplateAutostopRequirement
readonly created_by_id: string
readonly created_by_name: string
readonly allow_user_autostart: boolean
@@ -937,6 +937,12 @@ export interface TemplateAppUsage {
readonly seconds: number
}
// From codersdk/templates.go
export interface TemplateAutostopRequirement {
readonly days_of_week: string[]
readonly weeks: number
}
// From codersdk/templates.go
export type TemplateBuildTimeStats = Record<
WorkspaceTransition,
@@ -1009,12 +1015,6 @@ export interface TemplateParameterValue {
readonly count: number
}
// From codersdk/templates.go
export interface TemplateRestartRequirement {
readonly days_of_week: string[]
readonly weeks: number
}
// From codersdk/templates.go
export interface TemplateUser extends User {
readonly role: TemplateRole
@@ -1147,7 +1147,7 @@ export interface UpdateTemplateMeta {
readonly icon?: string
readonly default_ttl_ms?: number
readonly max_ttl_ms?: number
readonly restart_requirement?: TemplateRestartRequirement
readonly autostop_requirement?: TemplateAutostopRequirement
readonly allow_user_autostart?: boolean
readonly allow_user_autostop?: boolean
readonly allow_user_cancel_workspace_jobs?: boolean
@@ -1603,7 +1603,7 @@ export type Experiment =
| "moons"
| "single_tailnet"
| "tailnet_pg_coordinator"
| "template_restart_requirement"
| "template_autostop_requirement"
| "workspace_actions"
| "workspaces_batch_actions"
export const Experiments: Experiment[] = [
@@ -1611,7 +1611,7 @@ export const Experiments: Experiment[] = [
"moons",
"single_tailnet",
"tailnet_pg_coordinator",
"template_restart_requirement",
"template_autostop_requirement",
"workspace_actions",
"workspaces_batch_actions",
]
@@ -1626,8 +1626,8 @@ export type FeatureName =
| "high_availability"
| "multiple_git_auth"
| "scim"
| "template_autostop_requirement"
| "template_rbac"
| "template_restart_requirement"
| "user_limit"
| "user_role_management"
| "workspace_proxy"
@@ -1640,8 +1640,8 @@ export const FeatureNames: FeatureName[] = [
"high_availability",
"multiple_git_auth",
"scim",
"template_autostop_requirement",
"template_rbac",
"template_restart_requirement",
"user_limit",
"user_role_management",
"workspace_proxy",
@@ -26,7 +26,7 @@ const validFormValues: FormValues = {
allow_user_cancel_workspace_jobs: false,
allow_user_autostart: false,
allow_user_autostop: false,
restart_requirement: {
autostop_requirement: {
days_of_week: [],
weeks: 1,
},
@@ -74,9 +74,9 @@ export const TemplateScheduleForm: FC<TemplateScheduleForm> = ({
? template.time_til_dormant_autodelete_ms / MS_DAY_CONVERSION
: 0,
restart_requirement: {
days_of_week: template.restart_requirement.days_of_week,
weeks: template.restart_requirement.weeks,
autostop_requirement: {
days_of_week: template.autostop_requirement.days_of_week,
weeks: template.autostop_requirement.weeks,
},
allow_user_autostart: template.allow_user_autostart,
+1 -1
View File
@@ -436,7 +436,7 @@ export const MockTemplate: TypesGen.Template = {
description: "This is a test description.",
default_ttl_ms: 24 * 60 * 60 * 1000,
max_ttl_ms: 2 * 24 * 60 * 60 * 1000,
restart_requirement: {
autostop_requirement: {
days_of_week: [],
weeks: 1,
},