forked from getsentry/sentry-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
51 lines (37 loc) · 1.23 KB
/
Copy pathindex.html
File metadata and controls
51 lines (37 loc) · 1.23 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
<meta name="sentry-trace" content="{{ sentry_trace }}" />
<script src="https://browser.sentry-cdn.com/6.17.7/bundle.js" crossorigin="anonymous"></script>
{{ sentry_trace }}
<!-- TODO: Replace with real tracing integration once it's fixed -->
<script src="/static/tracing.js" crossorigin="anonymous"></script>
<script>
Sentry.init({
dsn: "{{ sentry_dsn }}",
integrations: [
new Sentry.Integrations.Tracing({ tracingOrigins: ['']})
],
debug: true
});
async function compute() {
const res = await fetch(
"/compute/" +
document.getElementsByName('b64str')[0].value
);
const token = await res.text();
wait(token);
return false;
}
async function wait(token) {
const res = await fetch("/wait/" + token);
const line = await res.text();
document.getElementById('output').innerHTML += line;
document.getElementById('output').innerHTML += '<br>';
if(line == "NONE") {
window.setTimeout(function() { wait(token) }, 500);
}
}
</script>
<p>Decode your base64 string as a service (that calls another service)</p>
<input value='aGVsbG8gd29ybGQK' name=b64str> A base64 string<br>
<input type=button value=submit onclick="compute()">
<p>Output:</p>
<pre id=output />