forked from tmkasun/geo_dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.jag
executable file
·288 lines (242 loc) · 12.3 KB
/
index.jag
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
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>WSO2 Geo Dashboard</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author"
content="WSO2,Inc"/>
<meta name="description"
content="Geo-Dashboard"/>
<meta charset="UTF-8"/>
<meta name="keywords"
content="Wso2,CEP,complex event processor,dashboard,vehicle tracking system"/>
<link rel="icon" type="image/x-icon" href="assets/img/favicon.ico">
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/css/login.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="assets/css/font-awesome.min.css">
<!--bootstrap-application-wizard-->
<link rel="stylesheet" href="assets/css/bootstrap-wizard-lib/bootstrap-wizard.css">
<script src="assets/js/jquery-2.1.1.min.js"></script>
<script src="assets/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="assets/js/login.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<!--bootstrap-application-wizard-->
<script src="assets/js/bootstrap-wizard-lib/bootstrap-wizard.js"></script>
<script>
// TODO: move this js code to proper place most probably app.js
var setupWizard;
// wizard with it's cards initialization.
$(function () {
var options = {submitUrl: "controllers/setup_dashboard.jag"};
setupWizard = $("#setup_dashboard").wizard(options);
});
</script>
</head>
<body id="body_first">
<div class="row fixer">
<div class="col-md-6 col-md-offset-3 text-center">
<h3> WSO2 Geo-Dashboard </h3>
</div>
<div class="row fixer">
<div class="col-md-8 col-md-offset-2 effect8" style="background-color: #D9D9D9;">
<!-- TODO: Implement jagger equelent -->
<% if(session.get("user") === null && session.get("error")){ %>
<div class="alert alert-warning alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">
×
</button>
<% print(session.get("error"));
session.put("error",null);
%>
</div>
<% } %>
<br/>
<div class="row fixer">
<div class="col-md-10">
<form role="form" class="form-horizontal" name="signin" id="login_form"
action="controllers/authentication.jag" method="POST">
<div class="form-group">
<label for="login" class="col-sm-2 control-label">Username</label>
<div class="col-sm-10">
<input class="form-control" onkeyup="check_computer_number(this)" type="text" id="login"
name="username" required="required" placeholder="Username" autofocus/>
</div>
</div>
<div class="form-group">
<label for="password" class="col-sm-2 control-label">Password</label>
<div class="col-sm-10">
<input class="form-control" type="password" name="password" id="password"
required="required" placeholder="Password"/>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary">
<i class="icon-user icon-white"></i> Sign in
</button>
</div>
</div>
</form>
<!-- <img style="display: none" id="loading_image" src="assets/images/images/logins/login_loading.gif" /> -->
</div>
<div class="col-md-2">
<img href="http://www.wso2.com" target="_blank" style="width: 100%" src="assets/img/wso2-logo.png"
id="wso2-log"/>
</div>
</div>
</div>
</div>
</div>
<nav class="navbar navbar-default navbar-fixed-bottom" role="navigation">
<div class="container">
<a class="navbar-brand" href="#">V 1.0.0</a>
<ul class="nav navbar-nav navbar-right">
<li><a onclick="setupWizard.show();return false;">Need a help <i class="fa fa-question-circle"></i>, Try
<span style="color: rgba(168, 0, 148, 1);cursor: pointer;">Setup-Wizard</span></a></li>
</ul>
</div>
</nav>
<div style="display: none;">
<!-- markup for setup dashboard wizard content -->
<!-- TODO: use modular component loading via JQuery, same code has been used in map.jag as well -->
<div class="wizard" id="setup_dashboard" data-title="Setup Geo-Dashboard">
<h1><i class="fa fa-cogs"></i> Setup Geo-Dashboard</h1>
<div class="wizard-card" data-cardname="about">
<h3>About</h3>
<div style="word-wrap: break-word">
<p class="text-info">
This wizard will guide you to configure and setup Wso2 complex event processor and database systems to work with geo-dashboard.
</p>
</div>
</div>
<div class="wizard-card" data-cardname="CEP info">
<h3><sup style="color: red;">*</sup>CEP info</h3>
<form class="form-horizontal" role="form">
<div class="form-group">
<label for="cep-ip" class="col-sm-2 control-label">IP address:</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="cep-ip" id="cep-ip" placeholder="localhost">
</div>
</div>
<div class="form-group">
<label for="cep-port" class="col-sm-2 control-label">port:</label>
<div class="col-sm-10">
<input type="number" class="form-control" name="cep-port" id="cep-port" placeholder="9443">
</div>
</div>
<hr/>
<p class="text-muted" style="font-size: small;">
<sup style="color: red;">*</sup> Require > CEP 4.0 or CEP with websocket output adapter component.
</p>
</form>
</div>
<div class="wizard-card" data-cardname="Mysql conf">
<h3>Mysql conf</h3>
<form class="form-horizontal" role="form">
<div class="form-group">
<label for="mysql-ip" class="col-sm-2 control-label">Server:</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="mysql-ip" id="mysql-ip" placeholder="localhost">
</div>
</div>
<div class="form-group">
<label for="mysql-user" class="col-sm-2 control-label">Username:</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="mysql-user" id="mysql-user" placeholder="root">
</div>
</div>
<div class="form-group">
<label for="mysql-pass" class="col-sm-2 control-label">Password:</label>
<div class="col-sm-10">
<input type="password" class="form-control" name="mysql-pass" id="mysql-pass"
placeholder="root">
</div>
</div>
<div class="form-group">
<label for="mysql-db" class="col-sm-2 control-label">DB Name:</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="mysql-db" id="mysql-db" placeholder="wso2_geo">
</div>
</div>
<hr/>
<p class="text-muted"><a href="conf/setup_dashboard/mysql-config/mysql-config.zip">Download</a> MySql
Configuration and run <b>geo_db_setup.sh</b> with <i>sudo</i> privilages.(Get <a target="_blank"
href="http://dev.mysql.com/downloads/connector/j/">JDBC
Driver</a> if required.)</p>
</form>
</div>
<div class="wizard-card" data-cardname="CEP queries">
<h3>CEP queries</h3>
<div style="word-wrap: break-word">
<p>
<a href="conf/setup_dashboard/cep-config/config-xmls.zip">Download</a> CEP configuration files
(<span
class="text-muted">eventbuilders,eventformatters,executionplans,inputeventadaptors,outputeventadaptors</span>)
and
copy into <br/><b><i>{path_to_cep}/repository/deployment/server/</i></b> directory.
</p>
</div>
<hr/>
<div style="word-wrap: break-word">
<p>
<a href="conf/setup_dashboard/cep-config/streamdefinitions.zip">Download</a> CEP stream definitions
and
append to <br/><b><i>{path_to_cep}/repository/conf/data-bridge/stream-definitions.xml</i></b> file.
</p>
</div>
</div>
<div class="wizard-card" data-cardname="CEP Ext's">
<h3>CEP Extensions</h3>
<div style="word-wrap: break-word">
<p>
<a href="https://github.com/wso2-gpl/siddhi/tree/master/siddhi-extensions/geo">Get (Clone)</a> a
copy of siddhi geo extensions from github and build the necessary extensions and put <i>.jar(s)</i>>
into
<br/><b><i>{path_to_cep}/repository/components/lib/</i></b> directory.
</p>
</div>
<hr/>
<div style="word-wrap: break-word">
<p>
Add the following fully-qualified class name(s) to
<br/><b><i>{path_to_cep}/repository/conf/siddhi/siddhi.extension</i></b> file.<br/>
<code>
org.wso2.cep.geo.notify.NotifyAlert <br/>
org.wso2.cep.geo.functions.EventIdGenerator <br/>
org.wso2.cep.geo.libs.FuseEvents <br/>
org.wso2.cep.geo.libs.executionPlanSubscriber <br/>
org.wso2.cep.geo.proximity.GeoProximity <br/>
org.wso2.cep.geo.GeoIsWithin
</code>
</p>
</div>
</div>
<div class="wizard-card" data-cardname="Update jaggery">
<h3>Update jaggery</h3>
If you get the following error when trying to login, Most probably it is cause by using outdated jaggery
server.
<div class="alert alert-danger" role="alert">
HTTP Status 500 - org.mozzila,javascript.EcmaError: TypeErrorL Cannot find tenantUser in object [object
Object].(/geo_dashboard/controllers/authentication.jag#13)
</div>
Copy <a href="https://github.com/wso2/jaggery-extensions/tree/master/carbon/module/scripts/server">this </a>directory
to your local<br/><b><i>{path_to_jaggery_server}/modules/carbon/scripts/server/</i></b> directory in Jaggery server.
</div>
<!-- begin special status cards below: -->
<div class="wizard-success">
<div class="alert alert-success" role="alert">submission succeeded!</div>
<button onClick="location.reload(true)" type="button" class="btn btn-info"><i class="fa fa-refresh"></i>
Refresh
</button>
</div>
<div class="wizard-error">
<div class="alert alert-warning" role="alert">submission had an error</div>
</div>
<div class="wizard-failure">
<div class="alert alert-danger" role="alert">submission failed</div>
</div>
</div>
</div>
</body>
</html>