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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user