feat: переменные окружения функций (env vars в CRD)
- Backend: handleGetFunctionEnvVars / handlePutFunctionEnvVars в function_crud.go - API: GET/PUT /functions/:name/envvars - handleGetFunction теперь возвращает env_vars в ответе - Frontend: блок env vars в edit modal (key=value + [×] + [+ Добавить]) - TF-функции показывают env vars в режиме read-only - Документация: doc/descriptions/function-envvars-flow.md - Версия v1.3.72
This commit is contained in:
@@ -126,6 +126,19 @@ func (s *Server) handleFunctionsAction(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// /functions/:name/envvars — переменные окружения
|
||||
if len(parts) == 2 && parts[1] == "envvars" {
|
||||
switch r.Method {
|
||||
case http.MethodGet:
|
||||
s.handleGetFunctionEnvVars(w, r, name)
|
||||
case http.MethodPut:
|
||||
s.handlePutFunctionEnvVars(w, r, name)
|
||||
default:
|
||||
http.Error(w, "method not allowed", http.StatusMethodNotAllowed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user