updated template javascript
Some checks failed
FHIR IG CI/CD Pipeline with Version Persistence / build-ig (push) Failing after 4m45s
FHIR IG CI/CD Pipeline with Version Persistence / deploy (push) Has been skipped

This commit is contained in:
2026-03-07 04:25:27 +06:00
parent fdca2f9c3b
commit 63ca3fa44f

View File

@@ -33,7 +33,8 @@
<p><i>Version history not available.</i></p>
</div>
<script>
{% raw %}
<script type="text/javascript">
(function() {
var loadingDiv = document.getElementById('version-history-loading');
var contentDiv = document.getElementById('version-history-content');
@@ -60,7 +61,10 @@
return response.json();
})
.then(function(data) {
if (!data.list) throw new Error('Invalid format');
if (!data || !data.list) throw new Error('Invalid format');
// Clear tbody in case of multiple attempts
tbody.innerHTML = "";
for (var i = 0; i < data.list.length; i++) {
var entry = data.list[i];
@@ -71,7 +75,7 @@
row.insertCell(2).innerHTML = '<span class="badge">' + (entry.status || 'unknown') + '</span>';
row.insertCell(3).textContent = entry.desc || '';
} else {
ciDiv.innerHTML = '<div style="background-color: #f8f9fa; padding: 10px; border-left: 5px solid #007bff;">' +
ciDiv.innerHTML = '<div style="background-color: #f8f9fa; padding: 10px; border-left: 5px solid #007bff; margin-top: 10px;">' +
'<p>Latest development build: <a href="' + entry.path + '">' + entry.path + '</a></p>' +
'</div>';
}
@@ -79,8 +83,8 @@
loadingDiv.style.display = 'none';
contentDiv.style.display = 'block';
})
.catch(function() {
// Try the next path in the array
.catch(function(err) {
console.log('Path failed: ' + pathsToTry[index]);
loadData(index + 1);
});
}
@@ -88,4 +92,5 @@
loadData(0);
})();
</script>
{% endraw %}
</div>