feat: clone function — POST /functions/:name/clone (v1.3.80)

- Backend: function_clone.go — copies archive from storagesvc, creates
  new Package/Function/HTTPTrigger preserving all settings (env vars,
  timeout, entrypoint, executor type, podspec)
- Backend: route handlers.go — /functions/:name/clone POST
- Frontend: 'Клон' button in edit modal, inline name input form
- Frontend: JS toggleCloneArea/submitClone with validation
- Pre-fills clone name as '<original>-copy', validates format
This commit is contained in:
“Naeel”
2026-05-09 20:22:51 +04:00
parent 921c0b5c16
commit d8b36631ee
5 changed files with 411 additions and 3 deletions
+6
View File
@@ -139,6 +139,12 @@ func (s *Server) handleFunctionsAction(w http.ResponseWriter, r *http.Request) {
return
}
// /functions/:name/clone — клонировать функцию с новым именем
if len(parts) == 2 && parts[1] == "clone" && r.Method == http.MethodPost {
s.handleCloneFunction(w, r, name)
return
}
http.NotFound(w, r)
}