From 1ea0c5a9ded0af80490bafa56fa7af7dc8d3a3de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Sat, 9 May 2026 20:53:17 +0400 Subject: [PATCH] =?UTF-8?q?fix:=20clone=20=E2=80=94=20poll=20until=20funct?= =?UTF-8?q?ion=20visible=20in=20list,=20up=20to=205=20attempts=20(v1.3.85)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- console/deploy/console.yaml | 2 +- console/ui/index.html | 4 ++-- console/ui/js/functions.js | 19 ++++++++++++++++--- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/console/deploy/console.yaml b/console/deploy/console.yaml index 0a4b618..7894314 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.84 + image: naeel/fission-console:v1.3.85 imagePullPolicy: Always ports: - containerPort: 8090 diff --git a/console/ui/index.html b/console/ui/index.html index 939e3d7..e941ee4 100644 --- a/console/ui/index.html +++ b/console/ui/index.html @@ -102,7 +102,7 @@
NUBES
FISSION CONSOLE
-
v1.3.84
+
v1.3.85
@@ -542,7 +542,7 @@
- v1.3.84 + v1.3.85
diff --git a/console/ui/js/functions.js b/console/ui/js/functions.js index 1b96936..df9bca3 100644 --- a/console/ui/js/functions.js +++ b/console/ui/js/functions.js @@ -448,10 +448,23 @@ async function submitClone() { try { var data = await requestJSON(API_BASE + '/functions/' + encodeURIComponent(srcName) + '/clone', 'POST', {new_name: newName}); - // Успех — закрываем модалку, обновляем список + // Успех — закрываем модалку, ждём появления в списке closeEdit(); - setStatus('Функция «' + newName + '» создана как копия «' + srcName + '»', false); - setTimeout(function() { reloadAll(); }, 800); + showStatus('Клонирование завершено, обновляем список...', ''); + var attempts = 0; + async function pollUntilVisible() { + attempts++; + await reloadAll(); + var found = (S.fns || []).some(function(f) { + return f && f.metadata && f.metadata.name === newName; + }); + if (found || attempts >= 5) { + showStatus('Функция «' + newName + '» создана как копия «' + srcName + '»', 'ok'); + } else { + setTimeout(pollUntilVisible, 1000); + } + } + setTimeout(pollUntilVisible, 700); } catch(e) { if (errEl) { errEl.textContent = e.message; errEl.style.display = 'block'; } } finally {