-
Notifications
You must be signed in to change notification settings - Fork 515
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Remove incorrect usage from flask helper example (#1434)
- Loading branch information
Showing
1 changed file
with
22 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,47 @@ | ||
<meta name="sentry-trace" content="{{ sentry_trace }}" /> | ||
<script src="https://browser.sentry-cdn.com/6.17.7/bundle.js" crossorigin="anonymous"></script> | ||
{{ sentry_trace }} | ||
<script | ||
src="https://browser.sentry-cdn.com/6.17.7/bundle.js" | ||
crossorigin="anonymous" | ||
></script> | ||
<!-- TODO: Replace with real tracing integration once it's fixed --> | ||
<script src="/static/tracing.js" crossorigin="anonymous"></script> | ||
|
||
<script> | ||
|
||
|
||
|
||
Sentry.init({ | ||
Sentry.init({ | ||
dsn: "{{ sentry_dsn }}", | ||
integrations: [ | ||
new Sentry.Integrations.Tracing({ tracingOrigins: ['']}) | ||
], | ||
debug: true | ||
}); | ||
integrations: [new Sentry.Integrations.Tracing({tracingOrigins: [""]})], | ||
debug: true, | ||
}); | ||
|
||
async function compute() { | ||
async function compute() { | ||
const res = await fetch( | ||
"/compute/" + | ||
document.getElementsByName('b64str')[0].value | ||
"/compute/" + document.getElementsByName("b64str")[0].value, | ||
); | ||
|
||
const token = await res.text(); | ||
wait(token); | ||
|
||
return false; | ||
} | ||
} | ||
|
||
async function wait(token) { | ||
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>'; | ||
document.getElementById("output").innerHTML += line; | ||
document.getElementById("output").innerHTML += "<br>"; | ||
|
||
if(line == "NONE") { | ||
window.setTimeout(function() { wait(token) }, 500); | ||
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()"> | ||
<input value="aGVsbG8gd29ybGQK" name="b64str" /> A base64 string<br /> | ||
<input type="button" value="submit" onclick="compute()" /> | ||
|
||
<p>Output:</p> | ||
<pre id=output /> | ||
<pre id="output" /> |