thusithakalugamage 8 years ago
commit c37ad8f56d

@ -20,8 +20,8 @@ package org.wso2.carbon.device.mgt.iot.androidsense.service.impl;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.analytics.dataservice.commons.SORT;
import org.wso2.carbon.analytics.dataservice.commons.SortByField; import org.wso2.carbon.analytics.dataservice.commons.SortByField;
import org.wso2.carbon.analytics.dataservice.commons.SortType;
import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException; import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException;
import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException; import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException;
@ -194,7 +194,7 @@ public class AndroidSenseServiceImpl implements AndroidSenseService {
List<SensorRecord> sensorDatas; List<SensorRecord> sensorDatas;
if (!sensor.equals(AndroidSenseConstants.SENSOR_WORDCOUNT)) { if (!sensor.equals(AndroidSenseConstants.SENSOR_WORDCOUNT)) {
List<SortByField> sortByFields = new ArrayList<>(); List<SortByField> sortByFields = new ArrayList<>();
SortByField sortByField = new SortByField("time", SORT.ASC, false); SortByField sortByField = new SortByField("time", SortType.ASC);
sortByFields.add(sortByField); sortByFields.add(sortByField);
sensorDatas = APIUtil.getAllEventsForDevice(sensorTableName, query, sortByFields); sensorDatas = APIUtil.getAllEventsForDevice(sensorTableName, query, sortByFields);
} else { } else {

@ -17,16 +17,31 @@
*/ */
function onRequest(context) { function onRequest(context) {
var log = new Log("stats.js");
var carbonServer = require("carbon").server;
var device = context.unit.params.device; var device = context.unit.params.device;
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"]; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var constants = require("/app/modules/constants.js"); var constants = require("/app/modules/constants.js");
var websocketEndpoint = devicemgtProps["httpsURL"].replace("https", "wss");
var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER); var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss");
var token = ""; var jwtService = carbonServer.osgiService(
if (tokenPair) { 'org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService');
token = tokenPair.accessToken; var jwtClient = jwtService.getJWTClient();
var encodedClientKeys = session.get(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"]);
if (encodedClientKeys) {
var tokenUtil = require("/app/modules/oauth/token-handler-utils.js")["utils"];
var resp = tokenUtil.decode(encodedClientKeys).split(":");
var deviceParam = "{\"scope\":\"stats\",\"deviceIdentifiers\":[{\"id\":\"" + device.deviceIdentifier
+ "\", \"type\":\"" + device.type + "\"}]}";
var encodedScope = tokenUtil.encode(deviceParam);
var tokenPair = jwtClient.getAccessToken(resp[0], resp[1], context.user.username,"default",
{"device": encodedScope});
var token = "";
if (tokenPair) {
token = tokenPair.accessToken;
}
websocketEndpoint = websocketEndpoint + "/secured-outputui/org.wso2.iot.android.sense/1.0.0?" +
"token="+ token +"&deviceId=" + device.deviceIdentifier + "&deviceType=" + device.type;
} }
websocketEndpoint = websocketEndpoint + "/secured-outputui/org.wso2.iot.android.sense/1.0.0?" + return {"device": device, "websocketEndpoint": websocketEndpoint};
"token="+ token +"&deviceId=" + device.deviceIdentifier + "&deviceType=" + device.type;
return {"device": device, "websocketEndpoint" : websocketEndpoint};
} }

@ -35,27 +35,6 @@ function setPopupMaxHeight() {
function showPopup() { function showPopup() {
$(modalPopup).modal('show'); $(modalPopup).modal('show');
setPopupMaxHeight(); setPopupMaxHeight();
$('#downloadForm').validate({
rules: {
deviceName: {
minlength: 4,
required: true
}
},
highlight: function (element) {
$(element).closest('.control-group').removeClass('success').addClass('error');
},
success: function (element) {
$(element).closest('.control-group').removeClass('error').addClass('success');
$('label[for=deviceName]').remove();
}
});
var deviceType = "";
$('.deviceType').each(function () {
if (this.value != "") {
deviceType = this.value;
}
});
} }
/* /*
@ -81,22 +60,13 @@ function attachEvents() {
* when a user clicks on "Download" link * when a user clicks on "Download" link
* on Device Management page in WSO2 DC Console. * on Device Management page in WSO2 DC Console.
*/ */
$("a.download-link").click(function () { $(".download-link").click(function(){
$(modalPopupContent).html($('#download-device-modal-content').html()); toggleEnrollment();
showPopup();
var deviceName;
$("a#download-device-download-link").click(function () {
$('.new-device-name').each(function () {
if (this.value != "") {
deviceName = this.value;
}
});
$('label[for=deviceName]').remove();
});
$("a#download-device-cancel-link").click(function () {
hidePopup();
});
}); });
function toggleEnrollment(){
$(modalPopupContent).html($("#qr-code-modal").html());
generateQRCode(modalPopupContent + " .qr-code");
showPopup();
}
} }

@ -60,21 +60,6 @@
<i class="fw fw-mobile fw-inverse fw-lg"></i> Enroll Device</a> <i class="fw fw-mobile fw-inverse fw-lg"></i> Enroll Device</a>
<br/><br/> <br/><br/>
<div id="download-device-modal-content-links" class="hide">
<div class="modal-content">
<div class="row">
<div class="col-md-7 col-centered center-container">
<h3>Please download the file from following link(Press CTRL+C).</h3>
<br/>
<div>
<input id="download-device-url" style="color:#3f3f3f;padding:5px"
type="text" value="" placeholder="Type here" size="60">
</div>
</div>
</div>
</div>
</div>
<div id="device-400-content" class="hide"> <div id="device-400-content" class="hide">
<div class="modal-content"> <div class="modal-content">
<div class="row"> <div class="row">
@ -242,35 +227,85 @@
</div> </div>
<div id="qr-code-modal" data-enrollment-url="{{hostName}}{{@unit.publicUri}}/asset/androidsense.apk" class="hidden"> <div id="qr-code-modal" data-enrollment-url="{{hostName}}{{@unit.publicUri}}/asset/androidsense.apk" class="hidden">
<div class="content"> <div class="modal-header">
<div class="row"> <h4 class="pull-left modal-title">
<div class="col-lg-5 col-md-6 col-centered"> <span class="fw-stack">
<h3>Scan QR code to start enrollment</h3> <i class="fw fw-mobile fw-stack-2x"></i>
<p>Please scan the QR code using your mobile device to retrieve enrollment URL.</p> <span class="fw-stack fw-move-right fw-move-bottom">
<div class="panel panel-default"> <i class="fw fw-ring fw-stack-2x"></i>
<div class="panel-body col-centered"> <i class="fw fw-circle fw-stack-2x fw-stroke text-info"></i>
<div class="qr-code"></div> <i class="fw fw-add fw-stack-1x fw-inverse"></i>
</div> </span>
</span>
&nbsp;&nbsp;Add your new mobile device to {{@app.conf.appName}}
</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fw fw-cancel"></i></button>
</div>
<hr>
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
<div class="panel-body col-centered text-center">
<h5>
Please scan the following QR code using your new <b>Android</b>, <b>iPhone</b> or <b>Windows</b> mobile device.
</h5>
<br>
<div class="panel panel-default">
<div class="panel-body">
<div class="qr-code"></div>
</div> </div>
<form id="downloadForm" method="GET"
action="{{hostName}}{{@unit.publicUri}}/asset/androidsense.apk">
<div class="buttons" style="padding-bottom: 0px">
<input class="btn btn-operations" type="submit" value="Download Now">
</div>
</form>
</div> </div>
<br>
<h5>
Not having a QR code scanner in your device?
<br><br>
Try following link
<br><br>
<b>{{hostName}}{{@unit.publicUri}}/asset/androidsense.apk</b>
<br><br>
on your device's Internet browser instead.
</h5>
</div> </div>
</div> </div>
<div id="device-agent-downloading-content" class="hide"> <div class="modal-footer">
<div class="modal-content"> <div class="buttons">
<div class="row"> <a href="javascript:hidePopup()" class="btn-operations btn-default">Ok</a>
<div class="col-md-7 col-centered center-container"> </div>
<h3>Device Agent will downloading shortly.</h3> </div>
</div> </div>
<!--<div class="content">-->
<!--<div class="row">-->
<!--<div class="col-lg-5 col-md-6 col-centered">-->
<!--<h3>Scan QR code to start enrollment</h3>-->
<!--<p>Please scan the QR code using your mobile device to retrieve enrollment URL.</p>-->
<!--<div class="panel panel-default">-->
<!--<div class="panel-body col-centered">-->
<!--<div class="qr-code"></div>-->
<!--<br>-->
<!--<h5>-->
<!--Not having a QR code scanner in your device?-->
<!--<br><br>-->
<!--Try following link-->
<!--<br><br>-->
<!--<b>{{hostName}}/{{@unit.publicUri}}/asset/androidsense.apk</b>-->
<!--<br><br>-->
<!--on your device's Internet browser instead.-->
<!--</h5>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div id="device-agent-downloading-content" class="hide">
<div class="modal-content">
<div class="row">
<div class="col-md-7 col-centered center-container">
<h3>Device Agent will downloading shortly.</h3>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
{{#zone "topCss"}} {{#zone "topCss"}}
{{css "css/styles.css"}} {{css "css/styles.css"}}

@ -19,6 +19,6 @@
function onRequest(context){ function onRequest(context){
var viewModel = {}; var viewModel = {};
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"]; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
viewModel.hostName = devicemgtProps["httpsWebURL"]; viewModel.hostName = devicemgtProps["generalConfig"]["host"];
return viewModel; return viewModel;
} }

@ -21,8 +21,8 @@ package org.wso2.carbon.device.mgt.iot.arduino.service.impl;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.analytics.dataservice.commons.SORT;
import org.wso2.carbon.analytics.dataservice.commons.SortByField; import org.wso2.carbon.analytics.dataservice.commons.SortByField;
import org.wso2.carbon.analytics.dataservice.commons.SortType;
import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException; import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException;
import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService; import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService;
import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey; import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey;
@ -159,7 +159,7 @@ public class ArduinoServiceImpl implements ArduinoService {
String sensorTableName = ArduinoConstants.TEMPERATURE_EVENT_TABLE; String sensorTableName = ArduinoConstants.TEMPERATURE_EVENT_TABLE;
try { try {
List<SortByField> sortByFields = new ArrayList<>(); List<SortByField> sortByFields = new ArrayList<>();
SortByField sortByField = new SortByField("time", SORT.ASC, false); SortByField sortByField = new SortByField("time", SortType.ASC);
sortByFields.add(sortByField); sortByFields.add(sortByField);
List<SensorRecord> sensorRecords = APIUtil.getAllEventsForDevice(sensorTableName, query, sortByFields); List<SensorRecord> sensorRecords = APIUtil.getAllEventsForDevice(sensorTableName, query, sortByFields);
return Response.status(Response.Status.OK.getStatusCode()).entity(sensorRecords).build(); return Response.status(Response.Status.OK.getStatusCode()).entity(sensorRecords).build();

@ -18,16 +18,30 @@
function onRequest(context) { function onRequest(context) {
var log = new Log("stats.js"); var log = new Log("stats.js");
var carbonServer = require("carbon").server;
var device = context.unit.params.device; var device = context.unit.params.device;
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"]; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var constants = require("/app/modules/constants.js"); var constants = require("/app/modules/constants.js");
var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss"); var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss");
var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER); var jwtService = carbonServer.osgiService(
var token = ""; 'org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService');
if (tokenPair) { var jwtClient = jwtService.getJWTClient();
token = tokenPair.accessToken; var encodedClientKeys = session.get(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"]);
if (encodedClientKeys) {
var tokenUtil = require("/app/modules/oauth/token-handler-utils.js")["utils"];
var resp = tokenUtil.decode(encodedClientKeys).split(":");
var deviceParam = "{\"scope\":\"stats\",\"deviceIdentifiers\":[{\"id\":\"" + device.deviceIdentifier
+ "\", \"type\":\"" + device.type + "\"}]}";
var encodedScope = tokenUtil.encode(deviceParam);
var tokenPair = jwtClient.getAccessToken(resp[0], resp[1], context.user.username,"default",
{"device": encodedScope});
var token = "";
if (tokenPair) {
token = tokenPair.accessToken;
}
websocketEndpoint = websocketEndpoint + "/secured-outputui/org.wso2.iot.devices.temperature/1.0.0?" +
"token="+ token +"&deviceId=" + device.deviceIdentifier + "&deviceType=" + device.type;
} }
websocketEndpoint = websocketEndpoint + "/secured-outputui/org.wso2.iot.devices.temperature/1.0.0?" + return {"device": device, "websocketEndpoint": websocketEndpoint};
"token="+ token +"&deviceId=" + device.deviceIdentifier + "&deviceType=" + device.type;
return {"device": device, "websocketEndpoint" : websocketEndpoint};
} }

@ -21,8 +21,8 @@ package org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.analytics.dataservice.commons.SORT;
import org.wso2.carbon.analytics.dataservice.commons.SortByField; import org.wso2.carbon.analytics.dataservice.commons.SortByField;
import org.wso2.carbon.analytics.dataservice.commons.SortType;
import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException; import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException;
import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService; import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService;
import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey; import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey;
@ -121,7 +121,7 @@ public class RaspberryPiServiceImpl implements RaspberryPiService {
return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build(); return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
} }
List<SortByField> sortByFields = new ArrayList<>(); List<SortByField> sortByFields = new ArrayList<>();
SortByField sortByField = new SortByField("time", SORT.ASC, false); SortByField sortByField = new SortByField("time", SortType.ASC);
sortByFields.add(sortByField); sortByFields.add(sortByField);
List<SensorRecord> sensorRecords = APIUtil.getAllEventsForDevice(sensorTableName, query, sortByFields); List<SensorRecord> sensorRecords = APIUtil.getAllEventsForDevice(sensorTableName, query, sortByFields);
return Response.status(Response.Status.OK.getStatusCode()).entity(sensorRecords).build(); return Response.status(Response.Status.OK.getStatusCode()).entity(sensorRecords).build();

@ -18,16 +18,30 @@
function onRequest(context) { function onRequest(context) {
var log = new Log("stats.js"); var log = new Log("stats.js");
var carbonServer = require("carbon").server;
var device = context.unit.params.device; var device = context.unit.params.device;
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"]; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var constants = require("/app/modules/constants.js"); var constants = require("/app/modules/constants.js");
var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss"); var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss");
var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER); var jwtService = carbonServer.osgiService(
var token = ""; 'org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService');
if (tokenPair) { var jwtClient = jwtService.getJWTClient();
token = tokenPair.accessToken; var encodedClientKeys = session.get(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"]);
if (encodedClientKeys) {
var tokenUtil = require("/app/modules/oauth/token-handler-utils.js")["utils"];
var resp = tokenUtil.decode(encodedClientKeys).split(":");
var deviceParam = "{\"scope\":\"stats\",\"deviceIdentifiers\":[{\"id\":\"" + device.deviceIdentifier
+ "\", \"type\":\"" + device.type + "\"}]}";
var encodedScope = tokenUtil.encode(deviceParam);
var tokenPair = jwtClient.getAccessToken(resp[0], resp[1], context.user.username,"default",
{"device": encodedScope});
var token = "";
if (tokenPair) {
token = tokenPair.accessToken;
}
websocketEndpoint = websocketEndpoint + "/secured-outputui/org.wso2.iot.devices.temperature/1.0.0?" +
"token="+ token +"&deviceId=" + device.deviceIdentifier + "&deviceType=" + device.type;
} }
websocketEndpoint = websocketEndpoint + "/secured-outputui/org.wso2.iot.devices.temperature/1.0.0?" + return {"device": device, "websocketEndpoint": websocketEndpoint};
"token="+ token +"&deviceId=" + device.deviceIdentifier + "&deviceType=" + device.type;
return {"device": device, "websocketEndpoint" : websocketEndpoint};
} }

@ -22,8 +22,8 @@ import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.analytics.dataservice.commons.SORT;
import org.wso2.carbon.analytics.dataservice.commons.SortByField; import org.wso2.carbon.analytics.dataservice.commons.SortByField;
import org.wso2.carbon.analytics.dataservice.commons.SortType;
import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException; import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException;
import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService; import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService;
import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey; import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey;
@ -215,7 +215,7 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService {
return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build(); return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
} }
List<SortByField> sortByFields = new ArrayList<>(); List<SortByField> sortByFields = new ArrayList<>();
SortByField sortByField = new SortByField("time", SORT.ASC, false); SortByField sortByField = new SortByField("time", SortType.ASC);
sortByFields.add(sortByField); sortByFields.add(sortByField);
List<SensorRecord> sensorRecords = APIUtil.getAllEventsForDevice(sensorTableName, query, sortByFields); List<SensorRecord> sensorRecords = APIUtil.getAllEventsForDevice(sensorTableName, query, sortByFields);
return Response.status(Response.Status.OK.getStatusCode()).entity(sensorRecords).build(); return Response.status(Response.Status.OK.getStatusCode()).entity(sensorRecords).build();

@ -59,42 +59,60 @@
</a> </a>
<a href="#" class="download-link btn-operations"> <a href="#" class="download-link btn-operations">
<i class="fw fw-download"></i>Download Agent</a> <i class="fw fw-download"></i>Download Agent</a>
<div id="download-device-modal-content" class="hide"> <div id="download-device-modal-content" class="hide">
<div class="modal-content"> <div class="modal-header">
<div class="row"> <h4 class="pull-left modal-title">
<div class="col-md-7 center-container"> <span class="fw-stack">
<h3>Name your device and download the agent from following link.</h3> <i class="fw fw-raspberry fw-stack-2x"></i>
<br/> <span class="fw-stack fw-move-right fw-move-bottom">
<form id="downloadForm" method="GET" <i class="fw fw-ring fw-stack-2x"></i>
action="{{@app.context}}/api/devices/sketch/download"> <i class="fw fw-circle fw-stack-2x fw-stroke text-info"></i>
<div id="invalid-username-error-msg" class="alert alert-danger hidden" <i class="fw fw-add fw-stack-1x fw-inverse"></i>
role="alert"> </span>
<i class="icon fw fw-error"></i><span></span> </span>
</div> &nbsp;&nbsp;Add your new firealarm device to {{@app.conf.appName}}
<div class="control-group"> </h4>
<div class="controls"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fw fw-cancel"></i>
<input class="new-device-name" style="color:#3f3f3f;padding:5px" </button>
type="text" </div>
placeholder="Ex. Lobby_Firealarm" <hr>
name="deviceName" size="60" required> <div class="modal-body add-margin-top-2x add-margin-bottom-2x">
<br/><br/> <div class="panel-body col-centered text-center">
<input type="hidden" class="deviceType" name="deviceType" <h3>Name your device and download the agent from following link.</h3>
value="{{@uriParams.deviceType}}"/> <br />
<input type="radio" name="sketchType" value="virtual_firealarm" <form id="downloadForm" method="GET"
id="virtual_firealarm" action="{{@app.context}}/api/devices/sketch/download">
checked> <div id="invalid-username-error-msg" class="alert alert-danger hidden"
<label for="simple_agent">Simple Agent</label> &nbsp;&nbsp; role="alert">
<input type="radio" name="sketchType" <i class="icon fw fw-error"></i><span></span>
value="virtual_firealarm_advanced" </div>
id="virtual_firealarm_advanced"> <div class="control-group">
<label for="advanced_agent">Advanced Agent</label> <div class="controls">
</div> <input class="new-device-name" style="color:#3f3f3f;padding:5px"
</div> type="text"
<div class="buttons" style="padding-bottom: 0px"> placeholder="Ex. Lobby_Firealarm"
<a class="btn btn-operations" onclick="downloadAgent()">Download Now</a> name="deviceName" size="60" required>
<br /><br />
<input type="hidden" class="deviceType" name="deviceType"
value="{{@uriParams.deviceType}}" />
<input type="radio" name="sketchType" value="virtual_firealarm"
id="virtual_firealarm"
checked>
<label for="simple_agent">Simple Agent</label> &nbsp;&nbsp;
<input type="radio" name="sketchType"
value="virtual_firealarm_advanced"
id="virtual_firealarm_advanced">
<label for="advanced_agent">Advanced Agent</label>
</div> </div>
</form> </div>
</div> </form>
</div>
</div>
<div class="modal-footer">
<div class="buttons" style="padding-bottom: 0px">
<a class="btn btn-operations" onclick="downloadAgent()">Download Now</a>
<a href="javascript:hidePopup()" class="btn-operations btn-default">Cancel</a>
</div> </div>
</div> </div>
</div> </div>
@ -125,7 +143,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="row"> <div class="row">
<div class="col-md-7 col-centered center-container"> <div class="col-md-7 col-centered center-container">
<h3>You have to log in first.</h3><br/> <h3>You have to log in first.</h3><br />
<div class="buttons"> <div class="buttons">
<a href="#" id="device-401-link" class="blue-button"> <a href="#" id="device-401-link" class="blue-button">
@ -143,7 +161,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="row"> <div class="row">
<div class="col-md-7 col-centered center-container"> <div class="col-md-7 col-centered center-container">
<h3>Action not permitted.</h3><br/> <h3>Action not permitted.</h3><br />
<div class="buttons"> <div class="buttons">
<a href="#" id="device-403-link" class="btn-operations"> <a href="#" id="device-403-link" class="btn-operations">
OK OK
@ -157,7 +175,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="row"> <div class="row">
<div class="col-md-7 col-centered center-container"> <div class="col-md-7 col-centered center-container">
<h3>Device Sketch does not exist.</h3><br/> <h3>Device Sketch does not exist.</h3><br />
<div class="buttons"> <div class="buttons">
<a href="#" id="device-409-link" class="btn-operations"> <a href="#" id="device-409-link" class="btn-operations">
@ -172,7 +190,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="row"> <div class="row">
<div class="col-md-7 col-centered center-container"> <div class="col-md-7 col-centered center-container">
<h3>Unexpected error.</h3><br/> <h3>Unexpected error.</h3><br />
<div class="buttons"> <div class="buttons">
<a href="#" id="device-unexpected-error-link" class="btn-operations"> <a href="#" id="device-unexpected-error-link" class="btn-operations">
@ -183,7 +201,7 @@
</div> </div>
</div> </div>
</div> </div>
<br/><br/> <br /><br />
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 padding-double grey-bg"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 padding-double grey-bg">
<h3 class="uppercase">Prepare</h3> <h3 class="uppercase">Prepare</h3>
@ -218,7 +236,7 @@
<img src="{{@unit.publicUri}}/images/schematicsGuide.png" class="img-responsive"> <img src="{{@unit.publicUri}}/images/schematicsGuide.png" class="img-responsive">
</a> </a>
</center> </center>
<br/> <br />
</div> </div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 padding-double"> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 padding-double">
<h3 class="uppercase">Try Out</h3> <h3 class="uppercase">Try Out</h3>
@ -240,7 +258,7 @@
navigating to Device Analytics page. navigating to Device Analytics page.
</li> </li>
</ul> </ul>
<br/> <br />
<p class="grey margin-top">Click on the image to zoom</p> <p class="grey margin-top">Click on the image to zoom</p>
<center> <center>
<a href="{{@unit.publicUri}}/images/myDevices_analytics.png" target="_blank"> <a href="{{@unit.publicUri}}/images/myDevices_analytics.png" target="_blank">

@ -79,7 +79,7 @@
</properties> </properties>
</adviceFile> </adviceFile>
<bundles> <bundles>
<bundleDef>org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.appmgt.mdm.osgiconnector:2.2.2-SNAPSHOT</bundleDef> <bundleDef>org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.appmgt.mdm.osgiconnector:${carbon.devicemgt.plugins.version}</bundleDef>
<bundleDef>com.googlecode.plist:dd-plist:${googlecode.plist.version}</bundleDef> <bundleDef>com.googlecode.plist:dd-plist:${googlecode.plist.version}</bundleDef>
</bundles> </bundles>
<importFeatures> <importFeatures>

@ -1,6 +1,7 @@
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `AD_DEVICE` -- Table `AD_DEVICE`
-- ----------------------------------------------------- -- -----------------------------------------------------
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AD_DEVICE]') AND TYPE IN (N'U'))
CREATE TABLE AD_DEVICE ( CREATE TABLE AD_DEVICE (
DEVICE_ID VARCHAR(45) NOT NULL, DEVICE_ID VARCHAR(45) NOT NULL,
GCM_TOKEN VARCHAR(1000) NULL DEFAULT NULL, GCM_TOKEN VARCHAR(1000) NULL DEFAULT NULL,
@ -21,6 +22,7 @@ CREATE TABLE AD_DEVICE (
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `AD_FEATURE` -- Table `AD_FEATURE`
-- ----------------------------------------------------- -- -----------------------------------------------------
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AD_FEATURE]') AND TYPE IN (N'U'))
CREATE TABLE AD_FEATURE ( CREATE TABLE AD_FEATURE (
ID INT NOT NULL IDENTITY, ID INT NOT NULL IDENTITY,
CODE VARCHAR(45) NOT NULL, CODE VARCHAR(45) NOT NULL,

@ -1,6 +1,7 @@
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `AD_DEVICE` -- Table `AD_DEVICE`
-- ----------------------------------------------------- -- -----------------------------------------------------
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AD_DEVICE]') AND TYPE IN (N'U'))
CREATE TABLE AD_DEVICE ( CREATE TABLE AD_DEVICE (
DEVICE_ID VARCHAR(45) NOT NULL, DEVICE_ID VARCHAR(45) NOT NULL,
GCM_TOKEN VARCHAR(1000) NULL DEFAULT NULL, GCM_TOKEN VARCHAR(1000) NULL DEFAULT NULL,
@ -21,6 +22,7 @@ CREATE TABLE AD_DEVICE (
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `AD_FEATURE` -- Table `AD_FEATURE`
-- ----------------------------------------------------- -- -----------------------------------------------------
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AD_FEATURE]') AND TYPE IN (N'U'))
CREATE TABLE AD_FEATURE ( CREATE TABLE AD_FEATURE (
ID INT NOT NULL IDENTITY, ID INT NOT NULL IDENTITY,
CODE VARCHAR(45) NOT NULL, CODE VARCHAR(45) NOT NULL,

@ -1,6 +1,7 @@
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `IOS_FEATURE` -- Table `IOS_FEATURE`
-- ----------------------------------------------------- -- -----------------------------------------------------
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IOS_FEATURE]') AND TYPE IN (N'U'))
CREATE TABLE IOS_FEATURE ( CREATE TABLE IOS_FEATURE (
ID INT NOT NULL IDENTITY, ID INT NOT NULL IDENTITY,
CODE VARCHAR(45) NOT NULL, CODE VARCHAR(45) NOT NULL,
@ -12,7 +13,8 @@ CREATE TABLE IOS_FEATURE (
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `IOS_DEVICE` -- Table `IOS_DEVICE`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IOS_DEVICE ( IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IOS_DEVICE]') AND TYPE IN (N'U'))
CREATE TABLE IOS_DEVICE (
MOBILE_DEVICE_ID VARCHAR(45) NOT NULL, MOBILE_DEVICE_ID VARCHAR(45) NOT NULL,
APNS_PUSH_TOKEN VARCHAR(100) NULL DEFAULT NULL, APNS_PUSH_TOKEN VARCHAR(100) NULL DEFAULT NULL,
MAGIC_TOKEN VARCHAR(100) NULL DEFAULT NULL, MAGIC_TOKEN VARCHAR(100) NULL DEFAULT NULL,

@ -1,6 +1,7 @@
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `WINDOWS_FEATURE` -- Table `WINDOWS_FEATURE`
-- ----------------------------------------------------- -- -----------------------------------------------------
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[WIN_FEATURE]') AND TYPE IN (N'U'))
CREATE TABLE WIN_FEATURE ( CREATE TABLE WIN_FEATURE (
ID INT NOT NULL IDENTITY, ID INT NOT NULL IDENTITY,
CODE VARCHAR(45) NOT NULL, CODE VARCHAR(45) NOT NULL,
@ -12,7 +13,8 @@ CREATE TABLE WIN_FEATURE (
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `WINDOWS_DEVICE` -- Table `WINDOWS_DEVICE`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE WIN_DEVICE ( IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[WIN_DEVICE]') AND TYPE IN (N'U'))
CREATE TABLE WIN_DEVICE (
DEVICE_ID VARCHAR(45) NOT NULL, DEVICE_ID VARCHAR(45) NOT NULL,
CHANNEL_URI VARCHAR(100) NULL DEFAULT NULL, CHANNEL_URI VARCHAR(100) NULL DEFAULT NULL,
DEVICE_INFO TEXT NULL DEFAULT NULL, DEVICE_INFO TEXT NULL DEFAULT NULL,

@ -1,6 +1,7 @@
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `WINDOWS_FEATURE` -- Table `WINDOWS_FEATURE`
-- ----------------------------------------------------- -- -----------------------------------------------------
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[WIN_FEATURE]') AND TYPE IN (N'U'))
CREATE TABLE WIN_FEATURE ( CREATE TABLE WIN_FEATURE (
ID INT NOT NULL IDENTITY, ID INT NOT NULL IDENTITY,
CODE VARCHAR(45) NOT NULL, CODE VARCHAR(45) NOT NULL,
@ -12,7 +13,8 @@ CREATE TABLE WIN_FEATURE (
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `WINDOWS_DEVICE` -- Table `WINDOWS_DEVICE`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE WIN_DEVICE ( IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[WIN_DEVICE]') AND TYPE IN (N'U'))
CREATE TABLE WIN_DEVICE (
DEVICE_ID VARCHAR(45) NOT NULL, DEVICE_ID VARCHAR(45) NOT NULL,
CHANNEL_URI VARCHAR(100) NULL DEFAULT NULL, CHANNEL_URI VARCHAR(100) NULL DEFAULT NULL,
DEVICE_INFO TEXT NULL DEFAULT NULL, DEVICE_INFO TEXT NULL DEFAULT NULL,

@ -1205,7 +1205,7 @@
<carbon.devicemgt.version>1.2.3-SNAPSHOT</carbon.devicemgt.version> <carbon.devicemgt.version>1.2.3-SNAPSHOT</carbon.devicemgt.version>
<carbon.devicemgt.version.range>[1.1.1, 2.0.0)</carbon.devicemgt.version.range> <carbon.devicemgt.version.range>[1.1.1, 2.0.0)</carbon.devicemgt.version.range>
<!-- Carbon App Management --> <!-- Carbon App Management -->
<carbon.appmgt.version>1.2.4-SNAPSHOT</carbon.appmgt.version> <carbon.appmgt.version>1.2.4-SNAPSHOT</carbon.appmgt.version>
@ -1250,8 +1250,8 @@
<!-- Carbon Analytics --> <!-- Carbon Analytics -->
<carbon.analytics.common.version>5.1.3</carbon.analytics.common.version> <carbon.analytics.common.version>5.1.3</carbon.analytics.common.version>
<carbon.analytics.common.version.range>[5.1.3,6.0.0)</carbon.analytics.common.version.range> <carbon.analytics.common.version.range>[5.1.3,6.0.0)</carbon.analytics.common.version.range>
<carbon.analytics.version>1.0.6-ALPHA</carbon.analytics.version> <carbon.analytics.version>1.2.8</carbon.analytics.version>
<carbon.analytics.version.range>[1.0.5,2.0.0]</carbon.analytics.version.range> <carbon.analytics.version.range>[1.2.8,2.0.0]</carbon.analytics.version.range>
<!-- Third Party Dependencies--> <!-- Third Party Dependencies-->
<spongycastle.version>1.51.0.0</spongycastle.version> <spongycastle.version>1.51.0.0</spongycastle.version>
@ -1264,7 +1264,7 @@
<commons-io.version>2.4</commons-io.version> <commons-io.version>2.4</commons-io.version>
<apache-felix.version>1.0.8</apache-felix.version> <apache-felix.version>1.0.8</apache-felix.version>
<googlecode.plist.version>1.8</googlecode.plist.version> <googlecode.plist.version>1.8</googlecode.plist.version>
<orbit.version.commons-httpclient>3.1.0.wso2v2</orbit.version.commons-httpclient> <orbit.version.commons-httpclient>3.1.0.wso2v2</orbit.version.commons-httpclient>
<!--<commons-codec.wso2.version>1.4.0.wso2v1</commons-codec.wso2.version>--> <!--<commons-codec.wso2.version>1.4.0.wso2v1</commons-codec.wso2.version>-->

Loading…
Cancel
Save