Skip to content

Commit

Permalink
start of status
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Reynolds committed Apr 29, 2024
1 parent 0fceaa6 commit 1095fee
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion labapp/app/markdown/lb.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ document.getElementById('requestBtn1').addEventListener('click', async () => {
const response = await axios.get('/_lb1');
if(response.data.status === 'success') {
const prettyJson = JSON.stringify(response.data.data, null, 4);
resultDiv.innerHTML = `<pre class="alert alert-success"><code>${prettyJson}</code></pre>`;
resultDiv.innerHTML = `<pre class="alert alert-success"><b>Success:</b><br><code>${prettyJson}</code></pre>`;
} else {
const errJson = JSON.stringify(response.data.error, null, 4);
resultDiv.innerHTML = `<div class="alert alert-danger"><b>Request Failed:</b>&nbsp;&nbsp;<code>${errJson}</code></div>`;
Expand Down
4 changes: 4 additions & 0 deletions labapp/app/static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ main {
overflow-y: auto;
}

.status-box {
margin-top: auto; /* Pushes itself to the bottom */
}

.markdown-body {
padding: 50px;
}
Expand Down
13 changes: 11 additions & 2 deletions labapp/app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
<div class="row">
<!-- Sidebar -->
<div class="col-auto bg-light sidebar" id="sidebar">

<div class="flex-shrink-0 p-3 bg-white" style="width: 280px;">
<a href="/" class="d-flex align-items-center pb-3 mb-3 link-dark text-decoration-none border-bottom">
<img src="/static/logo.png" width="100" height="auto" alt="Logo">
Expand Down Expand Up @@ -129,8 +128,18 @@
</div>
</li>
</ul>
</div>


{% if cluster-info %}
<div class="status-box bg-light p-2">
<p>Status: <strong>Active</strong></p>
</div>
{% endif %}



</div>
</div>

<!-- Main Content -->
<main class="col">
Expand Down

0 comments on commit 1095fee

Please sign in to comment.