diff --git a/.hack/devnet/run.sh b/.hack/devnet/run.sh index 2a69e71..bd2adee 100755 --- a/.hack/devnet/run.sh +++ b/.hack/devnet/run.sh @@ -6,7 +6,10 @@ ENCLAVE_NAME="${ENCLAVE_NAME:-dora}" if kurtosis enclave inspect "$ENCLAVE_NAME" > /dev/null; then echo "Kurtosis enclave '$ENCLAVE_NAME' is already up." else - kurtosis run github.com/ethpandaops/ethereum-package --enclave "$ENCLAVE_NAME" --args-file "${__dir}/kurtosis.devnet.config.yaml" + kurtosis run github.com/ethpandaops/ethereum-package \ + --image-download always \ + --enclave "$ENCLAVE_NAME" \ + --args-file "${__dir}/kurtosis.devnet.config.yaml" fi # Get chain config @@ -15,7 +18,7 @@ kurtosis files inspect "$ENCLAVE_NAME" el_cl_genesis_data ./config.yaml | tail - ## Generate Dora config ENCLAVE_UUID=$(kurtosis enclave inspect "$ENCLAVE_NAME" --full-uuids | grep 'UUID:' | awk '{print $2}') -BEACON_NODDES=$(docker ps -aq -f "label=enclave_uuid=$ENCLAVE_UUID" \ +BEACON_NODES=$(docker ps -aq -f "label=enclave_uuid=$ENCLAVE_UUID" \ -f "label=com.kurtosistech.app-id=kurtosis" \ -f "label=com.kurtosistech.custom.ethereum-package.client-type=beacon" | tac) @@ -45,7 +48,7 @@ beaconapi: redisCacheAddr: "" redisCachePrefix: "" endpoints: -$(docker inspect -f " - { name: {{ with index .Config.Labels \"com.kurtosistech.id\"}}{{.}}{{end}}, url: http://{{ with index .NetworkSettings.Networks \"kt-$ENCLAVE_NAME\"}}{{.IPAddress }}:4000{{end}} }" $BEACON_NODDES) +$(docker inspect -f " - { name: {{ with index .Config.Labels \"com.kurtosistech.id\"}}{{.}}{{end}}, url: http://{{ with index .NetworkSettings.Networks \"kt-$ENCLAVE_NAME\"}}{{.IPAddress }}:4000{{end}} }" $BEACON_NODES) executionapi: depositLogBatchSize: 1000 endpoints: diff --git a/static/css/clients.css b/static/css/clients.css index 56fba31..deda005 100644 --- a/static/css/clients.css +++ b/static/css/clients.css @@ -53,7 +53,14 @@ Client peers table padding: 0; } +@media only screen and (max-width: 768px) { + .peer-nodemap { + height: 50vh; + } +} + .peer-nodemap-wrapper { + padding: 0; background: #4b79a1; background: -webkit-linear-gradient( to top, diff --git a/static/js/vis-network-aux.js b/static/js/vis-network-aux.js new file mode 100644 index 0000000..d47b29b --- /dev/null +++ b/static/js/vis-network-aux.js @@ -0,0 +1,130 @@ +function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +$_network = {}; + +// Auxiliar function to fit a network to the screen +$_network.fitToScreen = function (network) { + var options = { + offset: { x: 0, y: 0 }, + duration: 1000, + easingFunction: "easeInOutQuad", + }; + network.fit({ animation: options }); +} + +// Default options for a network +$_network.defaultOptions = { + layout: { + randomSeed: 1 + }, + interaction: { + hover: true + }, + manipulation: { + enabled: false, + }, + groups: { + internal: { + shape: "dot", + size: 30, + font: { + size: 16, + face: "Tahoma", + color: "#ffffff", + }, + borderWidth: 3, + shadow: true, + color:{ + border: "#0077B6", + background: "#fafafa", + highlight: { + border: "#E77D22", + background: "#fafafa", + }, + hover: { + border: "#0077B6", + background: "#fefefe", + }, + } + }, + external: { + shape: "dot", + shapeProperties: { + borderDashes: [5, 5], + }, + size: 20, + font: { + size: 14, + face: "Tahoma", + color: "#ffffff", + }, + borderWidth: 2, + shadow: true, + color:{ + border: "#809FFF", + background: "#fafafa", + highlight: { + border: "#E77D22", + background: "#fafafa", + }, + hover: { + border: "#809FFF", + background: "#fefefe", + }, + } + }, + }, + nodes: { + shapeProperties: { + interpolation: false // 'true' for intensive zooming + }, + shape: "dot", + size: 30, + font: { + size: 16, + face: "Tahoma", + color: "#ffffff", + }, + borderWidth: 2, + shadow: true, + color:{ + border: "#222222", + background: "#666666", + highlight: { + border: "#E77D22", + background: "#E77D22", + }, + hover: { + border: "#222222", + background: "#666666", + }, + } + }, + edges: { + arrows: { + to: { enabled: true, scaleFactor: 1, type: "arrow" }, + }, + width: 2, + shadow: true, + color: { + color: "#0077B6", + highlight: "#E77D22", + hover: "#0077B6", + opacity: 0.7, + }, + smooth: { + type: "dynamic", // might need to change to "continuous" when there are too many nodes + //type: "continuous", + }, + }, + physics: { + stabilization: false, + barnesHut: { + gravitationalConstant: -5000, + springConstant: 0.001, + springLength: 200, + }, + }, +}; diff --git a/templates/clients/clients_cl.html b/templates/clients/clients_cl.html index d6d42e4..66d8cec 100644 --- a/templates/clients/clients_cl.html +++ b/templates/clients/clients_cl.html @@ -9,8 +9,21 @@

Consensus clients< -
-
+
+
+
+

+ +

+
+
+
+
+
+
+
@@ -38,7 +51,7 @@

Consensus clients< {{ range $i, $client := .Clients }} {{ $client.Index }} - + {{ $client.PeerID }} @@ -158,6 +171,7 @@

Consensus clients< {{ define "js" }} + +