feat(site): allow recreating devcontainers and showing dirty status (#18049)

This change allows showing the devcontainer dirty status in the UI as
well as a recreate button to update the devcontainer.

Closes #16424
This commit is contained in:
Mathias Fredriksson
2025-05-27 19:42:24 +03:00
committed by GitHub
parent 23d14233bf
commit a18eb9d08f
14 changed files with 275 additions and 46 deletions
+23
View File
@@ -17201,6 +17201,14 @@ const docTemplate = `{
"description": "DevcontainerDirty is true if the devcontainer configuration has changed\nsince the container was created. This is used to determine if the\ncontainer needs to be rebuilt.",
"type": "boolean"
},
"devcontainer_status": {
"description": "DevcontainerStatus is the status of the devcontainer, if this\ncontainer is a devcontainer. This is used to determine if the\ndevcontainer is running, stopped, starting, or in an error state.",
"allOf": [
{
"$ref": "#/definitions/codersdk.WorkspaceAgentDevcontainerStatus"
}
]
},
"id": {
"description": "ID is the unique identifier of the container.",
"type": "string"
@@ -17265,6 +17273,21 @@ const docTemplate = `{
}
}
},
"codersdk.WorkspaceAgentDevcontainerStatus": {
"type": "string",
"enum": [
"running",
"stopped",
"starting",
"error"
],
"x-enum-varnames": [
"WorkspaceAgentDevcontainerStatusRunning",
"WorkspaceAgentDevcontainerStatusStopped",
"WorkspaceAgentDevcontainerStatusStarting",
"WorkspaceAgentDevcontainerStatusError"
]
},
"codersdk.WorkspaceAgentHealth": {
"type": "object",
"properties": {
+18
View File
@@ -15706,6 +15706,14 @@
"description": "DevcontainerDirty is true if the devcontainer configuration has changed\nsince the container was created. This is used to determine if the\ncontainer needs to be rebuilt.",
"type": "boolean"
},
"devcontainer_status": {
"description": "DevcontainerStatus is the status of the devcontainer, if this\ncontainer is a devcontainer. This is used to determine if the\ndevcontainer is running, stopped, starting, or in an error state.",
"allOf": [
{
"$ref": "#/definitions/codersdk.WorkspaceAgentDevcontainerStatus"
}
]
},
"id": {
"description": "ID is the unique identifier of the container.",
"type": "string"
@@ -15770,6 +15778,16 @@
}
}
},
"codersdk.WorkspaceAgentDevcontainerStatus": {
"type": "string",
"enum": ["running", "stopped", "starting", "error"],
"x-enum-varnames": [
"WorkspaceAgentDevcontainerStatusRunning",
"WorkspaceAgentDevcontainerStatusStopped",
"WorkspaceAgentDevcontainerStatusStarting",
"WorkspaceAgentDevcontainerStatusError"
]
},
"codersdk.WorkspaceAgentHealth": {
"type": "object",
"properties": {