-
Notifications
You must be signed in to change notification settings - Fork 0
/
result.html
33 lines (32 loc) · 1.05 KB
/
result.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
<!doctype html>
<head>
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script>
function fetchdata(){
$.ajax({
url: '/status/{{ uid }}',
type: 'get',
success: function(data) {
if(data.status === "complete") {
$("#result").html(data.result);
} else {
setTimeout(fetchdata, 1000);
}
},
error: function(xhr, status, error) {
var errorMessage = xhr.status + ': ' + xhr.statusText
alert('Error!! ' + errorMessage);
}
});
}
$(document).ready(function(){
setTimeout(fetchdata, 1000);
});
</script>
</head>
<body>
<h1>Job {{ uid }}</h1>
<div id="result">
Please wait, result will soon be ready...
</div>
</body>