-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
44 lines (43 loc) · 1.6 KB
/
index.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
44
<html>
<head>
<title>Workspace API Sample</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" "text/css" href="./fonts/PressStart2P.css"></link>
<link rel="stylesheet" "text/css" href="./style.css"></link>
<script type="text/javascript" src="./libs/axios.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
</head>
<body>
<div id="app">
<h1>Home</h1>
<div class="separator"></div>
<button id="login">Login</button>
<button id="sendMessage">Send Message</button>
</div>
<script type="text/javascript">
// Login (on success it will redirect you to authenticated.html page)
login = function () {
window.location = '/login'
}
document.getElementById('login').addEventListener('click', () => {
login();
});
$("#sendMessage").on('click',function(){
axios.get('/voice/calls')
.then(function (response) {
// On success
console.log(response);
// formatted = new JSONFormatter(response.data, 2, JSONFormatterConfig);
// logsContainer.appendChild(formatted.render());
})
.catch(function (error) {
// On error
console.log(error);
// formatted = new JSONFormatter(error, 2, JSONFormatterConfig);
// logsContainer.appendChild(formatted.render());
})
})
</script>
</body>
</html>