Skip to content

Commit

Permalink
aesthetics
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Reynolds committed Apr 29, 2024
1 parent 6f2ddc6 commit cc7eade
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions labapp/app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@
})
.then(data => {
if (!data.err) {
document.getElementById('siteName').textContent = `Site Name: ${data.site_name}`;
document.getElementById('siteState').textContent = `State: ${data.state}`;
document.getElementById('siteName').textContent = data.site_name;
document.getElementById('siteState').textContent = data.state;
document.getElementById('statusImage').src = data.state === "PROVISIONED" ? "good.png" : "bad.png";

// Update cookies
Expand All @@ -169,8 +169,8 @@
let cachedState = getCookie('stateCache');

if (cachedSiteName && cachedState) {
document.getElementById('siteName').textContent = `Site Name: ${cachedSiteName}`;
document.getElementById('siteState').textContent = `State: ${cachedState}`;
document.getElementById('siteName').textContent = cachedSiteName;
document.getElementById('siteState').textContent = cachedState;
document.getElementById('statusImage').src = cachedState === "PROVISIONED" ? "/static/good.png" : "/static/bad.png";
} else {
fetchAndUpdateStatus();
Expand All @@ -181,9 +181,9 @@

</script>
<div class="status-box align-items-center bg-light p-2 text-center">
<p><strong id="siteName">Loading...</strong></p>
<p id="siteName">Loading...</p>
<img id="statusImage" src="/static/bad.png" alt="Status" style="width:50px; height:auto;">
<p><strong id="siteState"></strong></p>
<p id="siteState"></p>
</div>
{% endif %}

Expand Down

0 comments on commit cc7eade

Please sign in to comment.