-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
115 lines (114 loc) · 6.55 KB
/
index.html
File metadata and controls
115 lines (114 loc) · 6.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!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="maxConnections">Max Connections</label>
<input type="number" id="maxConnections" value="6" 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>
<details id="visualizationSettings">
<summary>Visualization Settings</summary>
<div id="visualizationSettingsContent">
<div id="visualizationSettingsToggles">
<input type="checkbox" id="showRanges">
<label for="showRanges">Show Ranges</label>
</div>
<div id="visualizationSettingsToggles">
<input type="checkbox" id="showTTL" checked>
<label for="showTTL">Show TTL Colors</label>
</div>
<div id="visualizationSettingsToggles">
<input type="checkbox" id="darkMode" checked>
<label for="darkMode">Dark Mode</label>
</div>
</div>
</details>
<div style="display: flex; flex-grow: 1; height: auto;"></div>
<hr style="width: 100%;"/>
<div id="darkModeContainer">
<input type="checkbox" id="quickPlace" class="simToggle">
<label for="quickPlace">Quick Place</label>
</div>
<button id="cancelMarkNeighbor">Cancel</button>
</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="routingProgressContainer" style="display: none;">
<progress id="routingProgress" value="0" max="100"></progress>
</div>
<div id="controlContainer">
<div id="controlButtons">
<button id="addNode" class="controlButton">Add Node</button>
<button id="sendPacket" class="controlButton">Send Flood Packet</button>
<button id="quickPacket" class="controlButton">Quick Flood Packet</button>
<button id="resetTTLColors" class="controlButton">Reset TTL Colors</button>
<button id="createRoutingTables" class="controlButton">Create Routing Tables</button>
<button id="createRandomGraph" class="controlButton">Create Network</button>
</div>
</div>
</div>
<div id="connectionViewer">
<details id="connections"><summary>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">
<div id="randomGraphModalButtons" style="display: flex; flex-direction: row; gap: 10px; justify-content: end; align-items: center;">
<button id="createRandomGraphCancel" class="controlButton" onclick="document.getElementById('randomGraphModal').style.display = 'none';">Cancel</button>
<button id="createRandomGraphConfirm" class="controlButton">Create</button>
</div>
</div>
</div>
<div id="warningModal">
<div id="warningModalContent">
<p id="warningModalMessage"></p>
<div id="warningModalCustomContent"></div>
<button id="warningModalConfirm" class="controlButton" onclick="document.getElementById('warningModal').style.display = 'none';">OK</button>
</div>
</div>
<div id="successModal">
<div id="successModalContent">
<p id="successModalMessage"></p>
<button id="successModalConfirm" class="controlButton" onclick="document.getElementById('successModal').style.display = 'none';">OK</button>
</div>
</div>
</div>
<script type="text/javascript" src="script.js"></script>
</body>
</html>