feat: enable proxy toggle on quick deploy, event log clearing, and UX fixes

- Add enable_proxy toggle to Quick Deploy form (defaults to on)
- Add DELETE /api/events/log/{id} and DELETE /api/events/log endpoints
- Add Clear All button with confirmation on Events page
- Rename "NPM Proxy" to "Enable Proxy" on stage form (provider-agnostic)
- Fix polling interval validation (min 60s) and number input trim errors
- Fix domain field no longer required in settings
This commit is contained in:
2026-04-05 01:50:19 +03:00
parent 61febefca9
commit c26c41e6a1
10 changed files with 134 additions and 13 deletions
+12 -6
View File
@@ -96,12 +96,13 @@ func (s *Server) inspectImage(w http.ResponseWriter, r *http.Request) {
// quickDeployRequest is the expected JSON body for POST /api/deploy/quick.
type quickDeployRequest struct {
Name string `json:"name"`
Image string `json:"image"`
Tag string `json:"tag"`
Registry string `json:"registry"`
Port int `json:"port"`
Force bool `json:"force"` // skip duplicate check
Name string `json:"name"`
Image string `json:"image"`
Tag string `json:"tag"`
Registry string `json:"registry"`
Port int `json:"port"`
Force bool `json:"force"` // skip duplicate check
EnableProxy *bool `json:"enable_proxy"` // nil defaults to true
}
// quickDeploy handles POST /api/deploy/quick.
@@ -167,12 +168,17 @@ func (s *Server) quickDeploy(w http.ResponseWriter, r *http.Request) {
}
// Create default stage.
enableProxy := true
if req.EnableProxy != nil {
enableProxy = *req.EnableProxy
}
stage, err := s.store.CreateStage(store.Stage{
ProjectID: project.ID,
Name: "dev",
TagPattern: "*",
AutoDeploy: true,
MaxInstances: 1,
EnableProxy: enableProxy,
})
if err != nil {
slog.Error("failed to create stage", "error", err)