fix: clone — apiFetch → requestJSON (v1.3.82)

This commit is contained in:
“Naeel”
2026-05-09 20:35:26 +04:00
parent 0a4f64143c
commit 26728aadbe
3 changed files with 5 additions and 14 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ spec:
serviceAccountName: fission-console
containers:
- name: console
image: naeel/fission-console:v1.3.81
image: naeel/fission-console:v1.3.82
imagePullPolicy: Always
ports:
- containerPort: 8090
+2 -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.81</div>
<div style="font-size:0.65rem; color:var(--text-secondary); margin-left:10px; align-self:center; opacity:0.7;">v1.3.82</div>
</div>
<div class="row" style="margin:0;">
<button class="btn ghost" onclick="reloadAll()">Refresh</button>
@@ -522,7 +522,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.81</span>
<span style="font-size:0.75rem; color:var(--text-secondary);">v1.3.82</span>
<button class="btn ghost" onclick="closeHelp()">Закрыть</button>
</div>
</div>
+2 -11
View File
@@ -447,22 +447,13 @@ async function submitClone() {
if (errEl) errEl.style.display = 'none';
try {
var resp = await apiFetch('/functions/' + encodeURIComponent(srcName) + '/clone', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({new_name: newName})
});
var data = await resp.json();
if (!resp.ok) {
if (errEl) { errEl.textContent = data.error || ('Ошибка ' + resp.status); errEl.style.display = 'block'; }
return;
}
var data = await requestJSON(API_BASE + '/functions/' + encodeURIComponent(srcName) + '/clone', 'POST', {new_name: newName});
// Успех — закрываем модалку, обновляем список
closeEdit();
setStatus('Функция «' + newName + '» создана как копия «' + srcName + '»', false);
await reloadAll();
} catch(e) {
if (errEl) { errEl.textContent = 'Сетевая ошибка: ' + e.message; errEl.style.display = 'block'; }
if (errEl) { errEl.textContent = e.message; errEl.style.display = 'block'; }
} finally {
if (btn) { btn.disabled = false; btn.textContent = 'Клонировать'; }
}