-
Notifications
You must be signed in to change notification settings - Fork 0
/
landing.phtml
84 lines (75 loc) · 3.11 KB
/
landing.phtml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html>
<head>
<title>Tech demo @ack</title>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3-->
<link href="https://storage.googleapis.com/moritz-demo-1138/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" media="screen">
<!-- Google Fonts -->
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,900,200italic,300italic,400italic,600italic,700italic,900italic|Roboto+Condensed:300italic,400italic,700italic,400,300,700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Roboto+Condensed:300italic,400italic,700italic,400,300,700' rel='stylesheet' type='text/css'>
<!-- Template Styles -->
<?//<link href="https://raw.githubusercontent.com/HubSpot/odometer/master/themes/odometer-theme-default.css" rel="stylesheet" media="screen">?>
<link href="https://storage.googleapis.com/moritz-demo-1138/style.css" rel="stylesheet" media="screen">
<link href="css/custom.css" rel="stylesheet" media="screen">
</head>
<body>
<header>
<div class="container">
<div class="row">
<div class="col-md-6">
<img class="img-responsive col-md-12" src="https://storage.googleapis.com/moritz-demo-1138/logo_ack_white_transparent_1.png">
<img class="img-responsive col-md-12" src="https://storage.googleapis.com/moritz-demo-1138/google-cloud-platform-logo_2.png">
</div>
<div style="padding-left:15px" class="col-md-6 right_content">
<h2><i class="fa fa-users"></i> visits: <span id="visits"><?=$i_visits;?></span></h2>
<h2><i class="fa fa-server"></i> nodes: <span id="nodes">nan</span></h2>
<h2><i class="fa fa-th-large"></i> containers: <span id="pods">nan</h2>
<h2><i class="fa fa-globe"></i> <span id="zone" style="font-size: 50px;"><?=$zone;?></span></h2>
</div>
</div>
</div>
</header>
<script src="https://storage.googleapis.com/moritz-demo-1138/jquery.js"></script>
<script src="https://storage.googleapis.com/moritz-demo-1138/bootstrap.min.js"></script>
<?//<script src="https://raw.githubusercontent.com/HubSpot/odometer/v0.4.6/odometer.min.js"></script>?>
<script>
function load_stats() {
$.ajax({
url: 'https://storage.googleapis.com/moritz-demo-1138/data2-eu-west-1d.json',
Type: 'GET',
dataType: 'json',
success: function (data) {
$('#nodes').html(data.nodes);
$('#pods').html(data.pods);
},
error: function(xhr, status, error) {
console.log(status);
}
});
}
function load_visits() {
$.ajax({
url: '/visits',
Type: 'GET',
dataType: 'json',
success: function (data) {
$('#visits').html(data.total_visits);
},
error: function(xhr, status, error) {
console.log(status);
}
});
}
$(document).ready(function(){
load_stats();
window.setInterval(function(){
load_stats();
load_visits();
}, 4000);
});
</script>
</body>
</html>