Add skeletons for device data stream

application-manager-new
charithag 10 years ago
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);
}
%>

@ -23,6 +23,10 @@
"url": "/api/group/*", "url": "/api/group/*",
"path": "/api/group-api.jag" "path": "/api/group-api.jag"
}, },
{
"url": "/api/event/*",
"path": "/api/event-api.jag"
},
{ {
"url": "/api/operation/*", "url": "/api/operation/*",
"path": "/api/operation-api.jag" "path": "/api/operation-api.jag"

@ -118,6 +118,8 @@
</div> </div>
</div> </div>
<!-- /dashboard --> <!-- /dashboard -->
<div id="event-stream" style="padding-top: 20px;">
</div>
{{/zone}} {{/zone}}
{{#zone "bottomJs"}} {{#zone "bottomJs"}}
<script src="{{self.publicURL}}/js/dashboard.js"></script> <script src="{{self.publicURL}}/js/dashboard.js"></script>

@ -14,4 +14,6 @@ $(document).ready(function(){
updateStats("/iotserver/api/group/all/count", "#group-count"); updateStats("/iotserver/api/group/all/count", "#group-count");
updateStats("/iotserver/api/policies/count", "#policy-count"); updateStats("/iotserver/api/policies/count", "#policy-count");
updateStats("/iotserver/api/users/count", "#user-count"); updateStats("/iotserver/api/users/count", "#user-count");
}); });

@ -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…
Cancel
Save