Website changes
This commit is contained in:
@@ -29,6 +29,15 @@
|
|||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="editNode">
|
||||||
|
<p id="text">Status updating</p>
|
||||||
|
<select id="mySelect"></select>
|
||||||
|
<textarea maxlength="44" id="inputName"></textarea>
|
||||||
|
<textarea maxlength="44" id="inputLocation"></textarea>
|
||||||
|
<button id="button" onclick="changeText()">Change Information</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<script src="GaugGroup.js"></script>
|
<script src="GaugGroup.js"></script>
|
||||||
<script src="graph-classes.js"></script>
|
<script src="graph-classes.js"></script>
|
||||||
|
@@ -12,6 +12,14 @@
|
|||||||
justify-content: left;
|
justify-content: left;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
|
.nav-button {
|
||||||
|
background-color: #333;
|
||||||
|
color: #fff;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
#editNode{
|
#editNode{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -21,13 +29,14 @@
|
|||||||
/* border: 20px solid orange; */
|
/* border: 20px solid orange; */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* #editNode {
|
#editNode {
|
||||||
|
margin-top: 1%;
|
||||||
width: 98vw;
|
width: 98vw;
|
||||||
height: 20vh;
|
height: 20vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
/* flex-direction: column; Keep as column
|
/* flex-direction: column; Keep as column
|
||||||
/* justify-content: ;
|
/* justify-content: ; */
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
background-color: #333;
|
background-color: #333;
|
||||||
@@ -39,7 +48,7 @@
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
float: top;
|
float: top;
|
||||||
} */
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@@ -9,8 +9,6 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<button id="settings" onclick="settings()">Settings</button>
|
<button id="settings" onclick="settings()">Settings</button>
|
||||||
<div id="editNode">
|
<div id="editNode">
|
||||||
<p id="text">Status updating</p>
|
<p id="text">Status updating</p>
|
||||||
|
@@ -17,7 +17,15 @@ function settings() {
|
|||||||
updateNode.style.display = "block";
|
updateNode.style.display = "block";
|
||||||
locationInput.value = "";
|
locationInput.value = "";
|
||||||
nameInput.value = "";
|
nameInput.value = "";
|
||||||
|
getNodeInfo();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
updateNode.style.display = "none";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getNodeInfo() {
|
||||||
fetch(apiGetAllNode)
|
fetch(apiGetAllNode)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
@@ -31,12 +39,8 @@ function settings() {
|
|||||||
document.getElementById('text').innerHTML = "Data fetched";
|
document.getElementById('text').innerHTML = "Data fetched";
|
||||||
handleData(data);
|
handleData(data);
|
||||||
})
|
})
|
||||||
|
|
||||||
} else {
|
|
||||||
updateNode.style.display = "none";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleData(JSONdata) {
|
function handleData(JSONdata) {
|
||||||
var i, L = select.options.length - 1;
|
var i, L = select.options.length - 1;
|
||||||
for (i = L; i >= 0; i--) {
|
for (i = L; i >= 0; i--) {
|
||||||
@@ -71,6 +75,7 @@ function changeText() {
|
|||||||
var text = document.getElementById('text');
|
var text = document.getElementById('text');
|
||||||
|
|
||||||
text.innerHTML = "Changes made"
|
text.innerHTML = "Changes made"
|
||||||
|
getNodeInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateNodeInfo(node, newNodeName, newNodeLocation) {
|
function updateNodeInfo(node, newNodeName, newNodeLocation) {
|
||||||
|
Reference in New Issue
Block a user