/
hello.tpl
297 lines (242 loc) · 9.53 KB
/
hello.tpl
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
<!doctype html>
<html><head>
<meta charset="utf-8">
<title>BLOCKS - Bootstrap Dashboard Theme</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Carlos Alvarez - Alvarez.is">
<!-- Le styles -->
<link href="assets/css/bootstrap.css" rel="stylesheet">
<link href="assets/css/main.css" rel="stylesheet">
<link href="assets/css/font-style.css" rel="stylesheet">
<link href="assets/css/flexslider.css" rel="stylesheet">
<link href="assets/css/font-awesome.css" rel="stylesheet">
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<style type="text/css">
body {
padding-top: 60px;
}
</style>
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="assets/ico/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
<!-- Google Fonts call. Font Used Open Sans & Raleway -->
<link href="http://fonts.googleapis.com/css?family=Raleway:400,300" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css">
<script type="text/javascript">
$(document).ready(function () {
$("#btn-blog-next").click(function () {
$('#blogCarousel').carousel('next')
});
$("#btn-blog-prev").click(function () {
$('#blogCarousel').carousel('prev')
});
$("#btn-client-next").click(function () {
$('#clientCarousel').carousel('next')
});
$("#btn-client-prev").click(function () {
$('#clientCarousel').carousel('prev')
});
});
$(window).load(function(){
$('.flexslider').flexslider({
animation: "slide",
slideshow: true,
start: function(slider){
$('body').removeClass('loading');
}
});
});
</script>
</head>
<body>
<!-- NAVIGATION MENU -->
<div class="navbar-nav navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html"><img src="assets/img/logo30.png" alt=""> ROVER System - Mission to Mars</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<!-- Add something here -->
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<div class="container">
<!-- FIRST ROW OF BLOCKS -->
<div class="row">
<!-- USER PROFILE BLOCK -->
<div class="col-sm-3 col-lg-3">
<div class="dash-unit">
<dtitle>Astronauta</dtitle>
<hr>
<div class="thumbnail">
<img src="assets/img/armstrong80x80.jpg" alt="Marcel Newman" class="img-circle">
</div><!-- /thumbnail -->
<h1>Neil Armstrong</h1>
<h3>ID: #2123</h3>
</div>
</div>
<!-- DONUT CHART BLOCK -->
<div class="col-sm-3 col-lg-3">
<div class="dash-unit">
<dtitle>Temperatura Externa</dtitle>
<hr>
<div class="info-user">
<i class="fa fa-tachometer fa-2x" aria-hidden="true"></i>
</div>
<div class="cont">
<p><bold id="temp">27°</bold></p>
<p>Celsius</p>
</div>
</div>
</div>
<!-- DONUT CHART BLOCK -->
<div class="col-sm-3 col-lg-3">
<div class="dash-unit">
<dtitle>Incidência de Raios</dtitle>
<hr>
<div class="info-user">
<i class="fa fa-sun-o fa-2x" aria-hidden="true"></i>
</div>
<div class="cont">
<p><bold id="lux">1600</bold></p>
<p>Radiancia</p>
</div>
</div>
</div>
<div class="col-sm-3 col-lg-3">
<!-- LOCAL TIME BLOCK -->
<div class="half-unit">
<dtitle>Status da Missão</dtitle>
<hr>
<div class="cont">
<span id="status" style="font-size: 20px;" class="label label-success">Em andamento</span>
</div>
</div>
<div class="half-unit">
<dtitle>Hora em Marte</dtitle>
<hr>
<div class="clockcenter">
<digiclock>12:45:25</digiclock>
</div>
</div>
</div>
</div><!-- /row -->
<div class="row">
<!-- USER PROFILE BLOCK -->
<div class="col-sm-4 col-lg-4">
<div class="dash-unit">
<dtitle>Controle</dtitle>
<hr>
<div class="cont" style="width: 100%; height: 100%;">
<button id="success" class="btn btn-success noty" style="width: 80%; height: 80%;" data-noty-options="{"text":"Informação enviada.","layout":"topRight","type":"success"}"><span style="font-size: 20px;">Prosseguir</span></button>
</div>
</div>
</div>
<!-- DONUT CHART BLOCK -->
<div class="col-sm-4 col-lg-4">
<div class="dash-unit">
<dtitle>Controle</dtitle>
<hr>
<div class="cont" style="width: 100%; height: 100%;">
<button id="warning" class="btn btn-warning noty" style="width: 80%; height: 80%;" data-noty-options="{"text":"Informação enviada.","layout":"topRight","type":"success"}"><span style="font-size: 20px;">Atenção</span></button>
</div>
</div>
</div>
<!-- DONUT CHART BLOCK -->
<div class="col-sm-4 col-lg-4">
<div class="dash-unit">
<dtitle>Controle</dtitle>
<hr>
<div class="cont" style="width: 100%; height: 100%;">
<button id="danger" class="btn btn-danger noty" style="width: 80%; height: 80%;" data-noty-options="{"text":"Informação enviada.","layout":"topRight","type":"success"}"><span style="font-size: 20px;">Abortar</span></button>
</div>
</div>
</div>
</div><!-- /row -->
</div> <!-- /container -->
<div id="footerwrap">
<footer class="clearfix"></footer>
<div class="container">
<div class="row">
<div class="col-sm-12 col-lg-12">
<p><img src="assets/img/logo.png" alt=""></p>
<p>Blocks Dashboard Theme - Crafted With Love - Copyright 2013</p>
</div>
</div><!-- /row -->
</div><!-- /container -->
</div><!-- /footerwrap -->
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="assets/js/bootstrap.js"></script>
<!-- NOTY JAVASCRIPT -->
<script type="text/javascript" src="assets/js/noty/jquery.noty.js"></script>
<script type="text/javascript" src="assets/js/noty/layouts/top.js"></script>
<script type="text/javascript" src="assets/js/noty/layouts/topLeft.js"></script>
<script type="text/javascript" src="assets/js/noty/layouts/topRight.js"></script>
<script type="text/javascript" src="assets/js/noty/layouts/topCenter.js"></script>
<!-- You can add more layouts if you want -->
<script type="text/javascript" src="assets/js/noty/themes/default.js"></script>
<!-- <script type="text/javascript" src="assets/js/dash-noty.js"></script> This is a Noty bubble when you init the theme-->
<script src="assets/js/jquery.flexslider.js" type="text/javascript"></script>
<script type="text/javascript" src="assets/js/admin.js"></script>
<script type="text/javascript">
$("#success").click(function() {
$("#success").addClass("disabled");
$("#warning").removeClass("disabled");
$("#danger").removeClass("disabled");
$("#status").removeClass();
$("#status").addClass("label label-success");
$("#status").text("Em andamento");
$.post( "/comandos", { comando: "G"})
.done(function( data ) {
});
});
$( "#warning" ).click(function() {
$("#warning").addClass("disabled");
$("#success").removeClass("disabled");
$("#danger").removeClass("disabled");
$("#status").removeClass();
$("#status").addClass("label label-warning");
$("#status").text("Atenção");
$.post( "/comandos", { comando: "Y"})
.done(function( data ) {
});
});
$( "#danger" ).click(function() {
$("#danger").addClass("disabled");
$("#success").removeClass("disabled");
$("#warning").removeClass("disabled");
$("#status").removeClass();
$("#status").addClass("label label-danger");
$( "#status").text("Abortada");
$.post( "/comandos", { comando: "R"})
.done(function( data ) {
});
});
setInterval(function(){
$.getJSON( "/medidas", function( data ) {
$.each( data, function( key, val ) {
$("#temp").text(val.temp);
$("#lux").text(val.lux);
});
});
}
, 10000);
</script>
</body></html>