Display the local and total chunk counts on the loading screen.

This commit is contained in:
CalDescent 2022-02-01 22:03:52 +00:00
parent 5a8b895475
commit 97199d9b91

View File

@ -46,6 +46,7 @@
var url = host + '/arbitrary/resource/status/' + service + '/' + name + '?build=true';
var textStatus = "Loading...";
var textProgress = "";
var retryInterval = 2500;
const response = await fetch(url, {
@ -96,7 +97,12 @@
textStatus = status.description;
}
if (status.localChunkCount != null && status.totalChunkCount != null) {
textProgress = "Files downloaded: " + status.localChunkCount + " / " + status.totalChunkCount;
}
document.getElementById("status").innerHTML = textStatus;
document.getElementById("progress").innerHTML = textProgress;
setTimeout(checkStatus, retryInterval);
}
@ -260,6 +266,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
This page will refresh automatically when the content becomes available.
</p>
<p><span id="status">Loading...</span></p>
<p><span id="progress"></span></p>
</div>
</div>