mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-13 19:05:36 +02:00
76 lines
No EOL
2.3 KiB
HTML
76 lines
No EOL
2.3 KiB
HTML
<!--
|
|
// users.html
|
|
//
|
|
// Created by Faye Li on 18 Jan 2017
|
|
// Copyright 2017 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
-->
|
|
<html>
|
|
<head>
|
|
<title>Users Online</title>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet">
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
width: 100%;
|
|
font-family: 'Raleway', sans-serif;
|
|
color: white;
|
|
background: linear-gradient(#2b2b2b, #0f212e);
|
|
}
|
|
|
|
.top-bar {
|
|
width: 100%;
|
|
height: 90px;
|
|
background: linear-gradient(#2b2b2b, #1e1e1e);
|
|
}
|
|
|
|
.top-bar .container{
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-left: 30px;
|
|
margin-right: 30px;
|
|
height: 100%;
|
|
}
|
|
|
|
.main {
|
|
padding: 30px;
|
|
}
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="top-bar">
|
|
<div class="container">
|
|
<div>Users Online</div>
|
|
<button type="button" onclick="pollUsers()">Refresh</button>
|
|
</div>
|
|
</div>
|
|
<div class="main">
|
|
<div id="dev-div"></div>
|
|
</div>
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
|
<script>
|
|
var METAVERSE_API_URL = "https://metaverse.highfidelity.com/api/v1/users?status=online";
|
|
|
|
function pollUsers() {
|
|
$("#dev-div").html("polling users");
|
|
$.ajax({
|
|
url: METAVERSE_API_URL,
|
|
success: function(response) {
|
|
$("#dev-div").html(JSON.stringify(response.data));
|
|
console.log(response);
|
|
}
|
|
});
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
$("#dev-div").html("ready");
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |