mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Add icon to templates (#3561)
This commit is contained in:
@@ -87,6 +87,7 @@ export interface CreateParameterRequest {
|
||||
export interface CreateTemplateRequest {
|
||||
readonly name: string
|
||||
readonly description?: string
|
||||
readonly icon?: string
|
||||
readonly template_version_id: string
|
||||
readonly parameter_values?: CreateParameterRequest[]
|
||||
readonly max_ttl_ms?: number
|
||||
@@ -295,6 +296,7 @@ export interface Template {
|
||||
readonly active_version_id: string
|
||||
readonly workspace_owner_count: number
|
||||
readonly description: string
|
||||
readonly icon: string
|
||||
readonly max_ttl_ms: number
|
||||
readonly min_autostart_interval_ms: number
|
||||
readonly created_by_id: string
|
||||
@@ -334,6 +336,7 @@ export interface UpdateRoles {
|
||||
export interface UpdateTemplateMeta {
|
||||
readonly name?: string
|
||||
readonly description?: string
|
||||
readonly icon?: string
|
||||
readonly max_ttl_ms?: number
|
||||
readonly min_autostart_interval_ms?: number
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ describe("TemplateSettingsPage", () => {
|
||||
name: "edited-template-name",
|
||||
description: "Edited description",
|
||||
max_ttl_ms: 4000,
|
||||
icon: "/icons/new-icon.png",
|
||||
}
|
||||
jest.spyOn(API, "updateTemplateMeta").mockResolvedValueOnce({
|
||||
...MockTemplate,
|
||||
|
||||
@@ -155,6 +155,7 @@ export const MockTemplate: TypesGen.Template = {
|
||||
min_autostart_interval_ms: 60 * 60 * 1000,
|
||||
created_by_id: "test-creator-id",
|
||||
created_by_name: "test_creator",
|
||||
icon: "/icon/code.svg",
|
||||
}
|
||||
|
||||
export const MockWorkspaceAutostartDisabled: TypesGen.UpdateWorkspaceAutostartRequest = {
|
||||
|
||||
Reference in New Issue
Block a user