mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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:
Generated
+1
@@ -777,6 +777,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/con
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"devcontainer_dirty": true,
|
||||
"devcontainer_status": "running",
|
||||
"id": "string",
|
||||
"image": "string",
|
||||
"labels": {
|
||||
|
||||
Generated
+34
-14
@@ -8638,6 +8638,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"devcontainer_dirty": true,
|
||||
"devcontainer_status": "running",
|
||||
"id": "string",
|
||||
"image": "string",
|
||||
"labels": {
|
||||
@@ -8664,20 +8665,21 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|----------------------|---------------------------------------------------------------------------------------|----------|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `created_at` | string | false | | Created at is the time the container was created. |
|
||||
| `devcontainer_dirty` | boolean | false | | Devcontainer dirty is true if the devcontainer configuration has changed since the container was created. This is used to determine if the container needs to be rebuilt. |
|
||||
| `id` | string | false | | ID is the unique identifier of the container. |
|
||||
| `image` | string | false | | Image is the name of the container image. |
|
||||
| `labels` | object | false | | Labels is a map of key-value pairs of container labels. |
|
||||
| » `[any property]` | string | false | | |
|
||||
| `name` | string | false | | Name is the human-readable name of the container. |
|
||||
| `ports` | array of [codersdk.WorkspaceAgentContainerPort](#codersdkworkspaceagentcontainerport) | false | | Ports includes ports exposed by the container. |
|
||||
| `running` | boolean | false | | Running is true if the container is currently running. |
|
||||
| `status` | string | false | | Status is the current status of the container. This is somewhat implementation-dependent, but should generally be a human-readable string. |
|
||||
| `volumes` | object | false | | Volumes is a map of "things" mounted into the container. Again, this is somewhat implementation-dependent. |
|
||||
| » `[any property]` | string | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|-----------------------|----------------------------------------------------------------------------------------|----------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `created_at` | string | false | | Created at is the time the container was created. |
|
||||
| `devcontainer_dirty` | boolean | false | | Devcontainer dirty is true if the devcontainer configuration has changed since the container was created. This is used to determine if the container needs to be rebuilt. |
|
||||
| `devcontainer_status` | [codersdk.WorkspaceAgentDevcontainerStatus](#codersdkworkspaceagentdevcontainerstatus) | false | | Devcontainer status is the status of the devcontainer, if this container is a devcontainer. This is used to determine if the devcontainer is running, stopped, starting, or in an error state. |
|
||||
| `id` | string | false | | ID is the unique identifier of the container. |
|
||||
| `image` | string | false | | Image is the name of the container image. |
|
||||
| `labels` | object | false | | Labels is a map of key-value pairs of container labels. |
|
||||
| » `[any property]` | string | false | | |
|
||||
| `name` | string | false | | Name is the human-readable name of the container. |
|
||||
| `ports` | array of [codersdk.WorkspaceAgentContainerPort](#codersdkworkspaceagentcontainerport) | false | | Ports includes ports exposed by the container. |
|
||||
| `running` | boolean | false | | Running is true if the container is currently running. |
|
||||
| `status` | string | false | | Status is the current status of the container. This is somewhat implementation-dependent, but should generally be a human-readable string. |
|
||||
| `volumes` | object | false | | Volumes is a map of "things" mounted into the container. Again, this is somewhat implementation-dependent. |
|
||||
| » `[any property]` | string | false | | |
|
||||
|
||||
## codersdk.WorkspaceAgentContainerPort
|
||||
|
||||
@@ -8699,6 +8701,23 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
| `network` | string | false | | Network is the network protocol used by the port (tcp, udp, etc). |
|
||||
| `port` | integer | false | | Port is the port number *inside* the container. |
|
||||
|
||||
## codersdk.WorkspaceAgentDevcontainerStatus
|
||||
|
||||
```json
|
||||
"running"
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Value |
|
||||
|------------|
|
||||
| `running` |
|
||||
| `stopped` |
|
||||
| `starting` |
|
||||
| `error` |
|
||||
|
||||
## codersdk.WorkspaceAgentHealth
|
||||
|
||||
```json
|
||||
@@ -8745,6 +8764,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"devcontainer_dirty": true,
|
||||
"devcontainer_status": "running",
|
||||
"id": "string",
|
||||
"image": "string",
|
||||
"labels": {
|
||||
|
||||
Reference in New Issue
Block a user