Subversion Repository Public Repository

gpstest

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
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>    
	    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	    <meta charset="utf-8">
	    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	    <meta content="Admin Dashboard" name="description" />
	    <meta content="ThemeDesign" name="author" />
	    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
	    <title>Bestray</title>	    
		<%  
	    	String email=session.getAttribute("email").toString();  
	    	String password=session.getAttribute("password").toString();  
		%>
		<!--<link rel="shortcut icon" href="assets/images/favicon.ico">-->	
	    <!--Morris Chart CSS -->
	    <link rel="stylesheet" href="assets/plugins/morris/morris.css">
	    <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
	    <link href="assets/alertifyjs/css/alertify.min.css" rel="stylesheet" type="text/css">
		<link href="assets/alertifyjs/css/themes/default.min.css" rel="stylesheet" type="text/css">
	    <link href="assets/css/icons.css" rel="stylesheet" type="text/css">
	    <link href="assets/css/style.css" rel="stylesheet" type="text/css">
	    
<script src="assets/js/jquery.min.js"></script>	    
<script type="text/javascript">
	$(function(){
		var eml = '<%= email%>';
		//console.log(eml);
		$('#loader_map').hide();
		var url = '';
		//url = 'http://23.92.61.79:8082/api/devices/';
		var position_url = 'http://23.92.61.79:8082/api/positions/';
		var device_url = 'http://23.92.61.79:8082/api/devices';
		
		var username = "admin";
		var password = "admin";

		$('#loader_left').show();
		$.ajax({
			type: 'get',
			url: position_url,
			headers: {
				"Accept": "application/json",         
				"Content-Type": "application/json",
				"Authorization": "Basic " + btoa(username + ":" + password)
			},
			'dataType': 'json',
			success: function (response) {
				//console.log('Success: '+JSON.stringify(response));
				
				// server + 4.30 = local time (india)
				// eithi padiba postio url -> ignition aau motion paiba paiin      <---------------------
				
				
				$.each(response, function(k,v){
					var id = v.id;
					var name = v.name;
					var uniqueId = v.uniqueId;
					var status = v.status;
					console.log('###Deviceid: '+id+'Success: '+JSON.stringify(response));
					
					var html =  '<div><a href="#">'+
								'<div class="device_details_name">'+name+'</div>'+
								'<div class="device_details_othr">'+status+'</div>'+
								'<div class="device_details_othr">'+uniqueId+'</div>'+
								//'<div>'+id+'</div>'+
								'</a></div>';
					$("#ul_device_list").append($(" <li class='device_li_"+status+"' id='"+id+"^"+uniqueId+"^"+name+"^"+status+"'> ").html(html));
				});
				$('#loader_left').hide();
			},
			error: function(response){
				console.log('Error: '+JSON.stringify(response));
				$('#loader_left').hide();
			}
		});
		
		$(document).on("click", "#ul_device_list li", function(event) {
	      var li_id = $(this).attr('id');
	      var id = li_id.split('^')[0];
	      var uniqueId = li_id.split('^')[1];
	      var name = li_id.split('^')[2];
	      var status = li_id.split('^')[3];
	      $('#loader_map').show();
	      $.ajax({
				async:false,
				cache:false,
				dataType:"json",
				type: "POST",  
				url: "map.jsp",
				data:{id:id,uniqueId:uniqueId,name:name,status:status},
				success: function (response) {
					$('#loader_map').hide();
					console.log('Success: ');
					$('#div_map').html("");
					$('#div_map').html(response.responseText);
				},
				error: function (response) {
					$('#loader_map').hide();
					console.log('Error: ');
					$('#div_map').html("");
					$('#div_map').html(response.responseText);
				}
			});
	    });
		
	});
	
	
