-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathimport.html
43 lines (43 loc) · 1.44 KB
/
import.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
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Import to OpenBazaar</title>
<meta name="author" content="Kirill Zdornyy">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.1.1/normalize.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css">
<script src="http://code.jquery.com/jquery-2.2.3.min.js"></script>
<script>
var i = setInterval(function(){
$.get( "/status", function(data) {
if (data.finished === false) {
$("#result").html("Imported " + data.count + " listings.");
} else {
if (data.success === true) {
$("#result").html("Successfully imported " + data.count + " listings!");
} else {
$("#result").html("Failed to import listings. Please check the console for errors.");
}
clearInterval(i);
}
});
}, 1000);
</script>
</head>
<body>
<div class="container">
<div class="row" style="margin-top: 5rem">
<div class="one-half column">
<h1>Import to OpenBazaar</h1>
</div>
</div>
<div class="row">
<div class="one-half column">
<h4>Import status</h4>
<p id="result"></p>
</div>
</div>
</div>
</body>
</html>