From ee97eebbff45890a4fe9b2837c4f4cd39fa89d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Sat, 9 May 2026 07:06:56 +0400 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B2=D0=B0=D0=BB=D0=B8=D0=B4=D0=B0=D1=86=D0=B8=D0=B8=20env=20?= =?UTF-8?q?vars=20=E2=80=94=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20=D0=B2=D0=BD=D1=83=D1=82=D1=80=D0=B8=20=D0=BC=D0=BE?= =?UTF-8?q?=D0=B4=D0=B0=D0=BB=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- console/deploy/console.yaml | 2 +- console/ui/index.html | 5 +++-- console/ui/js/functions.js | 12 +++++++++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/console/deploy/console.yaml b/console/deploy/console.yaml index 8498192..6f783ca 100644 --- a/console/deploy/console.yaml +++ b/console/deploy/console.yaml @@ -55,7 +55,7 @@ spec: serviceAccountName: fission-console containers: - name: console - image: naeel/fission-console:v1.3.74 + image: naeel/fission-console:v1.3.75 imagePullPolicy: Always ports: - containerPort: 8090 diff --git a/console/ui/index.html b/console/ui/index.html index acf8570..45c597b 100644 --- a/console/ui/index.html +++ b/console/ui/index.html @@ -102,7 +102,7 @@
NUBES
FISSION CONSOLE
-
v1.3.74
+
v1.3.75
@@ -400,6 +400,7 @@
+
@@ -509,7 +510,7 @@
- v1.3.74 + v1.3.75
diff --git a/console/ui/js/functions.js b/console/ui/js/functions.js index c907dab..411b7d5 100644 --- a/console/ui/js/functions.js +++ b/console/ui/js/functions.js @@ -151,6 +151,8 @@ function parseTimeout(v) { async function openEdit(name) { try { + var errEl = document.getElementById('e-error-msg'); + if (errEl) errEl.style.display = 'none'; const fn = await getJSON(API_BASE + '/functions/' + encodeURIComponent(name)); S.currentEdit = fn; document.getElementById('e-title').textContent = 'Редактирование: ' + name; @@ -249,21 +251,25 @@ async function submitEdit() { if (!isTfFn) { var envVars = collectEnvVars('e'); // Проверка на дубли ключей - var keys = envVars.map(function(e) { return e.name; }); + var keys = envVars.map(function(ev) { return ev.name; }); var dupes = keys.filter(function(k, i) { return keys.indexOf(k) !== i; }); if (dupes.length > 0) { - throw new Error('Дублирующиеся ключи переменных: ' + dupes.join(', ')); + throw new Error('Дублирующиеся ключи: ' + [...new Set(dupes)].join(', ')); } await requestJSON(API_BASE + '/functions/' + encodeURIComponent(name) + '/envvars', 'PUT', { env_vars: envVars }); } + var errEl = document.getElementById('e-error-msg'); + if (errEl) errEl.style.display = 'none'; closeEdit(); progress.stop('Код обновлён: ' + name, 'ok'); await reloadAll(); } catch (e) { - progress.stop('Ошибка обновления: ' + e.message, 'err'); + var errEl = document.getElementById('e-error-msg'); + if (errEl) { errEl.textContent = e.message; errEl.style.display = 'block'; } + progress.stop('', ''); } finally { btn.disabled = false; }