Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
fix: add missing gRPC/ws tunnel commands (#2636)
Kyle Mendellc4fc0944692e
diff --git a/backend/pkg/libarcane/edge/commands.go b/backend/pkg/libarcane/edge/commands.goindex ed37905d8..de82f682a 100644--- a/backend/pkg/libarcane/edge/commands.go+++ b/backend/pkg/libarcane/edge/commands.go@@ -67,6 +67,11 @@ var commandRoutes = []commandRoute{{Method: http.MethodPost, PathPattern: "/api/environments/{id}/projects/{projectId}/down", CommandName: "project.down"},{Method: http.MethodPost, PathPattern: "/api/environments/{id}/projects", CommandName: "project.create"},{Method: http.MethodGet, PathPattern: "/api/environments/{id}/projects/{projectId}", CommandName: "project.inspect"},+ {Method: http.MethodGet, PathPattern: "/api/environments/{id}/projects/{projectId}/compose", CommandName: "project.compose"},+ {Method: http.MethodGet, PathPattern: "/api/environments/{id}/projects/{projectId}/files", CommandName: "project.files"},+ {Method: http.MethodGet, PathPattern: "/api/environments/{id}/projects/{projectId}/runtime", CommandName: "project.runtime"},+ {Method: http.MethodGet, PathPattern: "/api/environments/{id}/projects/{projectId}/updates", CommandName: "project.updates"},+ {Method: http.MethodGet, PathPattern: "/api/environments/{id}/projects/{projectId}/file", CommandName: "project.file"},{Method: http.MethodPost, PathPattern: "/api/environments/{id}/projects/{projectId}/redeploy", CommandName: "project.redeploy"},{Method: http.MethodDelete, PathPattern: "/api/environments/{id}/projects/{projectId}/destroy", CommandName: "project.destroy"},{Method: http.MethodPut, PathPattern: "/api/environments/{id}/projects/{projectId}", CommandName: "project.update"},@@ -74,6 +79,8 @@ var commandRoutes = []commandRoute{{Method: http.MethodPost, PathPattern: "/api/environments/{id}/projects/{projectId}/restart", CommandName: "project.restart"},{Method: http.MethodPost, PathPattern: "/api/environments/{id}/projects/{projectId}/pull", CommandName: "project.pull"},{Method: http.MethodPost, PathPattern: "/api/environments/{id}/projects/{projectId}/build", CommandName: "project.build"},+ {Method: http.MethodPost, PathPattern: "/api/environments/{id}/projects/{projectId}/archive", CommandName: "project.archive"},+ {Method: http.MethodPost, PathPattern: "/api/environments/{id}/projects/{projectId}/unarchive", CommandName: "project.unarchive"},{Method: http.MethodGet, PathPattern: "/api/environments/{id}/gitops-syncs", CommandName: "gitops_sync.list"},{Method: http.MethodPost, PathPattern: "/api/environments/{id}/gitops-syncs", CommandName: "gitops_sync.create"},diff --git a/backend/pkg/libarcane/edge/commands_test.go b/backend/pkg/libarcane/edge/commands_test.goindex dea914c7a..4e26467cc 100644--- a/backend/pkg/libarcane/edge/commands_test.go+++ b/backend/pkg/libarcane/edge/commands_test.go@@ -23,6 +23,8 @@ func TestResolveEdgeCommandName(t *testing.T) {{name: "container start", method: "POST", path: "/api/environments/0/containers/abc/start", command: "container.start", shouldHit: true},{name: "volume browse download", method: "GET", path: "/api/environments/0/volumes/data/browse/download", command: "volume.browse.download", shouldHit: true},{name: "project logs stream", method: "GET", path: "/api/environments/0/ws/projects/p1/logs", stream: true, command: "project.logs.stream", shouldHit: true},+ {name: "project updates", method: "GET", path: "/api/environments/0/projects/p1/updates", command: "project.updates", shouldHit: true},+ {name: "project archive", method: "POST", path: "/api/environments/0/projects/p1/archive", command: "project.archive", shouldHit: true},{name: "health", method: "HEAD", path: "/api/environments/0/system/health", command: "system.health", shouldHit: true},{name: "unknown", method: "PATCH", path: "/api/environments/0/containers", shouldHit: false},}