forked from community/product-iots
parent
29a96847b9
commit
c9b9270407
@ -0,0 +1,52 @@
|
|||||||
|
<%
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||||
|
*
|
||||||
|
* WSO2 Inc. licenses this file to you under the Apache License,
|
||||||
|
* Version 2.0 (the "License"); you may not use this file except
|
||||||
|
* in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||||
|
* either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var uri = request.getRequestURI();
|
||||||
|
var uriMatcher = new URIMatcher(String(uri));
|
||||||
|
|
||||||
|
var log = new Log("api/event-api.jag");
|
||||||
|
|
||||||
|
var constants = require("/modules/constants.js");
|
||||||
|
var dcProps = require('/config/dc-props.js').config();
|
||||||
|
|
||||||
|
var carbon = require('carbon');
|
||||||
|
var carbonHttpsServletTransport = carbon.server.address('https');
|
||||||
|
var deviceCloudService = carbonHttpsServletTransport + "/devicecloud/group_manager";
|
||||||
|
|
||||||
|
var user = session.get(constants.USER_SESSION_KEY);
|
||||||
|
if (!user) {
|
||||||
|
response.sendRedirect(dcProps.appContext + "login?#login-required");
|
||||||
|
exit();//stop execution
|
||||||
|
}
|
||||||
|
|
||||||
|
var result;
|
||||||
|
var endPoint;
|
||||||
|
var data;
|
||||||
|
var groupId;
|
||||||
|
|
||||||
|
if (uriMatcher.match("/{context}/api/event/list")) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// returning the result.
|
||||||
|
if (result) {
|
||||||
|
response.status = result.xhr.status;
|
||||||
|
print(result.data);
|
||||||
|
}
|
||||||
|
%>
|
@ -0,0 +1,27 @@
|
|||||||
|
<div class="col-lg-12 wr-secondary-bar" style="width: inherit;">
|
||||||
|
<label class="device-id device-select" style="font-size: 20px; margin-bottom: 0px;">
|
||||||
|
Device Data Stream
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<div style="padding: 15px;">
|
||||||
|
<table class="table table-striped table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="20%">Time</th>
|
||||||
|
<th width="20%">Device</th>
|
||||||
|
<th>Activity</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{{#each data}}
|
||||||
|
<tr>
|
||||||
|
<td width="20%">{{time}}</td>
|
||||||
|
<td width="20%">{{deviceIdentifier}}</td>
|
||||||
|
<td>{{activity}}</td>
|
||||||
|
</tr>
|
||||||
|
{{/each}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
Loading…
Reference in new issue