-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsalt.html
More file actions
58 lines (44 loc) · 1.52 KB
/
salt.html
File metadata and controls
58 lines (44 loc) · 1.52 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
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="/js/main.js"></script>
</head>
<body>
<h1>UID2 Env - Salt Management</h1>
<a href="/">Back</a>
<br>
<br>
<h3>Inputs</h3>
<label for="minAges">Min age for salt rotation in seconds, you can specify min,max and we rotate salts in
between:</label>
<input type="text" id="minAges" name="minAges">
<label for="fraction">Fraction of salts to rotate (between 0 and 1):</label>
<input type="text" id="fraction" name="fraction">
<br>
<br>
<h3>Operations</h3>
<ul>
<li class="ro-sem" style="display: none"><a href="#" id="doSnapshots">List Salt Snapshots</a></li>
<li class="ro-sem" style="display: none"><a href="#" id="doRotate">Rotate second level salts (SUPER_USER)</a></li>
</ul>
<br>
<h3>Output</h3>
<div id="output">
<pre id="errorOutput"></pre>
<pre id="standardOutput"></pre>
</div>
<script language="JavaScript">
$(document).ready(function () {
$('#doSnapshots').on('click', function () {
doApiCall('GET', '/api/salt/snapshots', '#standardOutput', '#errorOutput');
});
$('#doRotate').on('click', function () {
var minAges = encodeURIComponent($('#minAges').val());
var fraction = encodeURIComponent($('#fraction').val());
var url = '/api/salt/rotate?min_ages_in_seconds=' + minAges + '&fraction=' + fraction;
doApiCall('POST', url, '#standardOutput', '#errorOutput');
});
});
</script>
</body>
</html>