fix: nginx timeout 600s, timer in UI, v1.1
Deploy contracts-flask / validate (push) Successful in 0s
Deploy contracts-flask / validate (push) Successful in 0s
This commit is contained in:
@@ -64,7 +64,7 @@
|
|||||||
<a href="/">Сверка договоров</a>
|
<a href="/">Сверка договоров</a>
|
||||||
<span class="sep">|</span>
|
<span class="sep">|</span>
|
||||||
<strong>DrHider</strong>
|
<strong>DrHider</strong>
|
||||||
<span style="font-size:11px;color:var(--muted);">v0.9</span>
|
<span style="font-size:11px;color:var(--muted);">v1.1</span>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
@@ -129,12 +129,18 @@ BTN.onclick = async () => {
|
|||||||
const b64 = btoa(String.fromCharCode(...new Uint8Array(buf)));
|
const b64 = btoa(String.fromCharCode(...new Uint8Array(buf)));
|
||||||
payload.push({name: f.name, data: b64, type: f.type || ''});
|
payload.push({name: f.name, data: b64, type: f.type || ''});
|
||||||
}
|
}
|
||||||
setStatus('progress', '⏳ Обработка...');
|
setStatus('progress', '⏳ Обработка... 0с');
|
||||||
|
const startTime = Date.now();
|
||||||
|
const timer = setInterval(() => {
|
||||||
|
const elapsed = Math.round((Date.now() - startTime) / 1000);
|
||||||
|
setStatus('progress', '⏳ Обработка... ' + elapsed + 'с');
|
||||||
|
}, 1000);
|
||||||
const r = await fetch('https://contracts.kube5s.ru/api/drhider', {
|
const r = await fetch('https://contracts.kube5s.ru/api/drhider', {
|
||||||
method:'POST',
|
method:'POST',
|
||||||
headers: {'Content-Type': 'application/json'},
|
headers: {'Content-Type': 'application/json'},
|
||||||
body: JSON.stringify({files: payload})
|
body: JSON.stringify({files: payload})
|
||||||
});
|
});
|
||||||
|
clearInterval(timer);
|
||||||
if (!r.ok) throw new Error(await r.text());
|
if (!r.ok) throw new Error(await r.text());
|
||||||
const blob = await r.blob();
|
const blob = await r.blob();
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
|
|||||||
Reference in New Issue
Block a user