Update heartbeat function location and name

This commit is contained in:
Logan Cusano
2023-07-16 01:50:01 -04:00
committed by logan
parent f55361575e
commit c14316933b
4 changed files with 3 additions and 6 deletions

View File

@@ -1,3 +0,0 @@
function sendNodeHeartbeat(nodeId) {
console.log(nodeId);
}

View File

@@ -80,7 +80,7 @@ function createToast(notificationMessage){
$('.toast').toast('show');
}
function checkInByNodeId(nodeId){
function sendNodeHeartbeat(nodeId){
const Http = new XMLHttpRequest();
const url='/nodes/'+nodeId;
Http.open("GET", url);

View File

@@ -7,5 +7,5 @@
</div>
</div>
<%- include('partials/bodyEnd.ejs') %>
<script src="/res/js/controller.js"></script>
<script src="/res/js/node.js"></script>
<%- include('partials/htmlFooter.ejs') %>

View File

@@ -30,7 +30,7 @@
<!-- Leave Server button -->
<a type="button" class="btn btn-danger <% if(!node.online) { %>disabled<% } %>" href="#" onclick="leaveServer()">Leave Server</a>
<!-- Checkin with client button -->
<a type="button" class="btn btn-secondary" href="#" onclick="checkInByNodeId('<%=node.id%>')">Check-in with Node</a>
<a type="button" class="btn btn-secondary" href="#" onclick="sendNodeHeartbeat('<%=node.id%>')">Check-in with Node</a>
</div>
</div>