v1.3.50: fix archive fn — entrypoint update in edit, store/show archive filename

This commit is contained in:
“Naeel”
2026-05-04 08:14:19 +04:00
parent f97fd8a744
commit 2fdba29f79
4 changed files with 49 additions and 21 deletions
+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.49</div>
<div style="font-size:0.65rem; color:var(--text-secondary); margin-left:10px; align-self:center; opacity:0.7;">v1.3.50</div>
</div>
<div class="row" style="margin:0;">
<button class="btn ghost" onclick="reloadAll()">Refresh</button>
@@ -462,7 +462,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.49</span>
<span style="font-size:0.75rem; color:var(--text-secondary);">v1.3.50</span>
<button class="btn ghost" onclick="closeHelp()">Закрыть</button>
</div>
</div>
+5 -3
View File
@@ -150,7 +150,7 @@ async function openEdit(name) {
if (fn.source_type === 'archive') {
setCodeMode('e', 'archive');
var archiveNameEl = document.getElementById('e-archive-name');
if (archiveNameEl) archiveNameEl.textContent = fn.package || 'архив';
if (archiveNameEl) archiveNameEl.textContent = fn.archive_filename || fn.package || 'архив';
var archiveFile = document.getElementById('e-archive-file');
if (archiveFile) archiveFile.value = '';
} else {
@@ -205,14 +205,16 @@ async function submitEdit() {
// Обновляем через архив
var fd = new FormData();
fd.append('timeout', String(parseTimeout(document.getElementById('e-timeout').value)));
fd.append('entrypoint', document.getElementById('e-entry').value.trim());
fd.append('archive', archiveFile);
var resp = await fetch(API_BASE + '/functions/' + encodeURIComponent(name) + '/archive',
{ method: 'PUT', headers: authHeaders(), body: fd });
if (!resp.ok) { var e = await resp.json().catch(() => ({})); throw new Error(e.error || resp.statusText); }
} else if (isArchiveMode) {
// Архив не заменяется — обновляем только timeout
// Архив не заменяется — обновляем только timeout + entrypoint
await requestJSON(API_BASE + '/functions/' + encodeURIComponent(name) + '/timeout', 'PUT', {
timeout: parseTimeout(document.getElementById('e-timeout').value)
timeout: parseTimeout(document.getElementById('e-timeout').value),
entrypoint: document.getElementById('e-entry').value.trim()
});
} else {
await requestJSON(API_BASE + '/functions/' + encodeURIComponent(name) + '/code', 'PUT', {