Additional changes for #37
- Updating side bar - Updating nav bar - Adding node details page - Adding controller page - Updating routes
This commit is contained in:
50
Server/public/res/js/node.js
Normal file
50
Server/public/res/js/node.js
Normal file
@@ -0,0 +1,50 @@
|
||||
function addFrequencyInput(system){
|
||||
// Create new input
|
||||
var icon = document.createElement('i');
|
||||
icon.classList.add('bi');
|
||||
icon.classList.add('bi-x-circle');
|
||||
icon.classList.add('text-black');
|
||||
|
||||
var remove = document.createElement('a');
|
||||
remove.classList.add('align-middle');
|
||||
remove.classList.add('float-left');
|
||||
remove.href = '#'
|
||||
remove.appendChild(icon);
|
||||
|
||||
var childColRemoveIcon = document.createElement('div');
|
||||
childColRemoveIcon.classList.add('col-2');
|
||||
childColRemoveIcon.appendChild(remove);
|
||||
|
||||
var input = document.createElement('input');
|
||||
input.classList.add('form-control');
|
||||
input.id = 'nodeFreq';
|
||||
input.type = 'text';
|
||||
|
||||
var childColInput = document.createElement('div');
|
||||
childColInput.classList.add('col-10');
|
||||
childColInput.appendChild(input);
|
||||
|
||||
var childRow = document.createElement('div');
|
||||
childRow.classList.add("row");
|
||||
childRow.classList.add("px-1");
|
||||
childRow.appendChild(childColInput);
|
||||
childRow.appendChild(childColRemoveIcon);
|
||||
|
||||
var colParent = document.createElement('div');
|
||||
colParent.classList.add("col-md-6");
|
||||
colParent.classList.add("mb-1");
|
||||
colParent.appendChild(childRow);
|
||||
|
||||
document.getElementById(`frequencyRow_${system.replaceAll(" ", "_")}`).appendChild(colParent);
|
||||
}
|
||||
|
||||
function checkInByNodeId(nodeId){
|
||||
const Http = new XMLHttpRequest();
|
||||
const url='/nodes/'+nodeId;
|
||||
Http.open("GET", url);
|
||||
Http.send();
|
||||
|
||||
Http.onreadystatechange = (e) => {
|
||||
console.log(Http.responseText)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user