-
-
+
+
diff --git a/index.js b/index.js
index 0a5a611..3d582d8 100644
--- a/index.js
+++ b/index.js
@@ -1,13 +1,83 @@
import "bootstrap/dist/css/bootstrap.min.css";
window.onload = function () {
- console.log("hello to1")
+ console.log("hello to1");
+
+ let list = document.getElementById("zoneList");
+
+ let coolZone = {
+ name: "Cool Zone",
+ nodesNumber: 12,
+ lastHeight: 6546,
+ binaryLink: "#"
+ };
+ list.innerHTML += zoneElement("cool zone", coolZone, true);
+
+ let iris = {
+ name: "Iris",
+ nodesNumber: 57,
+ lastHeight: 12567,
+ binaryLink: "#"
+ };
+ list.innerHTML += zoneElement("iris", iris, true);
+
+
+
+ let nameService = {
+ name: "Name Service",
+ nodesNumber: 4,
+ lastHeight: 2566,
+ binaryLink: "#"
+ };
+ list.innerHTML += zoneElement("name service", nameService, false);
};
+/*
+
+ Iris, 50 nodes, last height 12023
+
Binary link
+
+
+
+
+
+ */
+
+function zoneElement(id, info, statusOk) {
+ let barStatus;
+ if (statusOk) {
+ barStatus = "progress-bar"
+ } else {
+ barStatus = "progress-bar progress-error"
+ }
+ console.log("hi " + id);
+ return `
+
${info.name}, ${info.nodesNumber} nodes, ${info.lastHeight}
+
+
+
`
+}
+
let socket = new WebSocket("ws://ip:port");
socket.onopen = function(e) {
- console.log("Waaaa ebsocket was opened: " + JSON.stringify(e));
+ console.log("Waa ebsocket was opened: " + JSON.stringify(e));
};