forked from ongardie/raftscope
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
142 lines (137 loc) · 5.76 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
<!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="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="745" height="400">
<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>
</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">
<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">
<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>
<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>
</body>
</html>