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 {