</script>
    </head>
    <body class="fixed-left">
        <!-- Begin page -->
        <div id="wrapper">
        
            <!-- Top Bar Start -->
            <jsp:include page="topbar.jsp" />
            <!-- Top Bar End -->
            
            <!-- Left Sidebar Start -->
            <jsp:include page="leftsidemenu.jsp" />
            <!-- Left Sidebar End -->

            <!-- Start right Content here -->
            <div class="content-page">
                <!-- Start content -->
                <div class="content">
                    <div class="">
                        <div class="page-header-title">
                            <h4 class="page-title">Live Tracking</h4>
                        </div>
                    </div>
				<div class="page-content-wrapper ">
					<div class="container">
						<!-- ------------------------ -->
						<div class="row">
							<div class="col-md-12">
								<div class="panel panel-primary" style="background: #323c48;">
									<div class="panel-body">
										<div class="row">
										
										<div class="col-sm-2">
												<div class="wrapper">
													<a href="multitracking"> <i class="ti-layers-alt "></i></a>
													<div class="tooltip">
														<p style="font-weight: bold;">Multi Tracking</p>
													</div>
												</div>
											</div>
											
											<div class="col-sm-2">
												<div class="wrapper">
													<a href="#"> <i
														class="ti-location-arrow" style="color: #e4e444;"></i>
													</a>
													<div class="tooltip">
														<p style="font-weight: bold;">Live Tracking</p>
													</div>
												</div>
											</div>
											
											<div class="col-sm-2">
												<div class="wrapper">
													<a href="tracking_history"> <i class="ti-time"></i></a>
													<div class="tooltip">
														<p style="font-weight: bold;">History Tracking</p>
													</div>
												</div>
											</div>
											
											<div class="col-sm-2">
												<div class="wrapper">
													<a href="livetraversedpath"> <i class="ti-flag-alt "></i></a>
													<div class="tooltip">
														<p style="font-weight: bold;">Traversed Path</p>
													</div>
												</div>
											</div>
											
											
											
											
										</div>
									</div>
								</div>
							</div>
						</div>

						<div class="row">
							<div class="col-md-3">
								<div class="panel panel-primary">
									<div class="panel-body">
										<div class="form-group">
											<div id="loader_left">
												<img id="loader_img_left" alt="Loding ..." src="images/loader.gif" />
											</div>
											<ul id="ul_device_list"></ul>
										</div>
									</div>
								</div>
								<!-- panel-body -->
							</div>
							<div class="col-md-9">
								<div class="panel panel-primary">
									<div class="panel-body">
										<div id="div_map" style="border: 1px solid grey">
											<div id="loader_map" style="disply: none;">
												<img id="loader_img_map" alt="Loding ..." src="images/loader.gif" />
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					
                  			<!-- ------------------------ -->           
                        </div>
                    </div><!-- container -->
                </div> <!-- Page content Wrapper -->
                <!-- content -->
                
            <!-- footer -->
            <jsp:include page="footer.jsp" />
            <!-- footer end -->
            </div>
            <!-- End Right content here -->
 
        <!-- END wrapper -->
        <!-- jQuery  -->
        
        <script src="assets/js/bootstrap.min.js"></script>
        <script src="assets/alertifyjs/alertify.min.js"></script>
        <script src="assets/js/modernizr.min.js"></script>
        <script src="assets/js/detect.js"></script>
        <script src="assets/js/fastclick.js"></script>
        <script src="assets/js/jquery.slimscroll.js"></script>
        <script src="assets/js/jquery.blockUI.js"></script>
        <script src="assets/js/waves.js"></script>
        <script src="assets/js/wow.min.js"></script>
        <script src="assets/js/jquery.nicescroll.js"></script>
        <script src="assets/js/jquery.scrollTo.min.js"></script>
        <!--Morris Chart-->
        <script src="assets/plugins/morris/morris.min.js"></script>
        <script src="assets/plugins/raphael/raphael-min.js"></script>
        <script src="assets/pages/dashborad.js"></script>
        <script src="assets/js/app.js"></script>
    </body>
</html>

Commits for gpstest/WebContent/NewFile.jsp

Diff revisions: vs.
Revision Author Commited Message
1 lingaraj picture lingaraj Sat 24 Nov, 2018 13:04:59 +0000