-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
447 lines (412 loc) · 20.2 KB
/
index.html
File metadata and controls
447 lines (412 loc) · 20.2 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
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
<!-- index.html -->
<html>
<head>
<meta charset="UTF-8">
<script src="dist/bundle.min.js?v=VERSIONNUMBER" type="text/javascript"></script>
</head>
<body>
<div class="top-wrapper">
<div class="simple-browsing">
<div class="form">
<div class="row">
<label>First block to fetch</label>
<input title="The first block to fetch when a new 'Load' is done." type="text" id="block-input" value="9cc36071ccb902a1de7e0d21a2c176d73894b1cf88ae4cc2ba4c95cd76f474f3"/>
</div>
<div class="navigation">
<div class="row">
<button title="Makes a new paginate request, starting from the block specified in 'First block to fetch'." id="load-button">Load</button>
</div>
<div class="row">
<button title="Makes a new paginate request to load the previous blocks of the chain." data-reversed="true" id="backward-button">◀︎</button>
<div class="numb">
<label>Blocks/page</label>
<input title="'Blocks/page' defines the number of blocks each page will contain. A page is an asynchronous call sent back from the node." type="number" id="num-blocks-input" value="5">
</div>
<button title="Makes a new paginate request to load the next blocks of the chain." id="forward-button">▶︎</button>
</div>
<div class="row">
<div class="numb">
<label>num pages</label>
<input title="'num pages' defines the number of asynchronous call the server will sent back, with each call containing 'Blocks/page' blocks." type="number" id="num-pages-input" value="1">
</div>
</div>
</div>
</div>
<div class="options">
<div class="numb">
<label>log each</label>
<input title="'log each' defines the interval at which blocks are printed. A value of 2 means that we print one block out of two. A value of 1 means all the blocks are printed." type="number" id="log-each-input" value="1">
</div>
<a style="display: none" id="download-link">Download results</a>
<div class="numb">
<label>print details</label>
<input title="Prints the details of each block. Is also used to display more details for the status." id="details-input" type="checkbox">
</div>
<div class="numb">
<label>print roster</label>
<input title="If checked, the roster is printed on each block, as well as when the status is fetched." id="roster-input" type="checkbox">
</div>
<div class="numb">
<label>repeat cmd</label>
<input title="The number of times the 'Load', '◀︎', or '▶︎' is repeated. This features is mostly interesting from the code side." type="number" id="repeat-cmd-input" value="0">
</div>
<button title="Fetch the latest block starting from the latest loaded block, or the one specified in the 'First block to fetch' input if none have been loaded yet. If follows the highest forward link on each block, until reaching a block with no forward link." id="get-latest">Get latest</button>
<button title="Fetch the roster from the latest block and display the status of each node. Takes into account the 'print details' and 'print roster' options. If no blocks have been loaded, it gets the latest block starting from the one in the 'First block to fetch' input. Otherwise, it takes the latest block loaded." id="get-status">Get status</button>
</div>
</div>
<div class="sep"></div>
<div class="bypros">
<textarea title="Here you can submit an SQL query" type="text" id="sql-input" cols="33" rows="9">select
encode(hash, 'hex')
as hash,
block_id
from cothority.block
limit 2;</textarea>
<button title="Submit the request. The result will be shown bellow" id="submit-sql">Submit</button>
<div class="small-stuff">
<p class="link"><a href="https://github.com/dedis/cothority/blob/master/bypros/storage/sqlstore/schema/schema.sql" target="_blank">See the schema</a></p>
<button title="Open the admin panel, which offers admin functionalities" id="admin-panel">Open admin panel</button>
</div>
</div>
<div class="sep"></div>
<div class="text-wrapper">
<h1>
Columbus
<svg id="boat" viewBox="0 0 566 521" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-miterlimit:1.5;">
<g transform="matrix(1.25327,0,0,1.25327,-97.5205,-75.0507)">
<g transform="matrix(0.854965,0,0,0.854965,-1821.45,-1283.8)">
<path class="boat1" d="M2293.92,1849.74C2295.15,1847.97 2297.2,1846.8 2299.52,1846.8C2363.45,1846.8 2427.44,1844.25 2491.89,1844.25C2519.05,1844.25 2549.46,1850.2 2575.85,1846.38C2587.84,1844.65 2605.82,1840.49 2621.94,1838.55C2633.75,1837.14 2644.65,1837.01 2652.08,1839.29C2654.22,1839.94 2657.35,1841.87 2657.09,1846.8C2657.01,1848.16 2656.29,1851 2655.06,1854.29C2652.86,1860.2 2649.2,1868.23 2648.6,1869.43C2639.75,1887.13 2631.76,1906.14 2623.54,1923.25C2623.02,1924.33 2621.79,1926.34 2618.71,1927.02C2617.66,1927.26 2613.07,1927.11 2612.5,1927.11C2593.93,1927.11 2575.2,1929.78 2556.38,1929.78C2486.25,1929.78 2415.07,1936.87 2345.51,1936.87C2344.61,1936.89 2341.11,1936.96 2340.16,1936.68C2338.76,1936.27 2337.79,1935.57 2337.13,1934.92C2334.97,1932.8 2332.38,1928.68 2329.68,1923.2C2324.41,1912.55 2318.01,1896.13 2310.94,1882.65C2307.84,1876.73 2304.64,1871.4 2301.32,1867.57C2299.25,1865.2 2297.51,1863.2 2295.37,1863.2C2291.61,1863.2 2288.56,1860.15 2288.56,1856.39C2288.56,1853.13 2290.86,1850.41 2293.92,1849.74ZM2641.67,1851.19C2636.44,1850.81 2630.18,1851.27 2623.56,1852.07C2607.56,1853.99 2589.7,1858.13 2577.79,1859.85C2550.8,1863.76 2519.68,1857.86 2491.89,1857.86C2431.97,1857.86 2372.45,1860.07 2313.01,1860.38C2314.54,1862.3 2316.06,1864.46 2317.55,1866.8C2325.08,1878.68 2332.1,1895.67 2338.03,1908.9C2340.74,1914.96 2343.05,1920.18 2345.13,1923.28L2345.5,1923.26C2415.07,1923.26 2486.25,1916.16 2556.38,1916.16C2575.2,1916.16 2593.93,1913.5 2612.5,1913.5L2613.1,1913.52C2620.71,1897.37 2628.2,1879.79 2636.42,1863.34C2636.91,1862.36 2639.66,1856.32 2641.67,1851.19Z"/>
</g>
<g transform="matrix(0.854965,0,0,0.854965,-1821.45,-1283.8)">
<path class="boat2" d="M2474.5,1611.71C2476.33,1610.22 2478.39,1610.28 2479.52,1610.42C2480.11,1610.49 2482.79,1610.84 2484.36,1613.14C2486.23,1614.7 2487.66,1617.07 2488.55,1620.22C2489.53,1623.72 2489.82,1628.55 2490.04,1633.13C2490.19,1636.22 2490.13,1639.16 2490.84,1640.81C2499.06,1660.03 2506.65,1677.62 2519.03,1695C2533.39,1715.19 2544.3,1730.72 2562.62,1748.54C2570.75,1756.45 2584.57,1771.93 2592.65,1780.04C2594.98,1782.39 2597.91,1783.82 2600.35,1785.9C2601.57,1786.33 2603.45,1787.02 2603.89,1787.38C2605.47,1788.68 2606.18,1790.27 2606.39,1791.87C2606.6,1793.48 2606.52,1795.71 2604.21,1797.92C2602.46,1799.59 2598.11,1801.18 2592.45,1801.37C2584.34,1801.63 2572.56,1800.13 2570.51,1800.13C2540.65,1800.13 2510.51,1796.68 2480.69,1797.35C2482.62,1821.45 2484.3,1845.7 2484.3,1869.88C2484.3,1871.71 2484.15,1880.5 2483.52,1886.75C2483.15,1890.38 2482.45,1893.33 2481.79,1894.68C2480.05,1898.29 2477.18,1899.08 2475.1,1899.08C2471.35,1899.08 2468.3,1896.03 2468.3,1892.27C2468.3,1890.78 2468.78,1889.4 2469.59,1888.29C2470.56,1883.28 2470.68,1871.88 2470.68,1869.88C2470.68,1845.9 2469,1821.86 2467.08,1797.97C2439.93,1799.86 2413.06,1801.87 2386.12,1806.57C2384,1806.94 2368.08,1811.97 2360.36,1812.58C2355.74,1812.95 2352.58,1811.46 2351.23,1810.13C2350.42,1809.34 2347.11,1804.99 2351.14,1800.38C2353.1,1798.14 2364.47,1788.48 2365.12,1787.94C2373.47,1780.96 2380.8,1772.22 2388.59,1764.42C2409.26,1743.76 2419.85,1714.77 2433.18,1689.52C2441.93,1672.95 2453.15,1657.79 2461.49,1641.1C2464.39,1635.31 2466.5,1629.32 2469.39,1623.54C2470.03,1622.25 2470.77,1620.87 2471.15,1619.36L2471.19,1619.19C2471.07,1618.7 2471.01,1618.18 2471.01,1617.65C2471.01,1615.1 2472.42,1612.87 2474.5,1611.71ZM2473.59,1885.63L2473.51,1885.65L2473.69,1885.61L2473.59,1885.63ZM2474.2,1885.53C2474.05,1885.55 2473.9,1885.57 2473.76,1885.6L2474.07,1885.54L2474.2,1885.53ZM2474.6,1885.48L2474.51,1885.49L2474.67,1885.48L2474.6,1885.48ZM2466.03,1661.04C2459.14,1672.65 2451.54,1683.9 2445.22,1695.88C2431.26,1722.3 2419.84,1752.43 2398.22,1774.05C2391.45,1780.82 2384.99,1788.24 2377.98,1794.73C2380.89,1793.91 2383.09,1793.28 2383.78,1793.16C2411.24,1788.37 2438.63,1786.3 2466.3,1784.38C2465.87,1759.58 2470.89,1735.09 2469.04,1710.33C2468.18,1698.88 2465.84,1677.85 2466.03,1661.04ZM2480.18,1650.49C2479.41,1655.42 2479.35,1661.79 2479.55,1668.57C2479.97,1683.28 2481.89,1699.78 2482.61,1709.31C2484.48,1734.21 2479.37,1758.83 2479.88,1783.77C2509.97,1783.08 2540.38,1786.52 2570.51,1786.52C2571.66,1786.52 2575.86,1786.99 2580.76,1787.35C2572.59,1778.92 2560.51,1765.47 2553.13,1758.3C2534.16,1739.84 2522.82,1723.8 2507.94,1702.9C2495.91,1685.99 2488.13,1668.95 2480.18,1650.49Z"/>
</g>
<g transform="matrix(1.11224,0,0,1.23919,-2520.38,-1975.13)">
<path class="boat3" d="M2376.68,1941.72L2403.04,1919.22L2427.99,1939.52L2453.33,1916.9L2475.01,1938.85L2496.67,1917.26L2521,1939.36L2542.72,1917.48L2566.55,1934.8L2590.6,1912.71L2616.11,1935.2L2638.91,1907.68L2657.81,1929.08L2682.52,1905.62L2697.44,1921.47" style="fill:none;stroke:rgb(165,199,238);stroke-width:8.58px;"/>
</g>
</g>
</svg>
</h1>
<p id="stats-info"></p>
</div>
</div>
<div class="sql-admin">
<div class="left">
<p>Bypros administration pannel</p>
<button id="sql-start-follow">Start following</button>
<button id="sql-stop-follow">Stop following</button>
<div class="form" style="flex-direction: row; padding: 15px 0; width: initial;">
<div class="row">
<label>Block ID</label>
<input title="Enter there the block from which to catchup" type="text" value="9cc36071ccb902a1de7e0d21a2c176d73894b1cf88ae4cc2ba4c95cd76f474f3" id="catchup-input"/>
</div>
<div class="row" style="padding-bottom: 7px">
<div class="numb">
<label>Block interval update</label>
<input title="Interval at which we receive update messages" type="number" value="10" id="catchup-update-input"/>
</div>
</div>
<button title="status the catchup action" id="sql-catchup">Catchup</button>
</div>
<div class="form" style="flex-direction: row; padding: 15px 0;">
<div class="row">
<label>Password</label>
<input title="The admin password" type="text" id="admin-password-input"/>
</div>
</div>
</div>
<div class="sep"></div>
<div class="right">
<p>Roster</p>
<textarea rows=7 cols=30 id="roster-textarea"></textarea>
<button id="roster-load" title="use another roster">Load</button>
</div>
</div>
<div id="status" class="custom-scroll"></div>
<div class="keep-scroll-holder">
<input class="checkbox-round" id="keep-scroll" type="checkbox" name="scroll" checked>
<label for="keep-scroll">follow logs</label>
</div>
<a href="https://github.com/dedis/columbus-cli" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#000; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
</body>
<script>
jsapp.sayHi();
</script>
<style>
body, html {
overflow-y: hidden;
position: relative;
font-family: sans-serif;
margin: 0;
height: 100%;
}
#status {
overflow-y: scroll;
position: absolute;
z-index: 100;
top: 250px;
right: 0;
bottom: 0px;
left: 0;
padding: 20px 0 30px 0;
background: #1e1e1e;
transition: all 300ms linear;
}
#status.admin-open {
top: 500px;
box-shadow: 0px 0px 20px #0000008f;
}
#status .log-entry-wrapper {
display: flex;
flex-direct: row;
justify-content: flex-start;
align-items: flex-start;
padding: 15px 0;
}
#status .log-entry-wrapper .log-info {
width: 50px;
text-align: left;
color: #daba74;
flex-shrink: 0;
padding: 0 0 0 20px;
}
#status .log-entry-wrapper pre {
display: flex;
flex-direction: row;
padding: 0 0 10px 10px;
margin: 0;
color: #92ddff;
font-weight: 300;
}
#status .log-entry-wrapper pre p {
margin: 0 0 2px 0;
}
div.keep-scroll-holder {
position: fixed;
bottom: 50px;
right: 100px;
background: #fff;
color: #000;
padding: 7px 20px;
border-radius: 20px;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
z-index: 200;
}
.checkbox-round {
width: 1.5em;
height: 1.5em;
background-color: white;
border-radius: 50%;
vertical-align: middle;
border: 2px solid #daba74;
-webkit-appearance: none;
outline: none;
cursor: pointer;
margin: 0 10px 0 0;
}
.checkbox-round:checked {
background-color: greenyellow;
border: none;
}
div.top-wrapper {
display: flex;
flex-direction: row;
align-items: center;
}
div.simple-browsing {
display: flex;
flex-direction: row;
height: 250px;
align-items: center;
}
div.sep {
border-left: 1px solid #1e1e1e;
padding: 0 30px 0 0;
margin: 0 0 0 30px;
height: 100px;
}
div.bypros {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
div.bypros textarea {
padding: 10px;
}
div.bypros .small-stuff {
display: flex;
flex-direction: row;
padding: 2px 7px;
margin: 5px 0;
align-items: center;
}
div.bypros p.link {
margin: 0;
padding: 0;
font-size: 10px;
}
div.bypros button {
background: none;
cursor: pointer;
}
div.bypros button#admin-panel {
font-size: 8px;
color: #aaa;
border: none;
}
div.form {
width: 400px;
display: flex;
flex-direction: column;
align-items: center;
}
div.form div.row:nth-child(1) {
display: flex;
flex-direction: column;
align-items: center;
font-size: 9px;
color: #777;
margin: 0 0 7px 0;
}
div.form div.row:nth-child(1) input {
padding: 10px;
width: 300px;
}
div.navigation {
display: flex;
flex-direction: column;
align-items: center;
}
div.navigation div.row:nth-child(2) {
display: flex;
flex-direction: row;
justify: center;
}
div.numb {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 9px;
color: #777;
min-width: 70px;
}
div.numb input:not([type='checkbox']) {
width: 70px;
padding: 5px 7px;
}
button#load-button {
padding: 10px 25px;
}
button#backward-button, button#forward-button {
padding: 0 15px;
margin: 0 15px;
}
div.options {
display: flex;
flex-direction: column;
align-items: center;
}
button#get-latest, button#get-status {
margin: 5px 0;
padding: 2px 7px;
background: none;
cursor: pointer;
}
button#get-latest:active, button#get-status:active{
background: rgba(128, 128, 128, 0.36);
}
p#stats-info {
height: 30px;
}
div.text-wrapper {
align-self: flex-start;
padding: 30px 0;
}
div.text-wrapper h1 {
padding: 0;
margin: 0;
display: flex;
flex-direction: center;
align-items: center;
}
div.text-wrapper svg {
width: 50px;
padding: 0 0 0 10px;
fill: #00b5e3;
}
/* Admin panel */
div.sql-admin {
padding: 20px;
display: flex;
flex-direction: row;
align-items: center;
}
div.sql-admin .right {
display: flex;
flex-direction: column;
padding: 0 20px;
}
.custom-scroll::-webkit-scrollbar {
width: 8px;
height: 8px;
}
/* Track */
.custom-scroll::-webkit-scrollbar-track {
background: rgba(241, 241, 241, 0.18);
}
.custom-scroll::-webkit-scrollbar-track:hover {
}
/* Handle */
.custom-scroll::-webkit-scrollbar-thumb {
background: #00b5e3;
}
/* Handle on hover */
.custom-scroll::-webkit-scrollbar-thumb:hover {
background: #63dfff;
}
@keyframes popup {
0% {
transform: translateY(0px);
}
37% {
transform: translateY(40px);
}
100% {
transform: translateY(0px);
}
}
@keyframes waves {
0% {
transform: translateX(0px);
transform: translateY(0px);
}
37% {
transform: translateX(-40px);
transform: translateY(10px);
}
80% {
transform: translateX(20px);
}
100% {
transform: translateX(0px);
transform: translateY(0px);
}
}
svg#boat:hover .boat1, svg.anime .boat1 {
animation: popup 1.5s 0s linear infinite;
}
svg#boat:hover .boat2, svg.anime .boat2 {
animation: popup 1.5s .2s linear infinite;
}
svg#boat:hover .boat3, svg.anime .boat3 {
animation: waves 1.5s 0s linear infinite;
}
svg#boat:hover, svg.anime {
fill: grey !important;
}
</style>
</html>