fix: clone — apiFetch → requestJSON (v1.3.82)
This commit is contained in:
@@ -55,7 +55,7 @@ spec:
|
|||||||
serviceAccountName: fission-console
|
serviceAccountName: fission-console
|
||||||
containers:
|
containers:
|
||||||
- name: console
|
- name: console
|
||||||
image: naeel/fission-console:v1.3.81
|
image: naeel/fission-console:v1.3.82
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8090
|
- containerPort: 8090
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
<div class="nubes">NUBES</div>
|
<div class="nubes">NUBES</div>
|
||||||
<div class="product">FISSION CONSOLE</div>
|
<div class="product">FISSION CONSOLE</div>
|
||||||
</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>
|
||||||
<div class="row" style="margin:0;">
|
<div class="row" style="margin:0;">
|
||||||
<button class="btn ghost" onclick="reloadAll()">Refresh</button>
|
<button class="btn ghost" onclick="reloadAll()">Refresh</button>
|
||||||
@@ -522,7 +522,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="actions" style="justify-content:space-between; align-items:center;">
|
<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>
|
<button class="btn ghost" onclick="closeHelp()">Закрыть</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -447,22 +447,13 @@ async function submitClone() {
|
|||||||
if (errEl) errEl.style.display = 'none';
|
if (errEl) errEl.style.display = 'none';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var resp = await apiFetch('/functions/' + encodeURIComponent(srcName) + '/clone', {
|
var data = await requestJSON(API_BASE + '/functions/' + encodeURIComponent(srcName) + '/clone', 'POST', {new_name: newName});
|
||||||
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;
|
|
||||||
}
|
|
||||||
// Успех — закрываем модалку, обновляем список
|
// Успех — закрываем модалку, обновляем список
|
||||||
closeEdit();
|
closeEdit();
|
||||||
setStatus('Функция «' + newName + '» создана как копия «' + srcName + '»', false);
|
setStatus('Функция «' + newName + '» создана как копия «' + srcName + '»', false);
|
||||||
await reloadAll();
|
await reloadAll();
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
if (errEl) { errEl.textContent = 'Сетевая ошибка: ' + e.message; errEl.style.display = 'block'; }
|
if (errEl) { errEl.textContent = e.message; errEl.style.display = 'block'; }
|
||||||
} finally {
|
} finally {
|
||||||
if (btn) { btn.disabled = false; btn.textContent = 'Клонировать'; }
|
if (btn) { btn.disabled = false; btn.textContent = 'Клонировать'; }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user