-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
198 lines (192 loc) · 9.96 KB
/
index.html
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Raft Scope</title>
<link href="bootstrap-3.1.1/css/bootstrap.min.css" rel="stylesheet">
<link href="bootstrap-slider/css/bootstrap-slider.css" rel="stylesheet">
<script src="jquery/jquery.min.js"></script>
<script src="bootstrap-3.1.1/js/bootstrap.min.js"></script>
<script src="bootstrap-slider/js/bootstrap-slider.js"></script>
<script src="bootstrap-contextmenu/bootstrap-contextmenu.js"></script>
<script src="util.js"></script>
<script src="raft.js"></script>
<script src="paxos.js"></script>
<script src="pbft.js"></script>
<script src="state.js"></script>
<script src="script.js"></script>
<link href="style.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row" style="margin-top: 20px">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" style="border: 0px solid black" width="1500" height="500">
<defs>
<marker id="TriangleOutM" orient="auto" refX="0.0" refY="0.0" style="overflow:visible">
<path d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z" transform="scale(0.4)" />
</marker>
<marker id="TriangleOutS-RequestVote" orient="auto" refX="0.0" refY="0.0" style="overflow:visible">
<path d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z" transform="scale(0.3)" class="message RequestVote" />
</marker>
<marker id="TriangleOutS-AppendEntries" orient="auto" refX="0.0" refY="0.0" style="overflow:visible">
<path d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z" transform="scale(0.3)" class="message AppendEntries" />
</marker>
<!--Start: Paxos messages arrow head markers-->
<marker id="TriangleOutS-prepare_msg" orient="auto" refX="0.0" refY="0.0" style="overflow:visible">
<path d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z" transform="scale(0.3)" class="message prepare_msg" />
</marker>
<marker id="TriangleOutS-promise_msg" orient="auto" refX="0.0" refY="0.0" style="overflow:visible">
<path d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z" transform="scale(0.3)" class="message promise_msg" />
</marker>
<marker id="TriangleOutS-accept_msg" orient="auto" refX="0.0" refY="0.0" style="overflow:visible">
<path d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z" transform="scale(0.3)" class="message accept_msg" />
</marker>
<marker id="TriangleOutS-nack" orient="auto" refX="0.0" refY="0.0" style="overflow:visible">
<path d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z" transform="scale(0.3)" class="message nack" />
</marker>
<marker id="TriangleOutS-accepted_msg" orient="auto" refX="0.0" refY="0.0" style="overflow:visible">
<path d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z" transform="scale(0.3)" class="message accepted_msg" />
</marker>
<marker id="TriangleOutS-client_request" orient="auto" refX="0.0" refY="0.0" style="overflow:visible">
<path d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z" transform="scale(0.3)" class="message client_request" />
</marker>
<marker id="TriangleOutS-client_reply" orient="auto" refX="0.0" refY="0.0" style="overflow:visible">
<path d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z" transform="scale(0.3)" class="message client_reply" />
</marker>
<!--End: Paxos messages arrow head markers-->
<!--Start: PBFT messages arrow head markers-->
<marker id="TriangleOutS-pre_prepare_msg" orient="auto" refX="0.0" refY="0.0" style="overflow:visible">
<path d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z" transform="scale(0.3)" class="message pre_prepare_msg" />
</marker>
<marker id="TriangleOutS-pbft_prepare_msg" orient="auto" refX="0.0" refY="0.0" style="overflow:visible">
<path d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z" transform="scale(0.3)" class="message pbft_prepare_msg" />
</marker>
<marker id="TriangleOutS-commit_msg" orient="auto" refX="0.0" refY="0.0" style="overflow:visible">
<path d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z" transform="scale(0.3)" class="message commit_msg" />
</marker>
<marker id="TriangleOutS-view_change_msg" orient="auto" refX="0.0" refY="0.0" style="overflow:visible">
<path d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z" transform="scale(0.3)" class="message view_change_msg" />
</marker>
<marker id="TriangleOutS-new_view_msg" orient="auto" refX="0.0" refY="0.0" style="overflow:visible">
<path d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z" transform="scale(0.3)" class="message new_view_msg" />
</marker>
<marker id="TriangleOutS-checkpoint_request" orient="auto" refX="0.0" refY="0.0" style="overflow:visible">
<path d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z" transform="scale(0.3)" class="message checkpoint_request" />
</marker>
<!--End: PBFT messages arrow head markers-->
</defs>
<circle id="ring" />
<g id="pause" class="resumed">
<rect width="1" height="3" x="-1.25" y="-1.5" />
<rect width="1" height="3" x=".25" y="-1.5" />
</g>
<g id="messages"></g>
<g id="servers"></g>
<g class="logs"></g>
</svg>
</div>
<div class="row" style="margin-top: 20px" hidden>
<a id="time-button" href="#"><span id="time-icon" class="glyphicon glyphicon-time" style="font-size: 24pt; vertical-align: middle" data-toggle="tooltip" title="Timeline; click to pause/play"></span></a>
<input id="time" style="width: 650px" data-slider-id='timeSlider' type="text" data-slider-min="0" data-slider-max="1000" data-slider-step="1" data-slider-value="0" />
</div>
<div class="row" style="margin-top: 20px" hidden>
<span id="speed-icon" class="glyphicon glyphicon-dashboard" style="font-size: 24pt; vertical-align: middle" data-toggle="tooltip" title="Simulation speed"></span>
<input id="speed" style="width: 650px" data-slider-id='speedSlider' type="text" data-slider-min="0" data-slider-max="3" data-slider-step=".01" data-slider-value="2" />
</div>
<div class="row" style="margin-top: 20px" hidden>
<span id="lock-icon" class="glyphicon glyphicon-lock" style="font-size: 24pt; vertical-align: middle; display: none" data-toggle="tooltip" title="livelock activated"></span>
</div>
</div>
<div id="modal-details" class="modal" tabindex="-1" data-keyboard="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div id="modal-help" class="modal" tabindex="-1" data-keyboard="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Keyboard shortcuts</h4>
</div>
<div class="modal-body">
<table class="table">
<tr>
<td><kbd> </kbd> / <kbd>.</kbd></td>
<td>Pause/unpause</td>
</tr>
<tr>
<td><kbd>?</kbd></td>
<td>Help</td>
</tr>
<tr>
<td><kbd>C</kbd></td>
<td>Submit client request to leader of highest term, if any</td>
</tr>
<tr>
<td><kbd>R</kbd></td>
<td>Restart leader of highest term, if any</td>
</tr>
<tr>
<td><kbd>T</kbd></td>
<td>Adjust election timers to avoid a split vote</td>
</tr>
<tr>
<td><kbd>A</kbd></td>
<td>Align election timers to encourage a split vote</td>
</tr>
<tr>
<td><kbd>L</kbd></td>
<td>Set up log replication start scenario</td>
</tr>
<tr>
<td><kbd>B</kbd></td>
<td>Resume all servers</td>
</tr>
<tr>
<td><kbd>F</kbd></td>
<td>Fork playback, discarding future</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div id="modal-section" class="modal" tabindex="-1" data-keyboard="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<div class="text-center" style="padding: 200px 0">
<h1></h1>
<h2></h2>
</div>
</div>
</div>
</div>
</div>
<div id="context-menu">
<ul class="dropdown-menu" role="menu">
</ul>
</div>
<div id="algorithm-selection">
<ul>
<li><a href="javascript:util.select(raft,'raft');">Raft</a></li>
<li><a href="javascript:util.select(paxos,'paxos');">Paxos</a></li>
<li><a href="javascript:util.select(pbft,'pbft');">PBFT</a></li>
</ul>
</div>
</body>
</html>