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:
“Naeel”
2026-05-09 06:50:52 +04:00
parent fb469d9c5b
commit 1fa92e069f
6 changed files with 337 additions and 7 deletions
+13 -2
View File
@@ -102,7 +102,7 @@
<div class="nubes">NUBES</div>
<div class="product">FISSION CONSOLE</div>
</div>
<div style="font-size:0.65rem; color:var(--text-secondary); margin-left:10px; align-self:center; opacity:0.7;">v1.3.71</div>
<div style="font-size:0.65rem; color:var(--text-secondary); margin-left:10px; align-self:center; opacity:0.7;">v1.3.72</div>
</div>
<div class="row" style="margin:0;">
<button class="btn ghost" onclick="reloadAll()">Refresh</button>
@@ -389,6 +389,17 @@
style="display:none;margin-top:8px;padding:10px 12px;border-radius:6px;font-size:13px;line-height:1.5;white-space:pre-wrap;font-family:monospace;">
</div>
</div>
<!-- Переменные окружения -->
<div style="margin-top:16px;">
<div style="font-weight:600; margin-bottom:8px; font-size:13px;">Переменные окружения</div>
<div id="e-tf-env-warn" style="display:none; margin-bottom:8px; padding:6px 10px; background:#553300; color:#ffa; border-radius:4px; font-size:12px;">
⚠️ Функция управляется Terraform — переменные только для чтения
</div>
<div id="e-envvars-list" style="display:flex; flex-direction:column; gap:4px; margin-bottom:8px;"></div>
<button id="e-add-envvar-btn" class="btn ghost" style="font-size:12px;" onclick="addEnvVarRow('e')">+ Добавить переменную</button>
</div>
<div class="actions">
<button class="btn ghost" onclick="closeEdit()">Отмена</button>
<button id="e-submit" class="btn" onclick="submitEdit()">Сохранить</button>
@@ -498,7 +509,7 @@
</div>
<div class="actions" style="justify-content:space-between; align-items:center;">
<span style="font-size:0.75rem; color:var(--text-secondary);">v1.3.71</span>
<span style="font-size:0.75rem; color:var(--text-secondary);">v1.3.72</span>
<button class="btn ghost" onclick="closeHelp()">Закрыть</button>
</div>
</div>