diff --git a/pkg/generated/restapi/rekorHomePage.html b/pkg/generated/restapi/rekorHomePage.html index 95566acb0..e9fb4af02 100644 --- a/pkg/generated/restapi/rekorHomePage.html +++ b/pkg/generated/restapi/rekorHomePage.html @@ -34,7 +34,14 @@

function update() { fetch(url, {headers: {'Accept': 'application/json'}}).then((resp) => { resp.json().then((j) => { - let count = j.treeSize; + // Total across the active shard plus any inactive shards; otherwise + // the page under-reports after a shard rotation. + let count = Number(j.treeSize) || 0; + if (Array.isArray(j.inactiveShards)) { + for (const shard of j.inactiveShards) { + count += Number(shard.treeSize) || 0; + } + } document.getElementById('count').innerText = count; }).catch(console.error); }).catch(console.error);