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.LogFactory;
import org.wso2.carbon.analytics.dataservice.commons.SORT;
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.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException;
@ -194,7 +194,7 @@ public class AndroidSenseServiceImpl implements AndroidSenseService {
List<SensorRecord> sensorDatas;
if (!sensor.equals(AndroidSenseConstants.SENSOR_WORDCOUNT)) {
List<SortByField> sortByFields = new ArrayList<>();
SortByField sortByField = new SortByField("time", SORT.ASC, false);
SortByField sortByField = new SortByField("time", SortType.ASC);
sortByFields.add(sortByField);
sensorDatas = APIUtil.getAllEventsForDevice(sensorTableName, query, sortByFields);
} else {

@ -17,16 +17,31 @@
*/
function onRequest(context) {
var log = new Log("stats.js");
var carbonServer = require("carbon").server;
var device = context.unit.params.device;
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var constants = require("/app/modules/constants.js");
var websocketEndpoint = devicemgtProps["httpsURL"].replace("https", "wss");
var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER);
var token = "";
if (tokenPair) {
token = tokenPair.accessToken;
var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss");
var jwtService = carbonServer.osgiService(
'org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService');
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?" +
"token="+ token +"&deviceId=" + device.deviceIdentifier + "&deviceType=" + device.type;
return {"device": device, "websocketEndpoint" : websocketEndpoint};
return {"device": device, "websocketEndpoint": websocketEndpoint};
}

@ -35,27 +35,6 @@ function setPopupMaxHeight() {
function showPopup() {
$(modalPopup).modal('show');
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
* on Device Management page in WSO2 DC Console.
*/
$("a.download-link").click(function () {
$(modalPopupContent).html($('#download-device-modal-content').html());
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();
});
$(".download-link").click(function(){
toggleEnrollment();
});
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>
<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 class="modal-content">
<div class="row">
@ -242,35 +227,85 @@
</div>
<div id="qr-code-modal" data-enrollment-url="{{hostName}}{{@unit.publicUri}}/asset/androidsense.apk" class="hidden">
<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>
</div>
<div class="modal-header">
<h4 class="pull-left modal-title">
<span class="fw-stack">
<i class="fw fw-mobile fw-stack-2x"></i>
<span class="fw-stack fw-move-right fw-move-bottom">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-circle fw-stack-2x fw-stroke text-info"></i>
<i class="fw fw-add fw-stack-1x fw-inverse"></i>
</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>
<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>
<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 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 class="modal-footer">
<div class="buttons">
<a href="javascript:hidePopup()" class="btn-operations btn-default">Ok</a>
</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>
{{#zone "topCss"}}
{{css "css/styles.css"}}

@ -19,6 +19,6 @@
function onRequest(context){
var viewModel = {};
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
viewModel.hostName = devicemgtProps["httpsWebURL"];
viewModel.hostName = devicemgtProps["generalConfig"]["host"];
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.logging.Log;
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.SortType;
import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException;
import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService;
import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey;
@ -159,7 +159,7 @@ public class ArduinoServiceImpl implements ArduinoService {
String sensorTableName = ArduinoConstants.TEMPERATURE_EVENT_TABLE;
try {
List<SortByField> sortByFields = new ArrayList<>();
SortByField sortByField = new SortByField("time", SORT.ASC, false);
SortByField sortByField = new SortByField("time", SortType.ASC);
sortByFields.add(sortByField);
List<SensorRecord> sensorRecords = APIUtil.getAllEventsForDevice(sensorTableName, query, sortByFields);
return Response.status(Response.Status.OK.getStatusCode()).entity(sensorRecords).build();

@ -18,16 +18,30 @@
function onRequest(context) {
var log = new Log("stats.js");
var carbonServer = require("carbon").server;
var device = context.unit.params.device;
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var constants = require("/app/modules/constants.js");
var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss");
var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER);
var token = "";
if (tokenPair) {
token = tokenPair.accessToken;
var jwtService = carbonServer.osgiService(
'org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService');
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.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?" +
"token="+ token +"&deviceId=" + device.deviceIdentifier + "&deviceType=" + device.type;
return {"device": device, "websocketEndpoint" : websocketEndpoint};
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.logging.Log;
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.SortType;
import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException;
import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService;
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();
}
List<SortByField> sortByFields = new ArrayList<>();
SortByField sortByField = new SortByField("time", SORT.ASC, false);
SortByField sortByField = new SortByField("time", SortType.ASC);
sortByFields.add(sortByField);
List<SensorRecord> sensorRecords = APIUtil.getAllEventsForDevice(sensorTableName, query, sortByFields);
return Response.status(Response.Status.OK.getStatusCode()).entity(sensorRecords).build();

@ -18,16 +18,30 @@
function onRequest(context) {
var log = new Log("stats.js");
var carbonServer = require("carbon").server;
var device = context.unit.params.device;
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var constants = require("/app/modules/constants.js");
var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss");
var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER);
var token = "";
if (tokenPair) {
token = tokenPair.accessToken;
var jwtService = carbonServer.osgiService(
'org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService');
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.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?" +
"token="+ token +"&deviceId=" + device.deviceIdentifier + "&deviceType=" + device.type;
return {"device": device, "websocketEndpoint" : websocketEndpoint};
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.logging.Log;
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.SortType;
import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException;
import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService;
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();
}
List<SortByField> sortByFields = new ArrayList<>();
SortByField sortByField = new SortByField("time", SORT.ASC, false);
SortByField sortByField = new SortByField("time", SortType.ASC);
sortByFields.add(sortByField);
List<SensorRecord> sensorRecords = APIUtil.getAllEventsForDevice(sensorTableName, query, sortByFields);
return Response.status(Response.Status.OK.getStatusCode()).entity(sensorRecords).build();

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

@ -79,7 +79,7 @@
</properties>
</adviceFile>
<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>
</bundles>
<importFeatures>

@ -1,6 +1,7 @@
-- -----------------------------------------------------
-- 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 (
DEVICE_ID VARCHAR(45) NOT NULL,
GCM_TOKEN VARCHAR(1000) NULL DEFAULT NULL,
@ -21,6 +22,7 @@ CREATE TABLE AD_DEVICE (
-- -----------------------------------------------------
-- 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 (
ID INT NOT NULL IDENTITY,
CODE VARCHAR(45) NOT NULL,

@ -1,6 +1,7 @@
-- -----------------------------------------------------
-- 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 (
DEVICE_ID VARCHAR(45) NOT NULL,
GCM_TOKEN VARCHAR(1000) NULL DEFAULT NULL,
@ -21,6 +22,7 @@ CREATE TABLE AD_DEVICE (
-- -----------------------------------------------------
-- 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 (
ID INT NOT NULL IDENTITY,
CODE VARCHAR(45) NOT NULL,

@ -1,6 +1,7 @@
-- -----------------------------------------------------
-- 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 (
ID INT NOT NULL IDENTITY,
CODE VARCHAR(45) NOT NULL,
@ -12,7 +13,8 @@ CREATE TABLE IOS_FEATURE (
-- -----------------------------------------------------
-- 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,
APNS_PUSH_TOKEN VARCHAR(100) NULL DEFAULT NULL,
MAGIC_TOKEN VARCHAR(100) NULL DEFAULT NULL,

@ -1,6 +1,7 @@
-- -----------------------------------------------------
-- 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 (
ID INT NOT NULL IDENTITY,
CODE VARCHAR(45) NOT NULL,
@ -12,7 +13,8 @@ CREATE TABLE WIN_FEATURE (
-- -----------------------------------------------------
-- 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,
CHANNEL_URI VARCHAR(100) NULL DEFAULT NULL,
DEVICE_INFO TEXT NULL DEFAULT NULL,

@ -1,6 +1,7 @@
-- -----------------------------------------------------
-- 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 (
ID INT NOT NULL IDENTITY,
CODE VARCHAR(45) NOT NULL,
@ -12,7 +13,8 @@ CREATE TABLE WIN_FEATURE (
-- -----------------------------------------------------
-- 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,
CHANNEL_URI VARCHAR(100) 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.range>[1.1.1, 2.0.0)</carbon.devicemgt.version.range>
<!-- Carbon App Management -->
<carbon.appmgt.version>1.2.4-SNAPSHOT</carbon.appmgt.version>
@ -1250,8 +1250,8 @@
<!-- Carbon Analytics -->
<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.version>1.0.6-ALPHA</carbon.analytics.version>
<carbon.analytics.version.range>[1.0.5,2.0.0]</carbon.analytics.version.range>
<carbon.analytics.version>1.2.8</carbon.analytics.version>
<carbon.analytics.version.range>[1.2.8,2.0.0]</carbon.analytics.version.range>
<!-- Third Party Dependencies-->
<spongycastle.version>1.51.0.0</spongycastle.version>
@ -1264,7 +1264,7 @@
<commons-io.version>2.4</commons-io.version>
<apache-felix.version>1.0.8</apache-felix.version>
<googlecode.plist.version>1.8</googlecode.plist.version>
<orbit.version.commons-httpclient>3.1.0.wso2v2</orbit.version.commons-httpclient>
<!--<commons-codec.wso2.version>1.4.0.wso2v1</commons-codec.wso2.version>-->

Loading…
Cancel
Save