blob: 699a66006b27d3235f64ca4a78d68396ea7f204f [file] [log] [blame]
giof6ad2982024-08-23 17:42:49 +04001{{ define "content"}}
2Installation in progress (feel free to navigate away from this page):
3<ul class="progress">
4 {{ template "task" .Task.Subtasks }}
5</ul>
6
7<script>
8 async function refresh() {
9 try {
10 const resp = await fetch(window.location.href);
11 console.log(window.location.href, resp);
12 if (resp.ok) {
13 if (window.location.href != resp.url) {
14 location.assign(resp.url);
15 } else {
16 var tmp = document.createElement("html");
17 tmp.innerHTML = await resp.text();
18 const progress = tmp.getElementsByClassName("progress")[0];
19 document.getElementsByClassName("progress")[0].innerHTML = progress.innerHTML;
20 }
21 }
22 } catch (error) {
23 console.log(error);
24 } finally {
25 setTimeout(refresh, 3000);
26 }
27 }
28 setTimeout(refresh, 3000);
29</script>
30{{ end }}