Files
BLE-mesh-sim/index.html
T

92 lines
5.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BLE-mesh SIM</title>
<script type="text/javascript" src="vis-network.min.js"></script>
<script type="text/javascript" src="simhelper.js"></script>
<script type="text/javascript" src="CompleteMoveOnEdge.js"></script>
<link rel="stylesheet" id="styleSheet" href="style.css">
</head>
<body>
<div id="rowFlex" style="display: flex; flex-direction: row; align-items: start; justify-content: center; width: 100%; height: 100%;">
<div id="propertyViewer">
<div id="propertyViewerHeader">Simulation Properties</div>
<hr style="width: 100%;"/>
<details id="simpleSettings">
<summary>Simple Settings</summary>
<div id="simpleSettingsContent">
<label for="ttl">TTL</label>
<input type="number" id="ttl" value="5" autocomplete="off">
<label for="dropPenalty">Drop Penalty</label>
<input type="number" id="dropPenalty" value="1.2" autocomplete="off">
<label for="connectionDistance">Connection Distance</label>
<input type="number" id="connectionDistance" value="250" autocomplete="off">
</div>
</details>
<details id="hardwareConstraints">
<summary>Hardware Constraints</summary>
<div id="hardwareConstraintsContent">
<label for="maxOutgoingConnections">Max Outgoing Connections</label>
<input type="number" id="maxOutgoingConnections" value="3" autocomplete="off">
<label for="maxIncomingConnections">Max Incoming Connections</label>
<input type="number" id="maxIncomingConnections" value="3" autocomplete="off">
</div>
</details>
<details id="engineSettings">
<summary>Engine Settings</summary>
<div id="engineSettingsContent">
<label for="updateInterval">Update Interval</label>
<input type="number" id="updateInterval" value="10" autocomplete="off">
<label for="simSpeed">Simulation Speed (x)</label>
<input type="number" id="simSpeed" value="1" min="0.1" step="0.1" autocomplete="off">
</div>
</details>
<div style="display: flex; flex-grow: 1; height: auto;"></div>
<hr style="width: 100%;"/>
<div id="darkModeContainer">
<input type="checkbox" id="darkMode" class="simToggle">
<label for="darkMode">Dark Mode</label>
</div>
</div>
<div id="centerColumn" style="display: flex; flex-direction: column; align-items: center; justify-content: center; width: 70%; height: 100%; margin: 0 auto;">
<div id="simContainer"></div>
<div id="controlContainer">
<div id="controlButtons">
<button id="addNode" class="controlButton">Add Node</button>
<button id="sendPacket" class="controlButton">Send Packet</button>
<button id="resetTTLColors" class="controlButton">Reset TTL Colors</button>
<button id="createRandomGraph" class="controlButton">Create Random Network</button>
</div>
<div id="simToggles">
<input type="checkbox" id="showRanges" class="simToggle">
<label for="showRanges">Show Ranges</label>
<input type="checkbox" id="showTTL" class="simToggle" checked>
<label for="showTTL">Show TTL Colors</label>
<input type="checkbox" id="quickPlace" class="simToggle">
<label for="quickPlace">Quick Place</label>
</div>
</div>
</div>
<div id="connectionViewer">
<details id="incomingConnections"><summary>Incoming Connections</summary></details>
<details id="outgoingConnections"><summary>Outgoing Connections</summary></details>
</div>
<div id="randomGraphModal">
<div id="randomGraphModalContent">
<label for="randomGraphNodes">Number of Nodes</label>
<input type="number" id="randomGraphNodes" value="10" autocomplete="off">
<button id="createRandomGraphConfirm" class="controlButton">Create</button>
</div>
</div>
<div id="warningModal">
<div id="warningModalContent">
<p id="warningModalMessage"></p>
<button id="warningModalConfirm" class="controlButton" onclick="document.getElementById('warningModal').style.display = 'none';">OK</button>
</div>
</div>
</div>
<script type="text/javascript" src="script.js"></script>
</body>
</html>