mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
merge conflict fixes
This commit is contained in:
commit
a5b488bdd5
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-analytics</artifactId>
|
<artifactId>iot-analytics</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-analytics</artifactId>
|
<artifactId>iot-analytics</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-analytics</artifactId>
|
<artifactId>iot-analytics</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-analytics</artifactId>
|
<artifactId>iot-analytics</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>analytics</artifactId>
|
<artifactId>analytics</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>androidsense-plugin</artifactId>
|
<artifactId>androidsense-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>androidsense-plugin</artifactId>
|
<artifactId>androidsense-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>androidsense-plugin</artifactId>
|
<artifactId>androidsense-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -75,6 +75,7 @@ var rotation_yData = [];
|
|||||||
var rotation_zData = [];
|
var rotation_zData = [];
|
||||||
|
|
||||||
var graphMap = {};
|
var graphMap = {};
|
||||||
|
var graphSettingsMap = {};
|
||||||
|
|
||||||
var palette = new Rickshaw.Color.Palette({scheme: "munin"});
|
var palette = new Rickshaw.Color.Palette({scheme: "munin"});
|
||||||
|
|
||||||
@ -83,21 +84,21 @@ var elemTop;
|
|||||||
$(window).load(function () {
|
$(window).load(function () {
|
||||||
|
|
||||||
graphMap["battery"]=lineGraph("battery", batteryData);
|
graphMap["battery"]=lineGraph("battery", batteryData);
|
||||||
graphMap["light"]=lineGraph("light", lightData);
|
graphMap["light"]=lineGraph("light", lightData);
|
||||||
graphMap["pressure"]=lineGraph("pressure", pressureData);
|
graphMap["pressure"]=lineGraph("pressure", pressureData);
|
||||||
graphMap["proximity"]=lineGraph("proximity", proximityData);
|
graphMap["proximity"]=lineGraph("proximity", proximityData);
|
||||||
graphMap["accelerometer"]=threeDlineGraph("accelerometer", accelerometer_xData, accelerometer_yData, accelerometer_zData);
|
graphMap["accelerometer"]=threeDlineGraph("accelerometer", accelerometer_xData, accelerometer_yData, accelerometer_zData);
|
||||||
graphMap["magnetic"]=threeDlineGraph("magnetic", magnetic_xData, magnetic_yData, magnetic_zData);
|
graphMap["magnetic"]=threeDlineGraph("magnetic", magnetic_xData, magnetic_yData, magnetic_zData);
|
||||||
graphMap["gyroscope"]=threeDlineGraph("gyroscope", gyroscope_xData, gyroscope_yData, gyroscope_zData);
|
graphMap["gyroscope"]=threeDlineGraph("gyroscope", gyroscope_xData, gyroscope_yData, gyroscope_zData);
|
||||||
graphMap["gravity"]=threeDlineGraph("gravity", gravity_xData, gravity_yData, gravity_zData);
|
graphMap["gravity"]=threeDlineGraph("gravity", gravity_xData, gravity_yData, gravity_zData);
|
||||||
graphMap["rotation"]=threeDlineGraph("rotation", rotation_xData, rotation_yData, rotation_zData);
|
graphMap["rotation"]=threeDlineGraph("rotation", rotation_xData, rotation_yData, rotation_zData);
|
||||||
|
|
||||||
var websocketUrl = $("#stat-section").data("websocketurl");
|
var websocketUrl = $("#stat-section").data("websocketurl");
|
||||||
connect(websocketUrl)
|
connect(websocketUrl)
|
||||||
});
|
});
|
||||||
|
|
||||||
window.onbeforeunload = function() {
|
window.onbeforeunload = function() {
|
||||||
disconnect();
|
disconnect();
|
||||||
};
|
};
|
||||||
|
|
||||||
function threeDlineGraph(type, xChartData, yChartData, zChartData) {
|
function threeDlineGraph(type, xChartData, yChartData, zChartData) {
|
||||||
@ -121,10 +122,10 @@ function threeDlineGraph(type, xChartData, yChartData, zChartData) {
|
|||||||
|
|
||||||
var graph = new Rickshaw.Graph({
|
var graph = new Rickshaw.Graph({
|
||||||
element: $elem[0],
|
element: $elem[0],
|
||||||
width: $elem.width() - 100,
|
width: $elem.width() - 100,
|
||||||
height: 300,
|
height: 300,
|
||||||
renderer: "line",
|
renderer: "line",
|
||||||
interpolation: "linear",
|
interpolation: "linear",
|
||||||
padding: {top: 0.2, left: 0.0, right: 0.0, bottom: 0.2},
|
padding: {top: 0.2, left: 0.0, right: 0.0, bottom: 0.2},
|
||||||
xScale: d3.time.scale(),
|
xScale: d3.time.scale(),
|
||||||
series: [
|
series: [
|
||||||
@ -140,26 +141,26 @@ function threeDlineGraph(type, xChartData, yChartData, zChartData) {
|
|||||||
|
|
||||||
xAxis.render();
|
xAxis.render();
|
||||||
|
|
||||||
new Rickshaw.Graph.Axis.Y({
|
new Rickshaw.Graph.Axis.Y({
|
||||||
graph: graph,
|
graph: graph,
|
||||||
orientation: 'left',
|
orientation: 'left',
|
||||||
height: 300,
|
height: 300,
|
||||||
tickFormat: Rickshaw.Fixtures.Number.formatKMBT,
|
tickFormat: Rickshaw.Fixtures.Number.formatKMBT,
|
||||||
element: document.getElementById("y-axis-"+type)
|
element: document.getElementById("y-axis-"+type)
|
||||||
});
|
});
|
||||||
|
|
||||||
new Rickshaw.Graph.Legend({
|
new Rickshaw.Graph.Legend({
|
||||||
graph: graph,
|
graph: graph,
|
||||||
element: document.getElementById('legend-' + type)
|
element: document.getElementById('legend-' + type)
|
||||||
});
|
});
|
||||||
|
|
||||||
var detail = new Rickshaw.Graph.HoverDetail({
|
var detail = new Rickshaw.Graph.HoverDetail({
|
||||||
graph: graph
|
graph: graph
|
||||||
});
|
});
|
||||||
|
|
||||||
graph.render();
|
graph.render();
|
||||||
|
|
||||||
return graph;
|
return graph;
|
||||||
}
|
}
|
||||||
|
|
||||||
function lineGraph(type, chartData) {
|
function lineGraph(type, chartData) {
|
||||||
@ -171,15 +172,15 @@ function lineGraph(type, chartData) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var $elem = $("#chart-" + type);
|
var $elem = $("#chart-" + type);
|
||||||
|
|
||||||
var graph = new Rickshaw.Graph({
|
var graph = new Rickshaw.Graph({
|
||||||
element: $elem[0],
|
element: $elem[0],
|
||||||
width: $elem.width() - 100,
|
width: $elem.width() - 100,
|
||||||
height: 300,
|
height: 300,
|
||||||
renderer: "line",
|
renderer: "line",
|
||||||
interpolation: "linear",
|
interpolation: "linear",
|
||||||
padding: {top: 0.2, left: 0.0, right: 0.0, bottom: 0.2},
|
padding: {top: 0.2, left: 0.0, right: 0.0, bottom: 0.2},
|
||||||
xScale: d3.time.scale(),
|
xScale: d3.time.scale(),
|
||||||
series: [{
|
series: [{
|
||||||
'color': palette.color(),
|
'color': palette.color(),
|
||||||
@ -205,7 +206,7 @@ function lineGraph(type, chartData) {
|
|||||||
new Rickshaw.Graph.Legend({
|
new Rickshaw.Graph.Legend({
|
||||||
graph: graph,
|
graph: graph,
|
||||||
element: document.getElementById('legend-' + type)
|
element: document.getElementById('legend-' + type)
|
||||||
});
|
});
|
||||||
|
|
||||||
new Rickshaw.Graph.HoverDetail({
|
new Rickshaw.Graph.HoverDetail({
|
||||||
graph: graph,
|
graph: graph,
|
||||||
@ -216,9 +217,9 @@ function lineGraph(type, chartData) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
graph.render();
|
graph.render();
|
||||||
|
|
||||||
return graph;
|
return graph;
|
||||||
}
|
}
|
||||||
|
|
||||||
//websocket connection
|
//websocket connection
|
||||||
@ -231,7 +232,7 @@ function connect(target) {
|
|||||||
console.log('WebSocket is not supported by this browser.');
|
console.log('WebSocket is not supported by this browser.');
|
||||||
}
|
}
|
||||||
if (ws) {
|
if (ws) {
|
||||||
ws.onmessage = function (event) {
|
ws.onmessage = function (event) {
|
||||||
var dataPoint = JSON.parse(event.data);
|
var dataPoint = JSON.parse(event.data);
|
||||||
|
|
||||||
if (dataPoint) {
|
if (dataPoint) {
|
||||||
@ -242,50 +243,50 @@ function connect(target) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "light":
|
case "light":
|
||||||
graphUpdate(lightData, time, dataPoint[lightId], graphMap["light"]);
|
graphUpdate(lightData, time, dataPoint[lightId], graphMap["light"]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "pressure":
|
case "pressure":
|
||||||
graphUpdate(pressureData, time, dataPoint[pressureId], graphMap["pressure"]);
|
graphUpdate(pressureData, time, dataPoint[pressureId], graphMap["pressure"]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "proximity":
|
case "proximity":
|
||||||
graphUpdate(proximityData, time, dataPoint[proximityId], graphMap["proximity"]);
|
graphUpdate(proximityData, time, dataPoint[proximityId], graphMap["proximity"]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "accelerometer":
|
case "accelerometer":
|
||||||
dataUpdate(accelerometer_xData, time, dataPoint[accelerometer_xId]);
|
dataUpdate(accelerometer_xData, time, dataPoint[accelerometer_xId]);
|
||||||
dataUpdate(accelerometer_yData, time, dataPoint[accelerometer_yId]);
|
dataUpdate(accelerometer_yData, time, dataPoint[accelerometer_yId]);
|
||||||
dataUpdate(accelerometer_zData, time, dataPoint[accelerometer_zId]);
|
dataUpdate(accelerometer_zData, time, dataPoint[accelerometer_zId]);
|
||||||
graphMap["accelerometer"].update();
|
graphMap["accelerometer"].update();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "magnetic":
|
case "magnetic":
|
||||||
dataUpdate(magnetic_xData, time, dataPoint[magnetic_xId]);
|
dataUpdate(magnetic_xData, time, dataPoint[magnetic_xId]);
|
||||||
dataUpdate(magnetic_yData, time, dataPoint[magnetic_yId]);
|
dataUpdate(magnetic_yData, time, dataPoint[magnetic_yId]);
|
||||||
dataUpdate(magnetic_zData, time, dataPoint[magnetic_zId]);
|
dataUpdate(magnetic_zData, time, dataPoint[magnetic_zId]);
|
||||||
graphMap["magnetic"].update();
|
graphMap["magnetic"].update();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "gyroscope":
|
case "gyroscope":
|
||||||
dataUpdate(gyroscope_xData, time, dataPoint[gyroscope_xId]);
|
dataUpdate(gyroscope_xData, time, dataPoint[gyroscope_xId]);
|
||||||
dataUpdate(gyroscope_yData, time, dataPoint[gyroscope_yId]);
|
dataUpdate(gyroscope_yData, time, dataPoint[gyroscope_yId]);
|
||||||
dataUpdate(gyroscope_zData, time, dataPoint[gyroscope_zId]);
|
dataUpdate(gyroscope_zData, time, dataPoint[gyroscope_zId]);
|
||||||
graphMap["gyroscope"].update();
|
graphMap["gyroscope"].update();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "rotation":
|
case "rotation":
|
||||||
dataUpdate(magnetic_xData, time, dataPoint[rotation_xId]);
|
dataUpdate(magnetic_xData, time, dataPoint[rotation_xId]);
|
||||||
dataUpdate(magnetic_yData, time, dataPoint[rotation_yId]);
|
dataUpdate(magnetic_yData, time, dataPoint[rotation_yId]);
|
||||||
dataUpdate(magnetic_zData, time, dataPoint[rotation_zId]);
|
dataUpdate(magnetic_zData, time, dataPoint[rotation_zId]);
|
||||||
graphMap["rotation"].update();
|
graphMap["rotation"].update();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "gravity":
|
case "gravity":
|
||||||
dataUpdate(gravity_xData, time, dataPoint[gravity_xId]);
|
dataUpdate(gravity_xData, time, dataPoint[gravity_xId]);
|
||||||
dataUpdate(gravity_yData, time, dataPoint[gravity_yId]);
|
dataUpdate(gravity_yData, time, dataPoint[gravity_yId]);
|
||||||
dataUpdate(gravity_zData, time, dataPoint[gravity_zId]);
|
dataUpdate(gravity_zData, time, dataPoint[gravity_zId]);
|
||||||
graphMap["gravity"].update();
|
graphMap["gravity"].update();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -318,53 +319,55 @@ function disconnect() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function maximizeGraph(graph, width,height){
|
function maximizeGraph(graph, width,height){
|
||||||
graph.configure({
|
graphSettingsMap[graph.element.id] = {'width': graph.width, 'height': graph.height};
|
||||||
width: width*2,
|
graph.configure({
|
||||||
height: height*2
|
width: width*2,
|
||||||
|
height: height*2
|
||||||
|
|
||||||
});
|
});
|
||||||
graph.update();
|
graph.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
function minimizeGraph(graph){
|
function minimizeGraph(graph){
|
||||||
graph.configure({
|
var graphSettings = graphSettingsMap[graph.element.id];
|
||||||
width: 366,
|
graph.configure({
|
||||||
height: 300
|
width: graphSettings.width,
|
||||||
});
|
height: graphSettings.height
|
||||||
graph.update();
|
});
|
||||||
|
graph.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
//maximize minimize functionality
|
//maximize minimize functionality
|
||||||
$(".fw-expand").click(function(e) {
|
$(".fw-expand").click(function(e) {
|
||||||
var innerGraph= graphMap[e.target.nextElementSibling.innerHTML];
|
var innerGraph= graphMap[e.target.nextElementSibling.innerHTML];
|
||||||
var width = $(".chartWrapper").width();
|
var width = $(".chartWrapper").width();
|
||||||
var height = $(".chartWrapper").height();
|
var height = $(".chartWrapper").height();
|
||||||
|
|
||||||
if($(this).hasClass("default-view")){
|
if($(this).hasClass("default-view")){
|
||||||
elemTop = $('#'+innerGraph.element.id).parents('.graph')[0].offsetTop;
|
elemTop = $('#'+innerGraph.element.id).parents('.graph')[0].offsetTop;
|
||||||
$(this).removeClass("default-view");
|
$(this).removeClass("default-view");
|
||||||
$(this).removeClass("fw-expand");
|
$(this).removeClass("fw-expand");
|
||||||
$(this).addClass("fw-contract");
|
$(this).addClass("fw-contract");
|
||||||
maximizeGraph(innerGraph,width,height);
|
maximizeGraph(innerGraph,width,height);
|
||||||
$(this).parent().parent().addClass("max");
|
$(this).parent().parent().addClass("max");
|
||||||
$(this).closest(".graph").siblings().addClass("max_hide");
|
$(this).closest(".graph").siblings().addClass("max_hide");
|
||||||
$(this).closest(".graph").parent().siblings().addClass("max_hide");
|
$(this).closest(".graph").parent().siblings().addClass("max_hide");
|
||||||
}else{
|
}else{
|
||||||
$(this).addClass("default-view");
|
$(this).addClass("default-view");
|
||||||
$(this).addClass("fw-expand");
|
$(this).addClass("fw-expand");
|
||||||
$(this).removeClass("fw-contract");
|
$(this).removeClass("fw-contract");
|
||||||
minimizeGraph(innerGraph);
|
minimizeGraph(innerGraph);
|
||||||
$(this).parent().parent().removeClass("max");
|
$(this).parent().parent().removeClass("max");
|
||||||
$(this).closest(".graph").siblings().removeClass("max_hide");
|
$(this).closest(".graph").siblings().removeClass("max_hide");
|
||||||
$(this).closest(".graph").parent().siblings().removeClass("max_hide");
|
$(this).closest(".graph").parent().siblings().removeClass("max_hide");
|
||||||
focusToArea()
|
focusToArea()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//graph focusing function
|
//graph focusing function
|
||||||
function focusToArea(){
|
function focusToArea(){
|
||||||
var container = $("body");
|
var container = $("body");
|
||||||
container.animate({
|
container.animate({
|
||||||
scrollTop: elemTop
|
scrollTop: elemTop
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>device-types</artifactId>
|
<artifactId>device-types</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>arduino-plugin</artifactId>
|
<artifactId>arduino-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>arduino-plugin</artifactId>
|
<artifactId>arduino-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>arduino-plugin</artifactId>
|
<artifactId>arduino-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -30,10 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<a class="padding-left"
|
<a class="padding-left"
|
||||||
href="{{@app.context}}/device/{{device.type}}/analytics?deviceId={{device.deviceIdentifier}}&deviceName={{device.name}}">
|
href="{{@app.context}}/device/{{device.type}}/analytics?deviceId={{device.deviceIdentifier}}&deviceName={{device.name}}">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack"> <i class="fw fw-circle-outline fw-stack-2x"></i> <i class="fw fw-statistics fw-stack-1x"></i> <span class="fw-stack fw-move-right fw-move-bottom"> <i class="fw fw-circle fw-stack-2x fw-stroke"></i> <i class="fw fw-clock fw-stack-1x fw-inverse"></i> </span> </span> View Device Analytics
|
||||||
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
|
||||||
<i class="fw fw-statistics fw-stack-1x"></i>
|
|
||||||
</span> View Device Analytics
|
|
||||||
</a>
|
</a>
|
||||||
<!-- /statistics -->
|
<!-- /statistics -->
|
||||||
{{#zone "bottomJs"}}
|
{{#zone "bottomJs"}}
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>device-types</artifactId>
|
<artifactId>device-types</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>raspberrypi-plugin</artifactId>
|
<artifactId>raspberrypi-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>raspberrypi-plugin</artifactId>
|
<artifactId>raspberrypi-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>raspberrypi-plugin</artifactId>
|
<artifactId>raspberrypi-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -30,10 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<a class="padding-left"
|
<a class="padding-left"
|
||||||
href="{{@app.context}}/device/{{device.type}}/analytics?deviceId={{device.deviceIdentifier}}&deviceName={{device.name}}">
|
href="{{@app.context}}/device/{{device.type}}/analytics?deviceId={{device.deviceIdentifier}}&deviceName={{device.name}}">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack"> <i class="fw fw-circle-outline fw-stack-2x"></i> <i class="fw fw-statistics fw-stack-1x"></i> <span class="fw-stack fw-move-right fw-move-bottom"> <i class="fw fw-circle fw-stack-2x fw-stroke"></i> <i class="fw fw-clock fw-stack-1x fw-inverse"></i> </span> </span> View Device Analytics
|
||||||
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
|
||||||
<i class="fw fw-statistics fw-stack-1x"></i>
|
|
||||||
</span> View Device Analytics
|
|
||||||
</a>
|
</a>
|
||||||
<!-- /statistics -->
|
<!-- /statistics -->
|
||||||
{{#zone "bottomJs"}}
|
{{#zone "bottomJs"}}
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>device-types</artifactId>
|
<artifactId>device-types</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -30,10 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<a class="padding-left"
|
<a class="padding-left"
|
||||||
href="{{@app.context}}/device/{{device.type}}/analytics?deviceId={{device.deviceIdentifier}}&deviceName={{device.name}}">
|
href="{{@app.context}}/device/{{device.type}}/analytics?deviceId={{device.deviceIdentifier}}&deviceName={{device.name}}">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack"> <i class="fw fw-circle-outline fw-stack-2x"></i> <i class="fw fw-statistics fw-stack-1x"></i> <span class="fw-stack fw-move-right fw-move-bottom"> <i class="fw fw-circle fw-stack-2x fw-stroke"></i> <i class="fw fw-clock fw-stack-1x fw-inverse"></i> </span> </span> View Device Analytics
|
||||||
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
|
||||||
<i class="fw fw-statistics fw-stack-1x"></i>
|
|
||||||
</span> View Device Analytics
|
|
||||||
</a>
|
</a>
|
||||||
<!-- /statistics -->
|
<!-- /statistics -->
|
||||||
{{#zone "bottomJs"}}
|
{{#zone "bottomJs"}}
|
||||||
|
|||||||
@ -8,7 +8,23 @@
|
|||||||
],
|
],
|
||||||
"features": {
|
"features": {
|
||||||
"buzz": {
|
"buzz": {
|
||||||
"icon" : "fw-dial-up"
|
"icon" : "fw-dial-up",
|
||||||
|
"formParams": [
|
||||||
|
{
|
||||||
|
"type": "radio",
|
||||||
|
"id": "buz_on",
|
||||||
|
"label": "Buzzer On",
|
||||||
|
"name": "state",
|
||||||
|
"value":"ON"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "radio",
|
||||||
|
"id": "buz_off",
|
||||||
|
"label": "Buzzer Off",
|
||||||
|
"name": "state",
|
||||||
|
"value":"OFF"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>device-types</artifactId>
|
<artifactId>device-types</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>appm-connector</artifactId>
|
<artifactId>appm-connector</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>appm-connector</artifactId>
|
<artifactId>appm-connector</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@ -67,6 +67,7 @@
|
|||||||
feign.gson,
|
feign.gson,
|
||||||
org.json.simple.*,
|
org.json.simple.*,
|
||||||
org.wso2.carbon.appmgt.mobile.beans,
|
org.wso2.carbon.appmgt.mobile.beans,
|
||||||
|
org.wso2.carbon.base,
|
||||||
org.wso2.carbon.context,
|
org.wso2.carbon.context,
|
||||||
javax.net.ssl,
|
javax.net.ssl,
|
||||||
feign.slf4j
|
feign.slf4j
|
||||||
|
|||||||
@ -47,17 +47,15 @@ import org.wso2.carbon.appmgt.mobile.mdm.App;
|
|||||||
import org.wso2.carbon.appmgt.mobile.mdm.Device;
|
import org.wso2.carbon.appmgt.mobile.mdm.Device;
|
||||||
import org.wso2.carbon.appmgt.mobile.utils.MobileApplicationException;
|
import org.wso2.carbon.appmgt.mobile.utils.MobileApplicationException;
|
||||||
import org.wso2.carbon.appmgt.mobile.utils.MobileConfigurations;
|
import org.wso2.carbon.appmgt.mobile.utils.MobileConfigurations;
|
||||||
|
import org.wso2.carbon.base.ServerConfiguration;
|
||||||
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
||||||
|
|
||||||
import javax.net.ssl.HostnameVerifier;
|
import javax.net.ssl.*;
|
||||||
import javax.net.ssl.SSLContext;
|
import java.io.FileInputStream;
|
||||||
import javax.net.ssl.SSLSession;
|
|
||||||
import javax.net.ssl.SSLSocketFactory;
|
|
||||||
import javax.net.ssl.TrustManager;
|
|
||||||
import javax.net.ssl.X509TrustManager;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.security.KeyManagementException;
|
import java.io.InputStream;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.*;
|
||||||
|
import java.security.cert.CertificateException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -286,16 +284,21 @@ public class ApplicationOperationsImpl implements ApplicationOperations {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Client getSSLClient() {
|
public static Client getSSLClient() {
|
||||||
return new Client.Default(getTrustedSSLSocketFactory(), new HostnameVerifier() {
|
boolean isIgnoreHostnameVerification = Boolean.parseBoolean(System.getProperty("org.wso2.ignoreHostnameVerification"));
|
||||||
@Override
|
if(isIgnoreHostnameVerification) {
|
||||||
public boolean verify(String s, SSLSession sslSession) {
|
return new Client.Default(getSimpleTrustedSSLSocketFactory(), new HostnameVerifier() {
|
||||||
return true;
|
@Override
|
||||||
}
|
public boolean verify(String s, SSLSession sslSession) {
|
||||||
});
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
return new Client.Default(getTrustedSSLSocketFactory(), null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static SSLSocketFactory getTrustedSSLSocketFactory() {
|
private static SSLSocketFactory getSimpleTrustedSSLSocketFactory() {
|
||||||
try {
|
try {
|
||||||
TrustManager[] trustAllCerts = new TrustManager[]{
|
TrustManager[] trustAllCerts = new TrustManager[]{
|
||||||
new X509TrustManager() {
|
new X509TrustManager() {
|
||||||
@ -318,4 +321,63 @@ public class ApplicationOperationsImpl implements ApplicationOperations {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//FIXME - I know hard-cording values is a bad practice , this code is repeating in
|
||||||
|
// several class, so this hard-coding strings will be removed once this code block is moved into a central location
|
||||||
|
// this should be done after the 3.1.0 release.
|
||||||
|
private static SSLSocketFactory getTrustedSSLSocketFactory() {
|
||||||
|
try {
|
||||||
|
String keyStorePassword = ServerConfiguration.getInstance().getFirstProperty("Security.KeyStore.Password");
|
||||||
|
String keyStoreLocation = ServerConfiguration.getInstance().getFirstProperty("Security.KeyStore.Location");
|
||||||
|
String trustStorePassword = ServerConfiguration.getInstance().getFirstProperty(
|
||||||
|
"Security.TrustStore.Password");
|
||||||
|
String trustStoreLocation = ServerConfiguration.getInstance().getFirstProperty(
|
||||||
|
"Security.TrustStore.Location");
|
||||||
|
|
||||||
|
KeyStore keyStore = loadKeyStore(keyStoreLocation,keyStorePassword,"JKS");
|
||||||
|
KeyStore trustStore = loadTrustStore(trustStoreLocation,trustStorePassword);
|
||||||
|
return initSSLConnection(keyStore,keyStorePassword,trustStore);
|
||||||
|
} catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException
|
||||||
|
|CertificateException | IOException | UnrecoverableKeyException e) {
|
||||||
|
log.error("Error while creating the SSL socket factory due to "+e.getMessage(),e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static SSLSocketFactory initSSLConnection(KeyStore keyStore,String keyStorePassword,KeyStore trustStore) throws NoSuchAlgorithmException, UnrecoverableKeyException,
|
||||||
|
KeyStoreException, KeyManagementException {
|
||||||
|
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509");
|
||||||
|
keyManagerFactory.init(keyStore, keyStorePassword.toCharArray());
|
||||||
|
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509");
|
||||||
|
trustManagerFactory.init(trustStore);
|
||||||
|
|
||||||
|
// Create and initialize SSLContext for HTTPS communication
|
||||||
|
SSLContext sslContext = SSLContext.getInstance("SSLv3");
|
||||||
|
sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);
|
||||||
|
SSLContext.setDefault(sslContext);
|
||||||
|
return sslContext.getSocketFactory();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static KeyStore loadKeyStore(String keyStorePath, String ksPassword, String type)
|
||||||
|
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException {
|
||||||
|
InputStream fileInputStream = null;
|
||||||
|
try {
|
||||||
|
char[] keypassChar = ksPassword.toCharArray();
|
||||||
|
KeyStore keyStore = KeyStore.getInstance(type);
|
||||||
|
fileInputStream = new FileInputStream(keyStorePath);
|
||||||
|
keyStore.load(fileInputStream, keypassChar);
|
||||||
|
return keyStore;
|
||||||
|
} finally {
|
||||||
|
if (fileInputStream != null) {
|
||||||
|
fileInputStream.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static KeyStore loadTrustStore(String trustStorePath, String tsPassword)
|
||||||
|
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException {
|
||||||
|
|
||||||
|
return loadKeyStore(trustStorePath,tsPassword,"JKS");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -40,16 +40,14 @@ import org.wso2.carbon.appmgt.mdm.restconnector.authorization.client.dto.ApiRegi
|
|||||||
import org.wso2.carbon.appmgt.mdm.restconnector.authorization.client.dto.TokenIssuerService;
|
import org.wso2.carbon.appmgt.mdm.restconnector.authorization.client.dto.TokenIssuerService;
|
||||||
import org.wso2.carbon.appmgt.mdm.restconnector.config.AuthorizationConfigurationManager;
|
import org.wso2.carbon.appmgt.mdm.restconnector.config.AuthorizationConfigurationManager;
|
||||||
import org.wso2.carbon.appmgt.mdm.restconnector.internal.AuthorizationDataHolder;
|
import org.wso2.carbon.appmgt.mdm.restconnector.internal.AuthorizationDataHolder;
|
||||||
|
import org.wso2.carbon.base.ServerConfiguration;
|
||||||
|
|
||||||
import javax.net.ssl.HostnameVerifier;
|
import javax.net.ssl.*;
|
||||||
import javax.net.ssl.SSLContext;
|
import java.io.FileInputStream;
|
||||||
import javax.net.ssl.SSLSession;
|
|
||||||
import javax.net.ssl.SSLSocketFactory;
|
|
||||||
import javax.net.ssl.TrustManager;
|
|
||||||
import javax.net.ssl.X509TrustManager;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.security.KeyManagementException;
|
import java.io.InputStream;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.*;
|
||||||
|
import java.security.cert.CertificateException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a request interceptor to add oauth token header.
|
* This is a request interceptor to add oauth token header.
|
||||||
@ -131,16 +129,21 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
|||||||
template.header(Constants.RestConstants.AUTHORIZATION, headerValue);
|
template.header(Constants.RestConstants.AUTHORIZATION, headerValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Client getSSLClient() {
|
public static Client getSSLClient() {
|
||||||
return new Client.Default(getTrustedSSLSocketFactory(), new HostnameVerifier() {
|
boolean isIgnoreHostnameVerification = Boolean.parseBoolean(System.getProperty("org.wso2.ignoreHostnameVerification"));
|
||||||
@Override
|
if(isIgnoreHostnameVerification) {
|
||||||
public boolean verify(String s, SSLSession sslSession) {
|
return new Client.Default(getSimpleTrustedSSLSocketFactory(), new HostnameVerifier() {
|
||||||
return true;
|
@Override
|
||||||
}
|
public boolean verify(String s, SSLSession sslSession) {
|
||||||
});
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
return new Client.Default(getTrustedSSLSocketFactory(), null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static SSLSocketFactory getTrustedSSLSocketFactory() {
|
private static SSLSocketFactory getSimpleTrustedSSLSocketFactory() {
|
||||||
try {
|
try {
|
||||||
TrustManager[] trustAllCerts = new TrustManager[]{
|
TrustManager[] trustAllCerts = new TrustManager[]{
|
||||||
new X509TrustManager() {
|
new X509TrustManager() {
|
||||||
@ -163,4 +166,62 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//FIXME - I know hard-cording values is a bad practice , this code is repeating in
|
||||||
|
// several class, so this hard-coding strings will be removed once this code block is moved into a central location
|
||||||
|
// this should be done after the 3.1.0 release.
|
||||||
|
private static SSLSocketFactory getTrustedSSLSocketFactory() {
|
||||||
|
try {
|
||||||
|
String keyStorePassword = ServerConfiguration.getInstance().getFirstProperty("Security.KeyStore.Password");
|
||||||
|
String keyStoreLocation = ServerConfiguration.getInstance().getFirstProperty("Security.KeyStore.Location");
|
||||||
|
String trustStorePassword = ServerConfiguration.getInstance().getFirstProperty(
|
||||||
|
"Security.TrustStore.Password");
|
||||||
|
String trustStoreLocation = ServerConfiguration.getInstance().getFirstProperty(
|
||||||
|
"Security.TrustStore.Location");
|
||||||
|
|
||||||
|
KeyStore keyStore = loadKeyStore(keyStoreLocation,keyStorePassword,"JKS");
|
||||||
|
KeyStore trustStore = loadTrustStore(trustStoreLocation,trustStorePassword);
|
||||||
|
return initSSLConnection(keyStore,keyStorePassword,trustStore);
|
||||||
|
} catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException
|
||||||
|
|CertificateException | IOException | UnrecoverableKeyException e) {
|
||||||
|
log.error("Error while creating the SSL socket factory due to "+e.getMessage(),e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static SSLSocketFactory initSSLConnection(KeyStore keyStore,String keyStorePassword,KeyStore trustStore) throws NoSuchAlgorithmException, UnrecoverableKeyException,
|
||||||
|
KeyStoreException, KeyManagementException {
|
||||||
|
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509");
|
||||||
|
keyManagerFactory.init(keyStore, keyStorePassword.toCharArray());
|
||||||
|
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509");
|
||||||
|
trustManagerFactory.init(trustStore);
|
||||||
|
|
||||||
|
// Create and initialize SSLContext for HTTPS communication
|
||||||
|
SSLContext sslContext = SSLContext.getInstance("SSLv3");
|
||||||
|
sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);
|
||||||
|
SSLContext.setDefault(sslContext);
|
||||||
|
return sslContext.getSocketFactory();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static KeyStore loadKeyStore(String keyStorePath, String ksPassword, String type)
|
||||||
|
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException {
|
||||||
|
InputStream fileInputStream = null;
|
||||||
|
try {
|
||||||
|
char[] keypassChar = ksPassword.toCharArray();
|
||||||
|
KeyStore keyStore = KeyStore.getInstance(type);
|
||||||
|
fileInputStream = new FileInputStream(keyStorePath);
|
||||||
|
keyStore.load(fileInputStream, keypassChar);
|
||||||
|
return keyStore;
|
||||||
|
} finally {
|
||||||
|
if (fileInputStream != null) {
|
||||||
|
fileInputStream.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static KeyStore loadTrustStore(String trustStorePath, String tsPassword)
|
||||||
|
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException {
|
||||||
|
|
||||||
|
return loadKeyStore(trustStorePath,tsPassword,"JKS");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>extensions</artifactId>
|
<artifactId>extensions</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>cdmf-transport-adapters</artifactId>
|
<artifactId>cdmf-transport-adapters</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>cdmf-transport-adapters</artifactId>
|
<artifactId>cdmf-transport-adapters</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@ -165,6 +165,7 @@
|
|||||||
org.wso2.carbon.identity.oauth2.*,
|
org.wso2.carbon.identity.oauth2.*,
|
||||||
org.wso2.carbon.utils,
|
org.wso2.carbon.utils,
|
||||||
org.wso2.carbon.utils.multitenancy,
|
org.wso2.carbon.utils.multitenancy,
|
||||||
|
org.wso2.carbon.base,
|
||||||
javax.net.ssl,
|
javax.net.ssl,
|
||||||
feign.slf4j
|
feign.slf4j
|
||||||
</Import-Package>
|
</Import-Package>
|
||||||
|
|||||||
@ -29,6 +29,7 @@ import feign.jaxrs.JAXRSContract;
|
|||||||
import feign.slf4j.Slf4jLogger;
|
import feign.slf4j.Slf4jLogger;
|
||||||
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.base.ServerConfiguration;
|
||||||
import org.wso2.carbon.device.mgt.input.adapter.http.authorization.client.OAuthRequestInterceptor;
|
import org.wso2.carbon.device.mgt.input.adapter.http.authorization.client.OAuthRequestInterceptor;
|
||||||
import org.wso2.carbon.device.mgt.input.adapter.http.authorization.client.dto.AuthorizationRequest;
|
import org.wso2.carbon.device.mgt.input.adapter.http.authorization.client.dto.AuthorizationRequest;
|
||||||
import org.wso2.carbon.device.mgt.input.adapter.http.authorization.client.dto.DeviceAccessAuthorizationAdminService;
|
import org.wso2.carbon.device.mgt.input.adapter.http.authorization.client.dto.DeviceAccessAuthorizationAdminService;
|
||||||
@ -38,15 +39,12 @@ import org.wso2.carbon.device.mgt.input.adapter.http.util.AuthenticationInfo;
|
|||||||
import org.wso2.carbon.device.mgt.input.adapter.http.util.PropertyUtils;
|
import org.wso2.carbon.device.mgt.input.adapter.http.util.PropertyUtils;
|
||||||
import org.wso2.carbon.event.input.adapter.core.exception.InputEventAdapterException;
|
import org.wso2.carbon.event.input.adapter.core.exception.InputEventAdapterException;
|
||||||
|
|
||||||
import javax.net.ssl.HostnameVerifier;
|
import javax.net.ssl.*;
|
||||||
import javax.net.ssl.SSLContext;
|
import java.io.FileInputStream;
|
||||||
import javax.net.ssl.SSLSession;
|
|
||||||
import javax.net.ssl.SSLSocketFactory;
|
|
||||||
import javax.net.ssl.TrustManager;
|
|
||||||
import javax.net.ssl.X509TrustManager;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.security.KeyManagementException;
|
import java.io.InputStream;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.*;
|
||||||
|
import java.security.cert.CertificateException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -112,16 +110,21 @@ public class DeviceAuthorizer {
|
|||||||
return deviceMgtServerUrl;
|
return deviceMgtServerUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Client getSSLClient() {
|
public static Client getSSLClient() {
|
||||||
return new Client.Default(getTrustedSSLSocketFactory(), new HostnameVerifier() {
|
boolean isIgnoreHostnameVerification = Boolean.parseBoolean(System.getProperty("org.wso2.ignoreHostnameVerification"));
|
||||||
@Override
|
if(isIgnoreHostnameVerification) {
|
||||||
public boolean verify(String s, SSLSession sslSession) {
|
return new Client.Default(getSimpleTrustedSSLSocketFactory(), new HostnameVerifier() {
|
||||||
return true;
|
@Override
|
||||||
}
|
public boolean verify(String s, SSLSession sslSession) {
|
||||||
});
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
return new Client.Default(getTrustedSSLSocketFactory(), null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static SSLSocketFactory getTrustedSSLSocketFactory() {
|
private static SSLSocketFactory getSimpleTrustedSSLSocketFactory() {
|
||||||
try {
|
try {
|
||||||
TrustManager[] trustAllCerts = new TrustManager[]{
|
TrustManager[] trustAllCerts = new TrustManager[]{
|
||||||
new X509TrustManager() {
|
new X509TrustManager() {
|
||||||
@ -144,4 +147,62 @@ public class DeviceAuthorizer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//FIXME - I know hard-cording values is a bad practice , this code is repeating in
|
||||||
|
// several class, so this hard-coding strings will be removed once this code block is moved into a central location
|
||||||
|
// this should be done after the 3.1.0 release.
|
||||||
|
private static SSLSocketFactory getTrustedSSLSocketFactory() {
|
||||||
|
try {
|
||||||
|
String keyStorePassword = ServerConfiguration.getInstance().getFirstProperty("Security.KeyStore.Password");
|
||||||
|
String keyStoreLocation = ServerConfiguration.getInstance().getFirstProperty("Security.KeyStore.Location");
|
||||||
|
String trustStorePassword = ServerConfiguration.getInstance().getFirstProperty(
|
||||||
|
"Security.TrustStore.Password");
|
||||||
|
String trustStoreLocation = ServerConfiguration.getInstance().getFirstProperty(
|
||||||
|
"Security.TrustStore.Location");
|
||||||
|
|
||||||
|
KeyStore keyStore = loadKeyStore(keyStoreLocation,keyStorePassword,"JKS");
|
||||||
|
KeyStore trustStore = loadTrustStore(trustStoreLocation,trustStorePassword);
|
||||||
|
return initSSLConnection(keyStore,keyStorePassword,trustStore);
|
||||||
|
} catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException
|
||||||
|
|CertificateException | IOException | UnrecoverableKeyException e) {
|
||||||
|
log.error("Error while creating the SSL socket factory due to "+e.getMessage(),e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static SSLSocketFactory initSSLConnection(KeyStore keyStore,String keyStorePassword,KeyStore trustStore) throws NoSuchAlgorithmException, UnrecoverableKeyException,
|
||||||
|
KeyStoreException, KeyManagementException {
|
||||||
|
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509");
|
||||||
|
keyManagerFactory.init(keyStore, keyStorePassword.toCharArray());
|
||||||
|
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509");
|
||||||
|
trustManagerFactory.init(trustStore);
|
||||||
|
|
||||||
|
// Create and initialize SSLContext for HTTPS communication
|
||||||
|
SSLContext sslContext = SSLContext.getInstance("SSLv3");
|
||||||
|
sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);
|
||||||
|
SSLContext.setDefault(sslContext);
|
||||||
|
return sslContext.getSocketFactory();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static KeyStore loadKeyStore(String keyStorePath, String ksPassword, String type)
|
||||||
|
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException {
|
||||||
|
InputStream fileInputStream = null;
|
||||||
|
try {
|
||||||
|
char[] keypassChar = ksPassword.toCharArray();
|
||||||
|
KeyStore keyStore = KeyStore.getInstance(type);
|
||||||
|
fileInputStream = new FileInputStream(keyStorePath);
|
||||||
|
keyStore.load(fileInputStream, keypassChar);
|
||||||
|
return keyStore;
|
||||||
|
} finally {
|
||||||
|
if (fileInputStream != null) {
|
||||||
|
fileInputStream.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static KeyStore loadTrustStore(String trustStorePath, String tsPassword)
|
||||||
|
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException {
|
||||||
|
|
||||||
|
return loadKeyStore(trustStorePath,tsPassword,"JKS");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -29,6 +29,7 @@ import feign.jaxrs.JAXRSContract;
|
|||||||
import feign.slf4j.Slf4jLogger;
|
import feign.slf4j.Slf4jLogger;
|
||||||
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.base.ServerConfiguration;
|
||||||
import org.wso2.carbon.device.mgt.input.adapter.http.authorization.client.dto.AccessTokenInfo;
|
import org.wso2.carbon.device.mgt.input.adapter.http.authorization.client.dto.AccessTokenInfo;
|
||||||
import org.wso2.carbon.device.mgt.input.adapter.http.authorization.client.dto.ApiApplicationKey;
|
import org.wso2.carbon.device.mgt.input.adapter.http.authorization.client.dto.ApiApplicationKey;
|
||||||
import org.wso2.carbon.device.mgt.input.adapter.http.authorization.client.dto.ApiApplicationRegistrationService;
|
import org.wso2.carbon.device.mgt.input.adapter.http.authorization.client.dto.ApiApplicationRegistrationService;
|
||||||
@ -37,15 +38,12 @@ import org.wso2.carbon.device.mgt.input.adapter.http.authorization.client.dto.To
|
|||||||
import org.wso2.carbon.device.mgt.input.adapter.http.util.PropertyUtils;
|
import org.wso2.carbon.device.mgt.input.adapter.http.util.PropertyUtils;
|
||||||
import org.wso2.carbon.event.input.adapter.core.exception.InputEventAdapterException;
|
import org.wso2.carbon.event.input.adapter.core.exception.InputEventAdapterException;
|
||||||
|
|
||||||
import javax.net.ssl.HostnameVerifier;
|
import javax.net.ssl.*;
|
||||||
import javax.net.ssl.SSLContext;
|
import java.io.FileInputStream;
|
||||||
import javax.net.ssl.SSLSession;
|
|
||||||
import javax.net.ssl.SSLSocketFactory;
|
|
||||||
import javax.net.ssl.TrustManager;
|
|
||||||
import javax.net.ssl.X509TrustManager;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.security.KeyManagementException;
|
import java.io.InputStream;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.*;
|
||||||
|
import java.security.cert.CertificateException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -183,16 +181,21 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
|||||||
return refreshTimeOffset;
|
return refreshTimeOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Client getSSLClient() {
|
public static Client getSSLClient() {
|
||||||
return new Client.Default(getTrustedSSLSocketFactory(), new HostnameVerifier() {
|
boolean isIgnoreHostnameVerification = Boolean.parseBoolean(System.getProperty("org.wso2.ignoreHostnameVerification"));
|
||||||
@Override
|
if(isIgnoreHostnameVerification) {
|
||||||
public boolean verify(String s, SSLSession sslSession) {
|
return new Client.Default(getSimpleTrustedSSLSocketFactory(), new HostnameVerifier() {
|
||||||
return true;
|
@Override
|
||||||
}
|
public boolean verify(String s, SSLSession sslSession) {
|
||||||
});
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
return new Client.Default(getTrustedSSLSocketFactory(), null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static SSLSocketFactory getTrustedSSLSocketFactory() {
|
private static SSLSocketFactory getSimpleTrustedSSLSocketFactory() {
|
||||||
try {
|
try {
|
||||||
TrustManager[] trustAllCerts = new TrustManager[]{
|
TrustManager[] trustAllCerts = new TrustManager[]{
|
||||||
new X509TrustManager() {
|
new X509TrustManager() {
|
||||||
@ -214,4 +217,63 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//FIXME - I know hard-cording values is a bad practice , this code is repeating in
|
||||||
|
// several class, so this hard-coding strings will be removed once this code block is moved into a central location
|
||||||
|
// this should be done after the 3.1.0 release.
|
||||||
|
private static SSLSocketFactory getTrustedSSLSocketFactory() {
|
||||||
|
try {
|
||||||
|
String keyStorePassword = ServerConfiguration.getInstance().getFirstProperty("Security.KeyStore.Password");
|
||||||
|
String keyStoreLocation = ServerConfiguration.getInstance().getFirstProperty("Security.KeyStore.Location");
|
||||||
|
String trustStorePassword = ServerConfiguration.getInstance().getFirstProperty(
|
||||||
|
"Security.TrustStore.Password");
|
||||||
|
String trustStoreLocation = ServerConfiguration.getInstance().getFirstProperty(
|
||||||
|
"Security.TrustStore.Location");
|
||||||
|
|
||||||
|
KeyStore keyStore = loadKeyStore(keyStoreLocation,keyStorePassword,"JKS");
|
||||||
|
KeyStore trustStore = loadTrustStore(trustStoreLocation,trustStorePassword);
|
||||||
|
return initSSLConnection(keyStore,keyStorePassword,trustStore);
|
||||||
|
} catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException
|
||||||
|
|CertificateException | IOException | UnrecoverableKeyException e) {
|
||||||
|
log.error("Error while creating the SSL socket factory due to "+e.getMessage(),e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static SSLSocketFactory initSSLConnection(KeyStore keyStore,String keyStorePassword,KeyStore trustStore) throws NoSuchAlgorithmException, UnrecoverableKeyException,
|
||||||
|
KeyStoreException, KeyManagementException {
|
||||||
|
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509");
|
||||||
|
keyManagerFactory.init(keyStore, keyStorePassword.toCharArray());
|
||||||
|
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509");
|
||||||
|
trustManagerFactory.init(trustStore);
|
||||||
|
|
||||||
|
// Create and initialize SSLContext for HTTPS communication
|
||||||
|
SSLContext sslContext = SSLContext.getInstance("SSLv3");
|
||||||
|
sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);
|
||||||
|
SSLContext.setDefault(sslContext);
|
||||||
|
return sslContext.getSocketFactory();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static KeyStore loadKeyStore(String keyStorePath, String ksPassword, String type)
|
||||||
|
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException {
|
||||||
|
InputStream fileInputStream = null;
|
||||||
|
try {
|
||||||
|
char[] keypassChar = ksPassword.toCharArray();
|
||||||
|
KeyStore keyStore = KeyStore.getInstance(type);
|
||||||
|
fileInputStream = new FileInputStream(keyStorePath);
|
||||||
|
keyStore.load(fileInputStream, keypassChar);
|
||||||
|
return keyStore;
|
||||||
|
} finally {
|
||||||
|
if (fileInputStream != null) {
|
||||||
|
fileInputStream.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static KeyStore loadTrustStore(String trustStorePath, String tsPassword)
|
||||||
|
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException {
|
||||||
|
|
||||||
|
return loadKeyStore(trustStorePath,tsPassword,"JKS");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>cdmf-transport-adapters</artifactId>
|
<artifactId>cdmf-transport-adapters</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>cdmf-transport-adapters</artifactId>
|
<artifactId>cdmf-transport-adapters</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>cdmf-transport-adapters</artifactId>
|
<artifactId>cdmf-transport-adapters</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>cdmf-transport-adapters</artifactId>
|
<artifactId>cdmf-transport-adapters</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>cdmf-transport-adapters</artifactId>
|
<artifactId>cdmf-transport-adapters</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>cdmf-transport-adapters</artifactId>
|
<artifactId>cdmf-transport-adapters</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,7 @@ import feign.jaxrs.JAXRSContract;
|
|||||||
import feign.slf4j.Slf4jLogger;
|
import feign.slf4j.Slf4jLogger;
|
||||||
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.base.ServerConfiguration;
|
||||||
import org.wso2.carbon.device.mgt.output.adapter.websocket.authentication.AuthenticationInfo;
|
import org.wso2.carbon.device.mgt.output.adapter.websocket.authentication.AuthenticationInfo;
|
||||||
import org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.client.OAuthRequestInterceptor;
|
import org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.client.OAuthRequestInterceptor;
|
||||||
import org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.client.dto.AuthorizationRequest;
|
import org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.client.dto.AuthorizationRequest;
|
||||||
@ -40,16 +41,13 @@ import org.wso2.carbon.device.mgt.output.adapter.websocket.util.PropertyUtils;
|
|||||||
import org.wso2.carbon.device.mgt.output.adapter.websocket.util.WebSocketSessionRequest;
|
import org.wso2.carbon.device.mgt.output.adapter.websocket.util.WebSocketSessionRequest;
|
||||||
import org.wso2.carbon.event.output.adapter.core.exception.OutputEventAdapterException;
|
import org.wso2.carbon.event.output.adapter.core.exception.OutputEventAdapterException;
|
||||||
|
|
||||||
import javax.net.ssl.HostnameVerifier;
|
import javax.net.ssl.*;
|
||||||
import javax.net.ssl.SSLContext;
|
|
||||||
import javax.net.ssl.SSLSession;
|
|
||||||
import javax.net.ssl.SSLSocketFactory;
|
|
||||||
import javax.net.ssl.TrustManager;
|
|
||||||
import javax.net.ssl.X509TrustManager;
|
|
||||||
import javax.websocket.Session;
|
import javax.websocket.Session;
|
||||||
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.security.KeyManagementException;
|
import java.io.InputStream;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.*;
|
||||||
|
import java.security.cert.CertificateException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -125,16 +123,21 @@ public class DeviceAuthorizer implements Authorizer {
|
|||||||
return deviceMgtServerUrl;
|
return deviceMgtServerUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Client getSSLClient() {
|
public static Client getSSLClient() {
|
||||||
return new Client.Default(getTrustedSSLSocketFactory(), new HostnameVerifier() {
|
boolean isIgnoreHostnameVerification = Boolean.parseBoolean(System.getProperty("org.wso2.ignoreHostnameVerification"));
|
||||||
@Override
|
if(isIgnoreHostnameVerification) {
|
||||||
public boolean verify(String s, SSLSession sslSession) {
|
return new Client.Default(getSimpleTrustedSSLSocketFactory(), new HostnameVerifier() {
|
||||||
return true;
|
@Override
|
||||||
}
|
public boolean verify(String s, SSLSession sslSession) {
|
||||||
});
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
return new Client.Default(getTrustedSSLSocketFactory(), null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static SSLSocketFactory getTrustedSSLSocketFactory() {
|
private static SSLSocketFactory getSimpleTrustedSSLSocketFactory() {
|
||||||
try {
|
try {
|
||||||
TrustManager[] trustAllCerts = new TrustManager[]{
|
TrustManager[] trustAllCerts = new TrustManager[]{
|
||||||
new X509TrustManager() {
|
new X509TrustManager() {
|
||||||
@ -156,4 +159,63 @@ public class DeviceAuthorizer implements Authorizer {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//FIXME - I know hard-cording values is a bad practice , this code is repeating in
|
||||||
|
// several class, so this hard-coding strings will be removed once this code block is moved into a central location
|
||||||
|
// this should be done after the 3.1.0 release.
|
||||||
|
private static SSLSocketFactory getTrustedSSLSocketFactory() {
|
||||||
|
try {
|
||||||
|
String keyStorePassword = ServerConfiguration.getInstance().getFirstProperty("Security.KeyStore.Password");
|
||||||
|
String keyStoreLocation = ServerConfiguration.getInstance().getFirstProperty("Security.KeyStore.Location");
|
||||||
|
String trustStorePassword = ServerConfiguration.getInstance().getFirstProperty(
|
||||||
|
"Security.TrustStore.Password");
|
||||||
|
String trustStoreLocation = ServerConfiguration.getInstance().getFirstProperty(
|
||||||
|
"Security.TrustStore.Location");
|
||||||
|
|
||||||
|
KeyStore keyStore = loadKeyStore(keyStoreLocation,keyStorePassword,"JKS");
|
||||||
|
KeyStore trustStore = loadTrustStore(trustStoreLocation,trustStorePassword);
|
||||||
|
return initSSLConnection(keyStore,keyStorePassword,trustStore);
|
||||||
|
} catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException
|
||||||
|
|CertificateException | IOException | UnrecoverableKeyException e) {
|
||||||
|
log.error("Error while creating the SSL socket factory due to "+e.getMessage(),e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static SSLSocketFactory initSSLConnection(KeyStore keyStore,String keyStorePassword,KeyStore trustStore) throws NoSuchAlgorithmException, UnrecoverableKeyException,
|
||||||
|
KeyStoreException, KeyManagementException {
|
||||||
|
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509");
|
||||||
|
keyManagerFactory.init(keyStore, keyStorePassword.toCharArray());
|
||||||
|
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509");
|
||||||
|
trustManagerFactory.init(trustStore);
|
||||||
|
|
||||||
|
// Create and initialize SSLContext for HTTPS communication
|
||||||
|
SSLContext sslContext = SSLContext.getInstance("SSLv3");
|
||||||
|
sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);
|
||||||
|
SSLContext.setDefault(sslContext);
|
||||||
|
return sslContext.getSocketFactory();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static KeyStore loadKeyStore(String keyStorePath, String ksPassword, String type)
|
||||||
|
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException {
|
||||||
|
InputStream fileInputStream = null;
|
||||||
|
try {
|
||||||
|
char[] keypassChar = ksPassword.toCharArray();
|
||||||
|
KeyStore keyStore = KeyStore.getInstance(type);
|
||||||
|
fileInputStream = new FileInputStream(keyStorePath);
|
||||||
|
keyStore.load(fileInputStream, keypassChar);
|
||||||
|
return keyStore;
|
||||||
|
} finally {
|
||||||
|
if (fileInputStream != null) {
|
||||||
|
fileInputStream.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static KeyStore loadTrustStore(String trustStorePath, String tsPassword)
|
||||||
|
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException {
|
||||||
|
|
||||||
|
return loadKeyStore(trustStorePath,tsPassword,"JKS");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -29,6 +29,7 @@ import feign.jaxrs.JAXRSContract;
|
|||||||
import feign.slf4j.Slf4jLogger;
|
import feign.slf4j.Slf4jLogger;
|
||||||
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.base.ServerConfiguration;
|
||||||
import org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.client.dto.AccessTokenInfo;
|
import org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.client.dto.AccessTokenInfo;
|
||||||
import org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.client.dto.ApiApplicationKey;
|
import org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.client.dto.ApiApplicationKey;
|
||||||
import org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.client.dto.ApiApplicationRegistrationService;
|
import org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.client.dto.ApiApplicationRegistrationService;
|
||||||
@ -37,15 +38,13 @@ import org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.client.
|
|||||||
import org.wso2.carbon.device.mgt.output.adapter.websocket.util.PropertyUtils;
|
import org.wso2.carbon.device.mgt.output.adapter.websocket.util.PropertyUtils;
|
||||||
import org.wso2.carbon.event.output.adapter.core.exception.OutputEventAdapterException;
|
import org.wso2.carbon.event.output.adapter.core.exception.OutputEventAdapterException;
|
||||||
|
|
||||||
import javax.net.ssl.HostnameVerifier;
|
|
||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.*;
|
||||||
import javax.net.ssl.SSLSession;
|
import java.io.FileInputStream;
|
||||||
import javax.net.ssl.SSLSocketFactory;
|
|
||||||
import javax.net.ssl.TrustManager;
|
|
||||||
import javax.net.ssl.X509TrustManager;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.security.KeyManagementException;
|
import java.io.InputStream;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.*;
|
||||||
|
import java.security.cert.CertificateException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -185,16 +184,21 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
|||||||
return refreshTimeOffset;
|
return refreshTimeOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Client getSSLClient() {
|
public static Client getSSLClient() {
|
||||||
return new Client.Default(getTrustedSSLSocketFactory(), new HostnameVerifier() {
|
boolean isIgnoreHostnameVerification = Boolean.parseBoolean(System.getProperty("org.wso2.ignoreHostnameVerification"));
|
||||||
@Override
|
if(isIgnoreHostnameVerification) {
|
||||||
public boolean verify(String s, SSLSession sslSession) {
|
return new Client.Default(getSimpleTrustedSSLSocketFactory(), new HostnameVerifier() {
|
||||||
return true;
|
@Override
|
||||||
}
|
public boolean verify(String s, SSLSession sslSession) {
|
||||||
});
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
return new Client.Default(getTrustedSSLSocketFactory(), null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static SSLSocketFactory getTrustedSSLSocketFactory() {
|
private static SSLSocketFactory getSimpleTrustedSSLSocketFactory() {
|
||||||
try {
|
try {
|
||||||
TrustManager[] trustAllCerts = new TrustManager[]{
|
TrustManager[] trustAllCerts = new TrustManager[]{
|
||||||
new X509TrustManager() {
|
new X509TrustManager() {
|
||||||
@ -217,4 +221,62 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//FIXME - (line 223 - 280 block) I know hard-cording values is a bad practice , this code is repeating in
|
||||||
|
// several class, so this hard-coding strings will be removed once this code block is moved into a central location
|
||||||
|
// this should be done after the 3.1.0 release.
|
||||||
|
private static SSLSocketFactory getTrustedSSLSocketFactory() {
|
||||||
|
try {
|
||||||
|
String keyStorePassword = ServerConfiguration.getInstance().getFirstProperty("Security.KeyStore.Password");
|
||||||
|
String keyStoreLocation = ServerConfiguration.getInstance().getFirstProperty("Security.KeyStore.Location");
|
||||||
|
String trustStorePassword = ServerConfiguration.getInstance().getFirstProperty(
|
||||||
|
"Security.TrustStore.Password");
|
||||||
|
String trustStoreLocation = ServerConfiguration.getInstance().getFirstProperty(
|
||||||
|
"Security.TrustStore.Location");
|
||||||
|
|
||||||
|
KeyStore keyStore = loadKeyStore(keyStoreLocation,keyStorePassword,"JKS");
|
||||||
|
KeyStore trustStore = loadTrustStore(trustStoreLocation,trustStorePassword);
|
||||||
|
return initSSLConnection(keyStore,keyStorePassword,trustStore);
|
||||||
|
} catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException
|
||||||
|
|CertificateException | IOException | UnrecoverableKeyException e) {
|
||||||
|
log.error("Error while creating the SSL socket factory due to "+e.getMessage(),e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static SSLSocketFactory initSSLConnection(KeyStore keyStore, String keyStorePassword, KeyStore trustStore) throws NoSuchAlgorithmException, UnrecoverableKeyException,
|
||||||
|
KeyStoreException, KeyManagementException {
|
||||||
|
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509");
|
||||||
|
keyManagerFactory.init(keyStore, keyStorePassword.toCharArray());
|
||||||
|
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509");
|
||||||
|
trustManagerFactory.init(trustStore);
|
||||||
|
|
||||||
|
// Create and initialize SSLContext for HTTPS communication
|
||||||
|
SSLContext sslContext = SSLContext.getInstance("SSLv3");
|
||||||
|
sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);
|
||||||
|
SSLContext.setDefault(sslContext);
|
||||||
|
return sslContext.getSocketFactory();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static KeyStore loadKeyStore(String keyStorePath, String ksPassword, String type)
|
||||||
|
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException {
|
||||||
|
InputStream fileInputStream = null;
|
||||||
|
try {
|
||||||
|
char[] keypassChar = ksPassword.toCharArray();
|
||||||
|
KeyStore keyStore = KeyStore.getInstance(type);
|
||||||
|
fileInputStream = new FileInputStream(keyStorePath);
|
||||||
|
keyStore.load(fileInputStream, keypassChar);
|
||||||
|
return keyStore;
|
||||||
|
} finally {
|
||||||
|
if (fileInputStream != null) {
|
||||||
|
fileInputStream.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static KeyStore loadTrustStore(String trustStorePath, String tsPassword)
|
||||||
|
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException {
|
||||||
|
|
||||||
|
return loadKeyStore(trustStorePath,tsPassword,"JKS");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>cdmf-transport-adapters</artifactId>
|
<artifactId>cdmf-transport-adapters</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>extensions</artifactId>
|
<artifactId>extensions</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>mb-extensions</artifactId>
|
<artifactId>mb-extensions</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -42,6 +42,7 @@ import org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.config.Aut
|
|||||||
import org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.internal.AuthorizationDataHolder;
|
import org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.internal.AuthorizationDataHolder;
|
||||||
import org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.util.AuthorizationCacheKey;
|
import org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.util.AuthorizationCacheKey;
|
||||||
import org.wso2.carbon.base.MultitenantConstants;
|
import org.wso2.carbon.base.MultitenantConstants;
|
||||||
|
import org.wso2.carbon.base.ServerConfiguration;
|
||||||
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
||||||
import org.wso2.carbon.user.api.UserRealm;
|
import org.wso2.carbon.user.api.UserRealm;
|
||||||
import org.wso2.carbon.user.api.UserStoreException;
|
import org.wso2.carbon.user.api.UserStoreException;
|
||||||
@ -49,15 +50,12 @@ import org.wso2.carbon.user.api.UserStoreException;
|
|||||||
import javax.cache.Cache;
|
import javax.cache.Cache;
|
||||||
import javax.cache.CacheConfiguration;
|
import javax.cache.CacheConfiguration;
|
||||||
import javax.cache.Caching;
|
import javax.cache.Caching;
|
||||||
import javax.net.ssl.HostnameVerifier;
|
import javax.net.ssl.*;
|
||||||
import javax.net.ssl.SSLContext;
|
import java.io.FileInputStream;
|
||||||
import javax.net.ssl.SSLSession;
|
|
||||||
import javax.net.ssl.SSLSocketFactory;
|
|
||||||
import javax.net.ssl.TrustManager;
|
|
||||||
import javax.net.ssl.X509TrustManager;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.security.KeyManagementException;
|
import java.io.InputStream;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.*;
|
||||||
|
import java.security.cert.CertificateException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -258,16 +256,21 @@ public class DeviceAccessBasedMQTTAuthorizer implements IAuthorizer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Client getSSLClient() {
|
public static Client getSSLClient() {
|
||||||
return new Client.Default(getTrustedSSLSocketFactory(), new HostnameVerifier() {
|
boolean isIgnoreHostnameVerification = Boolean.parseBoolean(System.getProperty("org.wso2.ignoreHostnameVerification"));
|
||||||
@Override
|
if(isIgnoreHostnameVerification) {
|
||||||
public boolean verify(String s, SSLSession sslSession) {
|
return new Client.Default(getSimpleTrustedSSLSocketFactory(), new HostnameVerifier() {
|
||||||
return true;
|
@Override
|
||||||
}
|
public boolean verify(String s, SSLSession sslSession) {
|
||||||
});
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
return new Client.Default(getTrustedSSLSocketFactory(), null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static SSLSocketFactory getTrustedSSLSocketFactory() {
|
private static SSLSocketFactory getSimpleTrustedSSLSocketFactory() {
|
||||||
try {
|
try {
|
||||||
TrustManager[] trustAllCerts = new TrustManager[]{
|
TrustManager[] trustAllCerts = new TrustManager[]{
|
||||||
new X509TrustManager() {
|
new X509TrustManager() {
|
||||||
@ -290,4 +293,62 @@ public class DeviceAccessBasedMQTTAuthorizer implements IAuthorizer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//FIXME - I know hard-cording values is a bad practice , this code is repeating in
|
||||||
|
// several class, so this hard-coding strings will be removed once this code block is moved into a central location
|
||||||
|
// this should be done after the 3.1.0 release.
|
||||||
|
private static SSLSocketFactory getTrustedSSLSocketFactory() {
|
||||||
|
try {
|
||||||
|
String keyStorePassword = ServerConfiguration.getInstance().getFirstProperty("Security.KeyStore.Password");
|
||||||
|
String keyStoreLocation = ServerConfiguration.getInstance().getFirstProperty("Security.KeyStore.Location");
|
||||||
|
String trustStorePassword = ServerConfiguration.getInstance().getFirstProperty(
|
||||||
|
"Security.TrustStore.Password");
|
||||||
|
String trustStoreLocation = ServerConfiguration.getInstance().getFirstProperty(
|
||||||
|
"Security.TrustStore.Location");
|
||||||
|
|
||||||
|
KeyStore keyStore = loadKeyStore(keyStoreLocation,keyStorePassword,"JKS");
|
||||||
|
KeyStore trustStore = loadTrustStore(trustStoreLocation,trustStorePassword);
|
||||||
|
return initSSLConnection(keyStore,keyStorePassword,trustStore);
|
||||||
|
} catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException
|
||||||
|
|CertificateException | IOException | UnrecoverableKeyException e) {
|
||||||
|
log.error("Error while creating the SSL socket factory due to "+e.getMessage(),e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static SSLSocketFactory initSSLConnection(KeyStore keyStore,String keyStorePassword,KeyStore trustStore) throws NoSuchAlgorithmException, UnrecoverableKeyException,
|
||||||
|
KeyStoreException, KeyManagementException {
|
||||||
|
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509");
|
||||||
|
keyManagerFactory.init(keyStore, keyStorePassword.toCharArray());
|
||||||
|
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509");
|
||||||
|
trustManagerFactory.init(trustStore);
|
||||||
|
|
||||||
|
// Create and initialize SSLContext for HTTPS communication
|
||||||
|
SSLContext sslContext = SSLContext.getInstance("SSLv3");
|
||||||
|
sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);
|
||||||
|
SSLContext.setDefault(sslContext);
|
||||||
|
return sslContext.getSocketFactory();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static KeyStore loadKeyStore(String keyStorePath, String ksPassword, String type)
|
||||||
|
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException {
|
||||||
|
InputStream fileInputStream = null;
|
||||||
|
try {
|
||||||
|
char[] keypassChar = ksPassword.toCharArray();
|
||||||
|
KeyStore keyStore = KeyStore.getInstance(type);
|
||||||
|
fileInputStream = new FileInputStream(keyStorePath);
|
||||||
|
keyStore.load(fileInputStream, keypassChar);
|
||||||
|
return keyStore;
|
||||||
|
} finally {
|
||||||
|
if (fileInputStream != null) {
|
||||||
|
fileInputStream.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static KeyStore loadTrustStore(String trustStorePath, String tsPassword)
|
||||||
|
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException {
|
||||||
|
|
||||||
|
return loadKeyStore(trustStorePath,tsPassword,"JKS");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -37,16 +37,14 @@ import org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.client.dto
|
|||||||
import org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.client.dto.ApiRegistrationProfile;
|
import org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.client.dto.ApiRegistrationProfile;
|
||||||
import org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.client.dto.TokenIssuerService;
|
import org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.client.dto.TokenIssuerService;
|
||||||
import org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.config.AuthorizationConfigurationManager;
|
import org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.config.AuthorizationConfigurationManager;
|
||||||
|
import org.wso2.carbon.base.ServerConfiguration;
|
||||||
|
|
||||||
import javax.net.ssl.HostnameVerifier;
|
import javax.net.ssl.*;
|
||||||
import javax.net.ssl.SSLContext;
|
import java.io.FileInputStream;
|
||||||
import javax.net.ssl.SSLSession;
|
|
||||||
import javax.net.ssl.SSLSocketFactory;
|
|
||||||
import javax.net.ssl.TrustManager;
|
|
||||||
import javax.net.ssl.X509TrustManager;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.security.KeyManagementException;
|
import java.io.InputStream;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.*;
|
||||||
|
import java.security.cert.CertificateException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a request interceptor to add oauth token header.
|
* This is a request interceptor to add oauth token header.
|
||||||
@ -129,16 +127,21 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
|||||||
tokenIssuerService = null;
|
tokenIssuerService = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Client getSSLClient() {
|
public static Client getSSLClient() {
|
||||||
return new Client.Default(getTrustedSSLSocketFactory(), new HostnameVerifier() {
|
boolean isIgnoreHostnameVerification = Boolean.parseBoolean(System.getProperty("org.wso2.ignoreHostnameVerification"));
|
||||||
@Override
|
if(isIgnoreHostnameVerification) {
|
||||||
public boolean verify(String s, SSLSession sslSession) {
|
return new Client.Default(getSimpleTrustedSSLSocketFactory(), new HostnameVerifier() {
|
||||||
return true;
|
@Override
|
||||||
}
|
public boolean verify(String s, SSLSession sslSession) {
|
||||||
});
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
return new Client.Default(getTrustedSSLSocketFactory(), null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static SSLSocketFactory getTrustedSSLSocketFactory() {
|
private static SSLSocketFactory getSimpleTrustedSSLSocketFactory() {
|
||||||
try {
|
try {
|
||||||
TrustManager[] trustAllCerts = new TrustManager[]{
|
TrustManager[] trustAllCerts = new TrustManager[]{
|
||||||
new X509TrustManager() {
|
new X509TrustManager() {
|
||||||
@ -161,4 +164,62 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//FIXME - I know hard-cording values is a bad practice , this code is repeating in
|
||||||
|
// several class, so this hard-coding strings will be removed once this code block is moved into a central location
|
||||||
|
// this should be done after the 3.1.0 release.
|
||||||
|
private static SSLSocketFactory getTrustedSSLSocketFactory() {
|
||||||
|
try {
|
||||||
|
String keyStorePassword = ServerConfiguration.getInstance().getFirstProperty("Security.KeyStore.Password");
|
||||||
|
String keyStoreLocation = ServerConfiguration.getInstance().getFirstProperty("Security.KeyStore.Location");
|
||||||
|
String trustStorePassword = ServerConfiguration.getInstance().getFirstProperty(
|
||||||
|
"Security.TrustStore.Password");
|
||||||
|
String trustStoreLocation = ServerConfiguration.getInstance().getFirstProperty(
|
||||||
|
"Security.TrustStore.Location");
|
||||||
|
|
||||||
|
KeyStore keyStore = loadKeyStore(keyStoreLocation,keyStorePassword,"JKS");
|
||||||
|
KeyStore trustStore = loadTrustStore(trustStoreLocation,trustStorePassword);
|
||||||
|
return initSSLConnection(keyStore,keyStorePassword,trustStore);
|
||||||
|
} catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException
|
||||||
|
|CertificateException | IOException | UnrecoverableKeyException e) {
|
||||||
|
log.error("Error while creating the SSL socket factory due to "+e.getMessage(),e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static SSLSocketFactory initSSLConnection(KeyStore keyStore,String keyStorePassword,KeyStore trustStore) throws NoSuchAlgorithmException, UnrecoverableKeyException,
|
||||||
|
KeyStoreException, KeyManagementException {
|
||||||
|
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509");
|
||||||
|
keyManagerFactory.init(keyStore, keyStorePassword.toCharArray());
|
||||||
|
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509");
|
||||||
|
trustManagerFactory.init(trustStore);
|
||||||
|
|
||||||
|
// Create and initialize SSLContext for HTTPS communication
|
||||||
|
SSLContext sslContext = SSLContext.getInstance("SSLv3");
|
||||||
|
sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);
|
||||||
|
SSLContext.setDefault(sslContext);
|
||||||
|
return sslContext.getSocketFactory();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static KeyStore loadKeyStore(String keyStorePath, String ksPassword, String type)
|
||||||
|
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException {
|
||||||
|
InputStream fileInputStream = null;
|
||||||
|
try {
|
||||||
|
char[] keypassChar = ksPassword.toCharArray();
|
||||||
|
KeyStore keyStore = KeyStore.getInstance(type);
|
||||||
|
fileInputStream = new FileInputStream(keyStorePath);
|
||||||
|
keyStore.load(fileInputStream, keypassChar);
|
||||||
|
return keyStore;
|
||||||
|
} finally {
|
||||||
|
if (fileInputStream != null) {
|
||||||
|
fileInputStream.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static KeyStore loadTrustStore(String trustStorePath, String tsPassword)
|
||||||
|
throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException {
|
||||||
|
|
||||||
|
return loadKeyStore(trustStorePath,tsPassword,"JKS");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>extensions</artifactId>
|
<artifactId>extensions</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>pull-notification-listeners</artifactId>
|
<artifactId>pull-notification-listeners</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>extensions</artifactId>
|
<artifactId>extensions</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>siddhi-extensions</artifactId>
|
<artifactId>siddhi-extensions</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>siddhi-extensions</artifactId>
|
<artifactId>siddhi-extensions</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>extensions</artifactId>
|
<artifactId>extensions</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>android-plugin</artifactId>
|
<artifactId>android-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>android-plugin</artifactId>
|
<artifactId>android-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,13 +23,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>android-plugin</artifactId>
|
<artifactId>android-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>org.wso2.carbon.device.mgt.mobile.android.ui</artifactId>
|
<artifactId>org.wso2.carbon.device.mgt.mobile.android.ui</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<name>WSO2 Carbon - Mobile Android UI</name>
|
<name>WSO2 Carbon - Mobile Android UI</name>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -84,49 +84,30 @@ function onRequest(context) {
|
|||||||
viewModel["model"] = filteredDeviceData["initialDeviceInfo"]["DEVICE_MODEL"];
|
viewModel["model"] = filteredDeviceData["initialDeviceInfo"]["DEVICE_MODEL"];
|
||||||
}
|
}
|
||||||
if (filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]) {
|
if (filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]) {
|
||||||
if (deviceType == "android") {
|
|
||||||
viewModel["BatteryLevel"] = {};
|
viewModel["BatteryLevel"] = {};
|
||||||
viewModel["BatteryLevel"]["value"] = filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["BATTERY_LEVEL"];
|
viewModel["BatteryLevel"]["value"] = filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["BATTERY_LEVEL"];
|
||||||
|
|
||||||
viewModel["internalMemory"] = {};
|
viewModel["internalMemory"] = {};
|
||||||
viewModel["internalMemory"]["total"] = Math.
|
viewModel["internalMemory"]["total"] = replaceNaNVal(Math.
|
||||||
round(filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] * 100) / 100;
|
round(filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] * 100) / 100);
|
||||||
if (filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] != 0) {
|
if (filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] != 0) {
|
||||||
viewModel["internalMemory"]["usage"] = Math.
|
viewModel["internalMemory"]["usage"] = replaceNaNVal(Math.round((filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] -
|
||||||
round((filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] -
|
filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_AVAILABLE_MEMORY"]) * 100) / 100);
|
||||||
filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_AVAILABLE_MEMORY"])
|
|
||||||
/ filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] * 10000) / 100;
|
|
||||||
} else {
|
} else {
|
||||||
viewModel["internalMemory"]["usage"] = 0;
|
viewModel["internalMemory"]["usage"] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel["externalMemory"] = {};
|
viewModel["externalMemory"] = {};
|
||||||
viewModel["externalMemory"]["total"] = Math.
|
viewModel["externalMemory"]["total"] = replaceNaNVal(Math.
|
||||||
round(filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] * 100) / 100;
|
round(filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] * 100) / 100);
|
||||||
if (filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] != 0) {
|
if (filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] != 0) {
|
||||||
viewModel["externalMemory"]["usage"] = Math.
|
viewModel["externalMemory"]["usage"] = replaceNaNVal(Math.
|
||||||
round((filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] -
|
round((filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] -
|
||||||
filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_AVAILABLE_MEMORY"])
|
filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_AVAILABLE_MEMORY"])
|
||||||
/ filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] * 10000) / 100;
|
/ filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] * 10000) / 100);
|
||||||
} else {
|
} else {
|
||||||
viewModel["externalMemory"]["usage"] = 0;
|
viewModel["externalMemory"]["usage"] = 0;
|
||||||
}
|
}
|
||||||
} else if (deviceType == "ios") {
|
|
||||||
viewModel["BatteryLevel"] = {};
|
|
||||||
viewModel["BatteryLevel"]["value"] = Math. round(filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["BatteryLevel"] * 10000) / 100;
|
|
||||||
|
|
||||||
viewModel["internalMemory"] = {};
|
|
||||||
viewModel["internalMemory"]["total"] = Math.
|
|
||||||
round(filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] * 100) / 100;
|
|
||||||
if (filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] != 0) {
|
|
||||||
viewModel["internalMemory"]["usage"] = Math.
|
|
||||||
round((filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] -
|
|
||||||
filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["AvailableDeviceCapacity"])
|
|
||||||
/ filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] * 10000) / 100;
|
|
||||||
} else {
|
|
||||||
viewModel["internalMemory"]["usage"] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -160,34 +141,32 @@ function onRequest(context) {
|
|||||||
|
|
||||||
viewModel["ramUsage"] = {};
|
viewModel["ramUsage"] = {};
|
||||||
if (filteredDeviceData["latestDeviceInfo"]["totalRAMMemory"] != 0) {
|
if (filteredDeviceData["latestDeviceInfo"]["totalRAMMemory"] != 0) {
|
||||||
viewModel["ramUsage"]["value"] = Math.
|
viewModel["ramUsage"]["value"] = replaceNaNVal(Math.
|
||||||
round((filteredDeviceData["latestDeviceInfo"]["totalRAMMemory"] -
|
round((filteredDeviceData["latestDeviceInfo"]["totalRAMMemory"] -
|
||||||
filteredDeviceData["latestDeviceInfo"]["availableRAMMemory"])
|
filteredDeviceData["latestDeviceInfo"]["availableRAMMemory"])
|
||||||
/ filteredDeviceData["latestDeviceInfo"]["totalRAMMemory"] * 10000) / 100;
|
/ filteredDeviceData["latestDeviceInfo"]["totalRAMMemory"] * 10000) / 100);
|
||||||
} else {
|
} else {
|
||||||
viewModel["ramUsage"]["value"] = 0;
|
viewModel["ramUsage"]["value"] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel["internalMemory"] = {};
|
viewModel["internalMemory"] = {};
|
||||||
viewModel["internalMemory"]["total"] = Math.
|
viewModel["internalMemory"]["total"] = replaceNaNVal(Math.
|
||||||
round(filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] * 100) / 100;
|
round(filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] * 100) / 100);
|
||||||
if (filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] != 0) {
|
if (filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] != 0) {
|
||||||
viewModel["internalMemory"]["usage"] = Math.
|
viewModel["internalMemory"]["usage"] = replaceNaNVal(Math.round((filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] -
|
||||||
round((filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] -
|
filteredDeviceData["latestDeviceInfo"]["internalAvailableMemory"]) * 100) / 100);
|
||||||
filteredDeviceData["latestDeviceInfo"]["internalAvailableMemory"])
|
|
||||||
/ filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] * 10000) / 100;
|
|
||||||
} else {
|
} else {
|
||||||
viewModel["internalMemory"]["usage"] = 0;
|
viewModel["internalMemory"]["usage"] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel["externalMemory"] = {};
|
viewModel["externalMemory"] = {};
|
||||||
viewModel["externalMemory"]["total"] = Math.
|
viewModel["externalMemory"]["total"] = replaceNaNVal(Math.
|
||||||
round(filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] * 100) / 100;
|
round(filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] * 100) / 100);
|
||||||
if (filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] != 0) {
|
if (filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] != 0) {
|
||||||
viewModel["externalMemory"]["usage"] = Math.
|
viewModel["externalMemory"]["usage"] = replaceNaNVal(Math.
|
||||||
round((filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] -
|
round((filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] -
|
||||||
filteredDeviceData["latestDeviceInfo"]["externalAvailableMemory"])
|
filteredDeviceData["latestDeviceInfo"]["externalAvailableMemory"])
|
||||||
/ filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] * 10000) / 100;
|
/ filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] * 10000) / 100);
|
||||||
} else {
|
} else {
|
||||||
viewModel["externalMemory"]["usage"] = 0;
|
viewModel["externalMemory"]["usage"] = 0;
|
||||||
}
|
}
|
||||||
@ -220,4 +199,11 @@ function onRequest(context) {
|
|||||||
deviceViewData["isCloud"] = devicemgtProps['isCloud'];
|
deviceViewData["isCloud"] = devicemgtProps['isCloud'];
|
||||||
deviceViewData["anchor"] = encodeURI(JSON.stringify({ "device" : { "id" : deviceId, "type" : deviceType}}));
|
deviceViewData["anchor"] = encodeURI(JSON.stringify({ "device" : { "id" : deviceId, "type" : deviceType}}));
|
||||||
return deviceViewData;
|
return deviceViewData;
|
||||||
|
|
||||||
|
function replaceNaNVal(val){
|
||||||
|
if(isNaN(val)){
|
||||||
|
return "N/A";
|
||||||
|
}
|
||||||
|
return val;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{{#each controlOperations}}
|
{{#each controlOperations}}
|
||||||
<a {{#unless isDisabled}} class="operation-tile" href="javascript:operationSelect('{{operation}}')" {{else}} href="javascript:void(0)" class="operation-tile op-disabled"{{/unless}}>
|
<a {{#unless isDisabled}} href="javascript:operationSelect('{{operation}}')" {{else}} href="javascript:void(0)" class="operation-tile op-disabled" title="{{disabledText}}" data-toggle="tooltip" {{/unless}}>
|
||||||
{{#if iconFont}}
|
{{#if iconFont}}
|
||||||
<i class="fw {{iconFont}}"></i>
|
<i class="fw {{iconFont}}"></i>
|
||||||
{{else}}
|
{{else}}
|
||||||
@ -132,7 +132,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-5 col-md-6 col-centered">
|
<div class="col-lg-5 col-md-6 col-centered">
|
||||||
<h3>
|
<h3>
|
||||||
<span class="fw-stack">
|
<span class="fw-stack center-block">
|
||||||
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i id="status-icon" class="fw fw-error fw-stack-1x"></i>
|
<i id="status-icon" class="fw fw-error fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -24,7 +24,7 @@ function onRequest(context) {
|
|||||||
var device = context.unit.params.device;
|
var device = context.unit.params.device;
|
||||||
var autoCompleteParams = context.unit.params.autoCompleteParams;
|
var autoCompleteParams = context.unit.params.autoCompleteParams;
|
||||||
var encodedFeaturePayloads = context.unit.params.encodedFeaturePayloads;
|
var encodedFeaturePayloads = context.unit.params.encodedFeaturePayloads;
|
||||||
var allControlOps = operationModule.getControlOperations(device.type);
|
var allControlOps = operationModule.getControlOperations(device);
|
||||||
var filteredControlOps = [];
|
var filteredControlOps = [];
|
||||||
var queryParams = [];
|
var queryParams = [];
|
||||||
var formParams = [];
|
var formParams = [];
|
||||||
|
|||||||
@ -76,6 +76,7 @@ function submitForm(formId) {
|
|||||||
var defaultStatusClasses = "fw fw-stack-1x";
|
var defaultStatusClasses = "fw fw-stack-1x";
|
||||||
var content = $("#operation-response-template").find(".content");
|
var content = $("#operation-response-template").find(".content");
|
||||||
var title = content.find("#title");
|
var title = content.find("#title");
|
||||||
|
title.attr("class","center-block text-center");
|
||||||
var statusIcon = content.find("#status-icon");
|
var statusIcon = content.find("#status-icon");
|
||||||
var description = content.find("#description");
|
var description = content.find("#description");
|
||||||
description.html("");
|
description.html("");
|
||||||
|
|||||||
@ -85,7 +85,8 @@
|
|||||||
class="fw fw-success"></i></span>
|
class="fw fw-success"></i></span>
|
||||||
<span id="cosu-profile-configuration-ok" class="has-success status-icon hidden"><i
|
<span id="cosu-profile-configuration-ok" class="has-success status-icon hidden"><i
|
||||||
class="fw fw-success"></i></span>
|
class="fw fw-success"></i></span>
|
||||||
<span id="cosu-profile-configuration-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
|
<span id="cosu-profile-configuration-error" class="has-error status-icon hidden"><i
|
||||||
|
class="fw fw-error"></i></span>
|
||||||
</a>
|
</a>
|
||||||
<a href="javascript:void(0)" onclick="showAdvanceOperation('app-restriction', this)">
|
<a href="javascript:void(0)" onclick="showAdvanceOperation('app-restriction', this)">
|
||||||
<span class="fw-stack fw-lg">
|
<span class="fw-stack fw-lg">
|
||||||
@ -109,7 +110,8 @@
|
|||||||
class="fw fw-success"></i></span>
|
class="fw fw-success"></i></span>
|
||||||
<span id="runtime-permission-policy-ok" class="has-success status-icon hidden"><i
|
<span id="runtime-permission-policy-ok" class="has-success status-icon hidden"><i
|
||||||
class="fw fw-success"></i></span>
|
class="fw fw-success"></i></span>
|
||||||
<span id="runtime-permission-policy-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
|
<span id="runtime-permission-policy-error" class="has-error status-icon hidden"><i
|
||||||
|
class="fw fw-error"></i></span>
|
||||||
</a>
|
</a>
|
||||||
<a href="javascript:void(0)" class="worker-profile"
|
<a href="javascript:void(0)" class="worker-profile"
|
||||||
onclick="showAdvanceOperation('cosu-system-update-policy', this)">
|
onclick="showAdvanceOperation('cosu-system-update-policy', this)">
|
||||||
@ -157,7 +159,8 @@
|
|||||||
</h2>
|
</h2>
|
||||||
<div class="panel-title-description">
|
<div class="panel-title-description">
|
||||||
Enforce a configured passcode policy on Android devices.
|
Enforce a configured passcode policy on Android devices.
|
||||||
Once this profile is applied, the device owners won't be able to modify the password settings on their devices.
|
Once this profile is applied, the device owners won't be able to modify the password settings on
|
||||||
|
their devices.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="passcode-policy-body" class="panel-collapse panel-body collapse" role="tabpanel"
|
<div id="passcode-policy-body" class="panel-collapse panel-body collapse" role="tabpanel"
|
||||||
@ -307,7 +310,8 @@
|
|||||||
</h2>
|
</h2>
|
||||||
<div class="panel-title-description">
|
<div class="panel-title-description">
|
||||||
Restrict predefined settings on Android devices.
|
Restrict predefined settings on Android devices.
|
||||||
Once this profile is applied, the device owners won't be able to modify the configured settings on their devices.
|
Once this profile is applied, the device owners won't be able to modify the configured settings
|
||||||
|
on their devices.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="camera-body" class="panel-collapse panel-body collapse" role="tabpanel"
|
<div id="camera-body" class="panel-collapse panel-body collapse" role="tabpanel"
|
||||||
@ -337,6 +341,7 @@
|
|||||||
<b>work-profile owner</b> or <b>device owner</b>.</a>
|
<b>work-profile owner</b> or <b>device owner</b>.</a>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<br/>
|
||||||
<div class="wr-input-control worker-profile-or-owner">
|
<div class="wr-input-control worker-profile-or-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disallow-configuring-credentials-enabled" type="checkbox"
|
<input id="disallow-configuring-credentials-enabled" type="checkbox"
|
||||||
@ -518,203 +523,221 @@
|
|||||||
<a id="policy-listing-status-msg"> Below Restrictions are valid only when the Agent is
|
<a id="policy-listing-status-msg"> Below Restrictions are valid only when the Agent is
|
||||||
the
|
the
|
||||||
<b>device owner</b>.</a>
|
<b>device owner</b>.</a>
|
||||||
|
{{#unless isdeviceownerenabled}}
|
||||||
|
<p><i>Please change the configuration <b>'isDeviceOwnerEnabled'</b> to
|
||||||
|
<b>'true'</b> if you have enabled device owner for the agent.</i></p>
|
||||||
|
{{/unless}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="wr-input-control device-owner">
|
<br/>
|
||||||
<label class="wr-input-control checkbox">
|
<div
|
||||||
<input id="disallow-SMS-enabled" type="checkbox" class="operationDataKeys"
|
{{#unless isdeviceownerenabled}}
|
||||||
data-key="disallowSMS"/>
|
class="testing" title="Please change the configuration 'isDeviceOwnerEnabled' to
|
||||||
<span class="helper" title="Having this checked would disallow SMS.">
|
'true' if you have enabled device owner for the agent."
|
||||||
|
{{/unless}}
|
||||||
|
>
|
||||||
|
<div class="wr-input-control device-owner">
|
||||||
|
<label class="wr-input-control checkbox">
|
||||||
|
<input id="disallow-SMS-enabled" type="checkbox" class="operationDataKeys"
|
||||||
|
data-key="disallowSMS"/>
|
||||||
|
<span class="helper" title="Having this checked would disallow SMS.">
|
||||||
Disallow SMS
|
Disallow SMS
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="wr-input-control device-owner">
|
<div class="wr-input-control device-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="volume-adjust-enabled" type="checkbox" class="operationDataKeys"
|
<input id="volume-adjust-enabled" type="checkbox" class="operationDataKeys"
|
||||||
data-key="disallowAdjustVolumeEnabled"/>
|
data-key="disallowAdjustVolumeEnabled"/>
|
||||||
<span class="helper" title="Having this checked would disallow volume adjust.">
|
<span class="helper" title="Having this checked would disallow volume adjust.">
|
||||||
Disallow volume adjust
|
Disallow volume adjust
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="wr-input-control device-owner">
|
<div class="wr-input-control device-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disallow-configuring-cell-broadcast-enabled" type="checkbox"
|
<input id="disallow-configuring-cell-broadcast-enabled" type="checkbox"
|
||||||
class="operationDataKeys"
|
class="operationDataKeys"
|
||||||
data-key="disallowConfigCellBroadcasts"/>
|
data-key="disallowConfigCellBroadcasts"/>
|
||||||
<span class="helper"
|
<span class="helper"
|
||||||
title="Having this checked would disallow configuring cell broadcast.">
|
title="Having this checked would disallow configuring cell broadcast.">
|
||||||
Disallow cell broadcast
|
Disallow cell broadcast
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="wr-input-control device-owner">
|
<div class="wr-input-control device-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disallow-configuring-bluetooth-enabled" type="checkbox"
|
<input id="disallow-configuring-bluetooth-enabled" type="checkbox"
|
||||||
class="operationDataKeys"
|
class="operationDataKeys"
|
||||||
data-key="disallowConfigBluetooth"/>
|
data-key="disallowConfigBluetooth"/>
|
||||||
<span class="helper" title="Having this checked would disallow configuring bluetooth.">
|
<span class="helper"
|
||||||
|
title="Having this checked would disallow configuring bluetooth.">
|
||||||
Disallow configuring bluetooth.
|
Disallow configuring bluetooth.
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="wr-input-control device-owner">
|
<div class="wr-input-control device-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disallow-configuring-mobile-networkst-enabled" type="checkbox"
|
<input id="disallow-configuring-mobile-networkst-enabled" type="checkbox"
|
||||||
class="operationDataKeys"
|
class="operationDataKeys"
|
||||||
data-key="disallowConfigMobileNetworks"/>
|
data-key="disallowConfigMobileNetworks"/>
|
||||||
<span class="helper"
|
<span class="helper"
|
||||||
title="Having this checked would disallow configuring mobile networks.">
|
title="Having this checked would disallow configuring mobile networks.">
|
||||||
Disallow configuring mobile networks
|
Disallow configuring mobile networks
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="wr-input-control device-owner">
|
<div class="wr-input-control device-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disallow-configuring-tethering-enabled" type="checkbox"
|
<input id="disallow-configuring-tethering-enabled" type="checkbox"
|
||||||
class="operationDataKeys"
|
class="operationDataKeys"
|
||||||
data-key="disallowConfigTethering"/>
|
data-key="disallowConfigTethering"/>
|
||||||
<span class="helper" title="Having this checked would disallow configuring tethering.">
|
<span class="helper"
|
||||||
|
title="Having this checked would disallow configuring tethering.">
|
||||||
Disallow configuring tethering
|
Disallow configuring tethering
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="wr-input-control device-owner">
|
<div class="wr-input-control device-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disallow-configuring-Wifi-enabled" type="checkbox" class="operationDataKeys"
|
<input id="disallow-configuring-Wifi-enabled" type="checkbox"
|
||||||
data-key="disallowConfigWifi"/>
|
class="operationDataKeys"
|
||||||
<span class="helper" title="Having this checked would disallow configuring Wifi.">
|
data-key="disallowConfigWifi"/>
|
||||||
|
<span class="helper" title="Having this checked would disallow configuring Wifi.">
|
||||||
Disallow configuring Wifi
|
Disallow configuring Wifi
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="wr-input-control device-owner">
|
<div class="wr-input-control device-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disallow-safe-boot-enabled" type="checkbox" class="operationDataKeys"
|
<input id="disallow-safe-boot-enabled" type="checkbox" class="operationDataKeys"
|
||||||
data-key="disallowSafeBoot"/>
|
data-key="disallowSafeBoot"/>
|
||||||
<span class="helper" title="Having this checked would disallow safe boot.">
|
<span class="helper" title="Having this checked would disallow safe boot.">
|
||||||
Disallow safe boot
|
Disallow safe boot
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="wr-input-control device-owner">
|
<div class="wr-input-control device-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disallow-outgoing-calls-enabled" type="checkbox" class="operationDataKeys"
|
<input id="disallow-outgoing-calls-enabled" type="checkbox"
|
||||||
data-key="disallowOutgoingCalls"/>
|
class="operationDataKeys"
|
||||||
<span class="helper" title="Having this checked would disallow outgoing calls.">
|
data-key="disallowOutgoingCalls"/>
|
||||||
|
<span class="helper" title="Having this checked would disallow outgoing calls.">
|
||||||
Disallow outgoing calls
|
Disallow outgoing calls
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="wr-input-control device-owner">
|
<div class="wr-input-control device-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disallow-mount-physical-media-enabled" type="checkbox"
|
<input id="disallow-mount-physical-media-enabled" type="checkbox"
|
||||||
class="operationDataKeys"
|
class="operationDataKeys"
|
||||||
data-key="disallowMountPhysicalMedia"/>
|
data-key="disallowMountPhysicalMedia"/>
|
||||||
<span class="helper" title="Having this checked would disallow mount physical media.">
|
<span class="helper"
|
||||||
|
title="Having this checked would disallow mount physical media.">
|
||||||
Disallow mount physical media
|
Disallow mount physical media
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="wr-input-control device-owner">
|
<div class="wr-input-control device-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disallow-create-window-enabled" type="checkbox" class="operationDataKeys"
|
<input id="disallow-create-window-enabled" type="checkbox" class="operationDataKeys"
|
||||||
data-key="disallowCreateWindows"/>
|
data-key="disallowCreateWindows"/>
|
||||||
<span class="helper" title="Having this checked would disallow create window.">
|
<span class="helper" title="Having this checked would disallow create window.">
|
||||||
Disallow create window
|
Disallow create window
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="wr-input-control device-owner">
|
<div class="wr-input-control device-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disallow-factory-reset-enabled" type="checkbox" class="operationDataKeys"
|
<input id="disallow-factory-reset-enabled" type="checkbox" class="operationDataKeys"
|
||||||
data-key="disallowFactoryReset"/>
|
data-key="disallowFactoryReset"/>
|
||||||
<span class="helper" title="Having this checked would disallow factory reset.">
|
<span class="helper" title="Having this checked would disallow factory reset.">
|
||||||
Disallow factory reset
|
Disallow factory reset
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="wr-input-control device-owner">
|
<div class="wr-input-control device-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disallow-remove-user-enabled" type="checkbox" class="operationDataKeys"
|
<input id="disallow-remove-user-enabled" type="checkbox" class="operationDataKeys"
|
||||||
data-key="disallowRemoveUser"/>
|
data-key="disallowRemoveUser"/>
|
||||||
<span class="helper" title="Having this checked would disallow remove user.">
|
<span class="helper" title="Having this checked would disallow remove user.">
|
||||||
Disallow remove user
|
Disallow remove user
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="wr-input-control device-owner">
|
<div class="wr-input-control device-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disallow-add-user-enabled" type="checkbox" class="operationDataKeys"
|
<input id="disallow-add-user-enabled" type="checkbox" class="operationDataKeys"
|
||||||
data-key="disallowAddUser"/>
|
data-key="disallowAddUser"/>
|
||||||
<span class="helper" title="Having this checked would disallow add user.">
|
<span class="helper" title="Having this checked would disallow add user.">
|
||||||
Disallow add user
|
Disallow add user
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="wr-input-control device-owner">
|
<div class="wr-input-control device-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disallow-network-reset-enabled" type="checkbox" class="operationDataKeys"
|
<input id="disallow-network-reset-enabled" type="checkbox" class="operationDataKeys"
|
||||||
data-key="disallowNetworkReset"/>
|
data-key="disallowNetworkReset"/>
|
||||||
<span class="helper" title="Having this checked would disallow network reset.">
|
<span class="helper" title="Having this checked would disallow network reset.">
|
||||||
Disallow network reset
|
Disallow network reset
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="wr-input-control device-owner">
|
<div class="wr-input-control device-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disallow-USB-transfer-enabled" type="checkbox" class="operationDataKeys"
|
<input id="disallow-USB-transfer-enabled" type="checkbox" class="operationDataKeys"
|
||||||
data-key="disallowUSBFileTransfer"/>
|
data-key="disallowUSBFileTransfer"/>
|
||||||
<span class="helper" title="Having this checked would disallow USB file transfer.">
|
<span class="helper" title="Having this checked would disallow USB file transfer.">
|
||||||
Disallow USB file transfer
|
Disallow USB file transfer
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="wr-input-control device-owner">
|
<div class="wr-input-control device-owner">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disallow-unmute-microphone-enabled" type="checkbox" class="operationDataKeys"
|
<input id="disallow-unmute-microphone-enabled" type="checkbox"
|
||||||
data-key="disallowUnmuteMicrophone"/>
|
class="operationDataKeys"
|
||||||
<span class="helper" title="Having this checked would disallow unmute microphone.">
|
data-key="disallowUnmuteMicrophone"/>
|
||||||
|
<span class="helper" title="Having this checked would disallow unmute microphone.">
|
||||||
Disallow unmute microphone
|
Disallow unmute microphone
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="device-owner">
|
<div class="">
|
||||||
<ul class="message message-info">
|
<ul class="message message-info">
|
||||||
<i class="icon fw fw-info"></i>
|
<i class="icon fw fw-info"></i>
|
||||||
<a id="policy-listing-status-msg">Below restrictions will be applied on devices with
|
<a id="policy-listing-status-msg">Below restrictions will be applied on devices with
|
||||||
@ -722,7 +745,8 @@
|
|||||||
version 6.0 Marshmallow onwards only.</a>
|
version 6.0 Marshmallow onwards only.</a>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="wr-input-control device-owner">
|
<br/>
|
||||||
|
<div class="wr-input-control">
|
||||||
<label class="wr-input-control checkbox">
|
<label class="wr-input-control checkbox">
|
||||||
<input id="disable-status-bar-enabled" type="checkbox" class="operationDataKeys"
|
<input id="disable-status-bar-enabled" type="checkbox" class="operationDataKeys"
|
||||||
data-key="disableStatusBar"/>
|
data-key="disableStatusBar"/>
|
||||||
@ -754,8 +778,10 @@
|
|||||||
</label>
|
</label>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="panel-title-description">
|
<div class="panel-title-description">
|
||||||
Encrypt data on an Android device when the device is locked and make it readable when the device is unlocked.
|
Encrypt data on an Android device when the device is locked and make it readable when the device
|
||||||
Once this profile is applied, the device owners won't be able to modify the configured settings on their devices.
|
is unlocked.
|
||||||
|
Once this profile is applied, the device owners won't be able to modify the configured settings
|
||||||
|
on their devices.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="encrypt-storage-body" class="panel-collapse panel-body collapse" role="tabpanel"
|
<div id="encrypt-storage-body" class="panel-collapse panel-body collapse" role="tabpanel"
|
||||||
@ -798,7 +824,8 @@
|
|||||||
</h2>
|
</h2>
|
||||||
<div class="panel-title-description">
|
<div class="panel-title-description">
|
||||||
Configure the Wi-Fi settings on Android devices.
|
Configure the Wi-Fi settings on Android devices.
|
||||||
Once this profile is applied, the device owners won't be able to modify the configured settings on their devices.
|
Once this profile is applied, the device owners won't be able to modify the configured settings
|
||||||
|
on their devices.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="wifi-body" class="panel-collapse panel-body collapse" role="tabpanel"
|
<div id="wifi-body" class="panel-collapse panel-body collapse" role="tabpanel"
|
||||||
@ -1083,7 +1110,8 @@
|
|||||||
<div id="cosu-profile-configuration-body" class="panel-collapse panel-body collapse" role="tabpanel"
|
<div id="cosu-profile-configuration-body" class="panel-collapse panel-body collapse" role="tabpanel"
|
||||||
aria-labelledby="cosu-profile-configuration-body">
|
aria-labelledby="cosu-profile-configuration-body">
|
||||||
<hr/>
|
<hr/>
|
||||||
<div id="cosu-profile-configuration-feature-error-msg" class="alert alert-danger hidden" role="alert">
|
<div id="cosu-profile-configuration-feature-error-msg" class="alert alert-danger hidden"
|
||||||
|
role="alert">
|
||||||
<i class="icon fw fw-error"></i><span></span>
|
<i class="icon fw fw-error"></i><span></span>
|
||||||
</div>
|
</div>
|
||||||
<form class="form-horizontal">
|
<form class="form-horizontal">
|
||||||
@ -1092,7 +1120,7 @@
|
|||||||
<label class="control-label">Restrict device operation time</label>
|
<label class="control-label">Restrict device operation time</label>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input type="checkbox" id="gridGuideToggle" data-toggle="collapse"
|
<input type="checkbox" id="gridGuideToggle" data-toggle="collapse"
|
||||||
data-target="#cosu-profile-restrict-operation-time" >
|
data-target="#cosu-profile-restrict-operation-time">
|
||||||
<span class="helper"></span>
|
<span class="helper"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -1248,7 +1276,8 @@
|
|||||||
</h2>
|
</h2>
|
||||||
<div class="panel-title-description">
|
<div class="panel-title-description">
|
||||||
Configure the VPN settings on Android devices.
|
Configure the VPN settings on Android devices.
|
||||||
Once this profile is applied, the device owners won't be able to modify the configured settings on their devices.
|
Once this profile is applied, the device owners won't be able to modify the configured settings
|
||||||
|
on their devices.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="vpn-body" class="panel-collapse panel-body collapse" role="tabpanel"
|
<div id="vpn-body" class="panel-collapse panel-body collapse" role="tabpanel"
|
||||||
@ -1320,7 +1349,8 @@
|
|||||||
</label>
|
</label>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="panel-title-description">
|
<div class="panel-title-description">
|
||||||
Configure these settings to manage the applications in the work profile. </div>
|
Configure these settings to manage the applications in the work profile.
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="work-profile-policy-body" class="panel-collapse panel-body collapse" role="tabpanel"
|
<div id="work-profile-policy-body" class="panel-collapse panel-body collapse" role="tabpanel"
|
||||||
aria-labelledby="work-profile-policy-body">
|
aria-labelledby="work-profile-policy-body">
|
||||||
@ -1353,11 +1383,13 @@
|
|||||||
<div class="wr-input-control">
|
<div class="wr-input-control">
|
||||||
<label class="wr-input-label" for="work-profile-policy-enable-system-apps">
|
<label class="wr-input-label" for="work-profile-policy-enable-system-apps">
|
||||||
Enable System Apps
|
Enable System Apps
|
||||||
<span class="helper" title="The system applications that needs to enabled in the work-profile.">
|
<span class="helper"
|
||||||
|
title="The system applications that needs to enabled in the work-profile.">
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
<br>
|
<br>
|
||||||
(Provide the exact package name. Multiple package names can be provided as comma separated values. Ex: com.google.android.apps.maps,
|
(Provide the exact package name. Multiple package names can be provided as comma separated
|
||||||
|
values. Ex: com.google.android.apps.maps,
|
||||||
com.google.android.calculator)
|
com.google.android.calculator)
|
||||||
</label>
|
</label>
|
||||||
<textarea id="workProfilePolicyEnableSystemApps" type="text"
|
<textarea id="workProfilePolicyEnableSystemApps" type="text"
|
||||||
@ -1367,11 +1399,13 @@
|
|||||||
<div class="wr-input-control">
|
<div class="wr-input-control">
|
||||||
<label class="wr-input-label" for="work-profile-policy-hide-system-apps">
|
<label class="wr-input-label" for="work-profile-policy-hide-system-apps">
|
||||||
Hide System Apps
|
Hide System Apps
|
||||||
<span class="helper" title="The system applications that needs to be hidden in the work-profile.">
|
<span class="helper"
|
||||||
|
title="The system applications that needs to be hidden in the work-profile.">
|
||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
<br>
|
<br>
|
||||||
(Provide the exact package name. Multiple package names can be provided as comma separated values. Ex: com.google.android.apps.maps,
|
(Provide the exact package name. Multiple package names can be provided as comma separated
|
||||||
|
values. Ex: com.google.android.apps.maps,
|
||||||
com.google.android.calculator)
|
com.google.android.calculator)
|
||||||
</label>
|
</label>
|
||||||
<textarea id="work-profile-policy-hide-system-apps" class="form-control operationDataKeys"
|
<textarea id="work-profile-policy-hide-system-apps" class="form-control operationDataKeys"
|
||||||
@ -1380,10 +1414,12 @@
|
|||||||
<div class="wr-input-control">
|
<div class="wr-input-control">
|
||||||
<label class="wr-input-label" for="work-profile-policy-unhide-system-apps">
|
<label class="wr-input-label" for="work-profile-policy-unhide-system-apps">
|
||||||
Unhide System Apps
|
Unhide System Apps
|
||||||
<span class="helper" title=" The system applications that needs to be shown in the work-profile."></span>
|
<span class="helper"
|
||||||
|
title=" The system applications that needs to be shown in the work-profile."></span>
|
||||||
</span>
|
</span>
|
||||||
<br>
|
<br>
|
||||||
(Provide the exact package name. Multiple package names can be provided as comma separated values. Ex: com.google.android.apps.maps,
|
(Provide the exact package name. Multiple package names can be provided as comma separated
|
||||||
|
values. Ex: com.google.android.apps.maps,
|
||||||
com.google.android.calculator)
|
com.google.android.calculator)
|
||||||
</label>
|
</label>
|
||||||
<textarea id="work-profile-policy-unhide-system-apps" class="form-control operationDataKeys"
|
<textarea id="work-profile-policy-unhide-system-apps" class="form-control operationDataKeys"
|
||||||
@ -1397,7 +1433,8 @@
|
|||||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||||
</span>
|
</span>
|
||||||
<br>
|
<br>
|
||||||
(Provide the exact package name. Multiple package names can be provided as comma separated values. Ex: com.google.android.apps.maps,
|
(Provide the exact package name. Multiple package names can be provided as comma separated
|
||||||
|
values. Ex: com.google.android.apps.maps,
|
||||||
com.google.android.calculator)
|
com.google.android.calculator)
|
||||||
</label>
|
</label>
|
||||||
<textarea id="work-profile-policy-install-playstore-apps" class="form-control operationDataKeys"
|
<textarea id="work-profile-policy-install-playstore-apps" class="form-control operationDataKeys"
|
||||||
@ -1492,7 +1529,8 @@
|
|||||||
<span class="index"></span>
|
<span class="index"></span>
|
||||||
</td>
|
</td>
|
||||||
<td data-title="App Name">
|
<td data-title="App Name">
|
||||||
<input type="text" class="form-control grid-input-text" data-child-key="appName"
|
<input type="text" class="form-control grid-input-text"
|
||||||
|
data-child-key="appName"
|
||||||
maxlength="50" data-default="" placeholder="[ Android Pay ]"/>
|
maxlength="50" data-default="" placeholder="[ Android Pay ]"/>
|
||||||
</td>
|
</td>
|
||||||
<td data-title="Package Name">
|
<td data-title="Package Name">
|
||||||
@ -1516,7 +1554,8 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="list-group-item-actions">
|
<span class="list-group-item-actions">
|
||||||
<a href="#runtime-permission-applications-grid" class="grid-input-remove"
|
<a href="#runtime-permission-applications-grid"
|
||||||
|
class="grid-input-remove"
|
||||||
data-click-event="remove-form">
|
data-click-event="remove-form">
|
||||||
<span class="fw-stack helper" title="Remove Entry">
|
<span class="fw-stack helper" title="Remove Entry">
|
||||||
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
@ -1538,7 +1577,8 @@
|
|||||||
Already granted or denied permissions are not affected by this policy.
|
Already granted or denied permissions are not affected by this policy.
|
||||||
<br>
|
<br>
|
||||||
<i class="icon fw fw-info"></i>
|
<i class="icon fw fw-info"></i>
|
||||||
Permissions can be granted or revoked only for applications built with a Target SDK Version of Android Marshmallow or later.
|
Permissions can be granted or revoked only for applications built with a Target SDK Version
|
||||||
|
of Android Marshmallow or later.
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1560,7 +1600,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="panel-title-description">
|
<div class="panel-title-description">
|
||||||
Configure the settings to install system updates on single-purpose or COSU devices.
|
Configure the settings to install system updates on single-purpose or COSU devices.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="cosu-system-update-policy-body" class="panel-collapse panel-body collapse"
|
<div id="cosu-system-update-policy-body" class="panel-collapse panel-body collapse"
|
||||||
|
|||||||
@ -68,12 +68,12 @@
|
|||||||
},
|
},
|
||||||
"DEVICE_REBOOT": {
|
"DEVICE_REBOOT": {
|
||||||
"icon": "fw-refresh",
|
"icon": "fw-refresh",
|
||||||
"isDisabled" : true,
|
"filter" : {"property" : "ownership", "value" : "COPE", "text": "This feature is only available in COPE/COSU"},
|
||||||
"permission": "/device-mgt/devices/owning-device/operations/android/reboot"
|
"permission": "/device-mgt/devices/owning-device/operations/android/reboot"
|
||||||
},
|
},
|
||||||
"UPGRADE_FIRMWARE": {
|
"UPGRADE_FIRMWARE": {
|
||||||
"icon": "fw-hardware",
|
"icon": "fw-hardware",
|
||||||
"isDisabled" : true,
|
"filter" : {"property" : "ownership", "value" : "COPE", "text": "This feature is only available in COPE/COSU"},
|
||||||
"formParams": [
|
"formParams": [
|
||||||
{
|
{
|
||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>android-plugin</artifactId>
|
<artifactId>android-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>mobile-plugins</artifactId>
|
<artifactId>mobile-plugins</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>windows-plugin</artifactId>
|
<artifactId>windows-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,13 +23,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>windows-plugin</artifactId>
|
<artifactId>windows-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>org.wso2.carbon.device.mgt.mobile.windows.ui</artifactId>
|
<artifactId>org.wso2.carbon.device.mgt.mobile.windows.ui</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<name>WSO2 Carbon - Mobile Windows UI</name>
|
<name>WSO2 Carbon - Mobile Windows UI</name>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
{{unit "cdmf.unit.device.type.windows.leaflet"}}
|
|
||||||
{{unit "cdmf.unit.lib.editable"}}
|
{{unit "cdmf.unit.lib.editable"}}
|
||||||
{{unit "cdmf.unit.lib.qrcode"}}
|
{{unit "cdmf.unit.lib.qrcode"}}
|
||||||
{{unit "cdmf.unit.device.type.qr-modal"}}
|
{{unit "cdmf.unit.device.type.qr-modal"}}
|
||||||
@ -72,14 +71,33 @@
|
|||||||
{{/zone}}
|
{{/zone}}
|
||||||
|
|
||||||
{{#zone "device-details-tab-injected"}}
|
{{#zone "device-details-tab-injected"}}
|
||||||
<li><a data-toggle="tab" href="#location">Location</a></li>
|
<li><a data-toggle="tab" href="#location"
|
||||||
|
data-lat="{{device.location.latitude}}"
|
||||||
|
data-long="{{device.location.longitude}}"
|
||||||
|
class="initGeoLocationLink">Location</a></li>
|
||||||
<li><a data-toggle="tab" href="#policy">Policy Compliance</a></li>
|
<li><a data-toggle="tab" href="#policy">Policy Compliance</a></li>
|
||||||
{{/zone}}
|
{{/zone}}
|
||||||
|
|
||||||
{{#zone "device-view-tab-injected-conents"}}
|
{{#zone "device-view-tab-injected-conents"}}
|
||||||
<div id="location" class="tab-pane fade ">
|
<div id="location" class="tab-pane fade ">
|
||||||
<iframe width="100%" height="100%" frameborder="0" style="border:0"
|
{{#if device.location}}
|
||||||
src="https://www.google.com/maps/embed/v1/place?q=place_id:ChIJk_gsqyVZ4joR4UxR7brwMnA&key=AIzaSyChgf100i4rBz6neCNRyK1D05g9VLY8jvo" allowfullscreen></iframe>
|
<div class="tab-actions">
|
||||||
|
<div class="action-btn-container" id="location-action-bar">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
{{unit "cdmf.unit.geo-dashboard" device=device noGeoFencing=false hideSearch=true}}
|
||||||
|
{{else}}
|
||||||
|
<div id="map-error" class="message message-warning">
|
||||||
|
<h4 class="remove-margin">
|
||||||
|
<i class="icon fw fw-warning"></i>
|
||||||
|
Device location information is not available.
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<p class="add-padding-5x"></p>
|
||||||
|
<p class="add-padding-5x"></p>
|
||||||
|
<p class="add-padding-5x"></p>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div id="policy" class="tab-pane fade">
|
<div id="policy" class="tab-pane fade">
|
||||||
<div id="policy-list-container">
|
<div id="policy-list-container">
|
||||||
@ -112,7 +130,5 @@
|
|||||||
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
|
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
|
||||||
type="text/x-handlebars-template"></script>
|
type="text/x-handlebars-template"></script>
|
||||||
{{js "js/device-detail.js"}}
|
{{js "js/device-detail.js"}}
|
||||||
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true"></script>
|
|
||||||
{{js "js/load-map.js"}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/zone}}
|
{{/zone}}
|
||||||
|
|||||||
@ -74,6 +74,7 @@ function onRequest(context) {
|
|||||||
viewModel["location"] = {};
|
viewModel["location"] = {};
|
||||||
viewModel["location"]["latitude"] = filteredDeviceData["latestDeviceInfo"]["location"]["latitude"];
|
viewModel["location"]["latitude"] = filteredDeviceData["latestDeviceInfo"]["location"]["latitude"];
|
||||||
viewModel["location"]["longitude"] = filteredDeviceData["latestDeviceInfo"]["location"]["longitude"];
|
viewModel["location"]["longitude"] = filteredDeviceData["latestDeviceInfo"]["location"]["longitude"];
|
||||||
|
viewModel["location"]["updatedTime"] = filteredDeviceData["latestDeviceInfo"]["location"]["updatedTime"];
|
||||||
}
|
}
|
||||||
if (filteredDeviceData["latestDeviceInfo"]["vendor"] && filteredDeviceData["latestDeviceInfo"]["deviceModel"]) {
|
if (filteredDeviceData["latestDeviceInfo"]["vendor"] && filteredDeviceData["latestDeviceInfo"]["deviceModel"]) {
|
||||||
viewModel["vendor"] = filteredDeviceData["latestDeviceInfo"]["vendor"];
|
viewModel["vendor"] = filteredDeviceData["latestDeviceInfo"]["vendor"];
|
||||||
@ -96,7 +97,7 @@ function onRequest(context) {
|
|||||||
if (!filteredDeviceData["initialDeviceInfo"] && !filteredDeviceData["latestDeviceInfo"]) {
|
if (!filteredDeviceData["initialDeviceInfo"] && !filteredDeviceData["latestDeviceInfo"]) {
|
||||||
viewModel["deviceInfoAvailable"] = false;
|
viewModel["deviceInfoAvailable"] = false;
|
||||||
}
|
}
|
||||||
|
viewModel.locationHistory = stringify(filteredDeviceData["locationHistory"]);
|
||||||
deviceViewData["device"] = viewModel;
|
deviceViewData["device"] = viewModel;
|
||||||
} else if (response["status"] == "unauthorized") {
|
} else if (response["status"] == "unauthorized") {
|
||||||
deviceViewData["deviceFound"] = true;
|
deviceViewData["deviceFound"] = true;
|
||||||
|
|||||||
@ -1,54 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 map;
|
|
||||||
|
|
||||||
function loadLeafletMap() {
|
|
||||||
var deviceLocationID = "#device-location",
|
|
||||||
lat = $(deviceLocationID).data("lat"),
|
|
||||||
long = $(deviceLocationID).data("long"),
|
|
||||||
container = "device-location",
|
|
||||||
zoomLevel = 13,
|
|
||||||
tileSet = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
|
|
||||||
attribution = "© <a href='https://openstreetmap.org/copyright'>OpenStreetMap</a> contributors";
|
|
||||||
|
|
||||||
if (lat && long) {
|
|
||||||
map = L.map(container).setView([lat, long], zoomLevel);
|
|
||||||
L.tileLayer(tileSet, {attribution: attribution}).addTo(map);
|
|
||||||
L.marker([lat, long]).addTo(map).bindPopup("Device is here...").openPopup();
|
|
||||||
|
|
||||||
$("#map-error").hide();
|
|
||||||
$("#device-location").show();
|
|
||||||
} else {
|
|
||||||
$("#device-location").hide();
|
|
||||||
$("#map-error").show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
$("a[data-toggle='tab']").on("shown.bs.tab", function() {
|
|
||||||
var url = $(this).prop("href");
|
|
||||||
var hash = url.substring(url.indexOf("#") + 1);
|
|
||||||
|
|
||||||
if (hash == "device_location_tab") {
|
|
||||||
if (!map) {
|
|
||||||
loadLeafletMap();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@ -22,7 +22,7 @@ function onRequest(context) {
|
|||||||
var device = context.unit.params.device;
|
var device = context.unit.params.device;
|
||||||
var autoCompleteParams = context.unit.params.autoCompleteParams;
|
var autoCompleteParams = context.unit.params.autoCompleteParams;
|
||||||
var encodedFeaturePayloads=context.unit.params.encodedFeaturePayloads;
|
var encodedFeaturePayloads=context.unit.params.encodedFeaturePayloads;
|
||||||
var controlOperations = operationModule.getControlOperations(device.type);
|
var controlOperations = operationModule.getControlOperations(device);
|
||||||
var queryParams = [];
|
var queryParams = [];
|
||||||
var formParams = [];
|
var formParams = [];
|
||||||
var pathParams = [];
|
var pathParams = [];
|
||||||
|
|||||||
@ -51,7 +51,7 @@ var utils = function () {
|
|||||||
};
|
};
|
||||||
// calling dynamic client app registration service endpoint
|
// calling dynamic client app registration service endpoint
|
||||||
var requestURL = deviceMgtProps["oauthProvider"]["appRegistration"]
|
var requestURL = deviceMgtProps["oauthProvider"]["appRegistration"]
|
||||||
["dynamicClientAppRegistrationServiceURL"];
|
["apiManagerClientAppRegistrationServiceURL"];
|
||||||
var requestPayload = dcAppProperties;
|
var requestPayload = dcAppProperties;
|
||||||
var encodedBasicOauth = publicMethods.encode(username + ":" + password);
|
var encodedBasicOauth = publicMethods.encode(username + ":" + password);
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>windows-plugin</artifactId>
|
<artifactId>windows-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>mobile-plugins</artifactId>
|
<artifactId>mobile-plugins</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>analytics-feature</artifactId>
|
<artifactId>analytics-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,13 +23,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>analytics-feature</artifactId>
|
<artifactId>analytics-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>org.wso2.carbon.device.mgt.iot.analytics.feature</artifactId>
|
<artifactId>org.wso2.carbon.device.mgt.iot.analytics.feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>WSO2 Carbon - IoT Server Analytics Feature</name>
|
<name>WSO2 Carbon - IoT Server Analytics Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
|
|||||||
@ -23,13 +23,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>analytics-feature</artifactId>
|
<artifactId>analytics-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>org.wso2.carbon.iot.device.statistics.dashboard.feature</artifactId>
|
<artifactId>org.wso2.carbon.iot.device.statistics.dashboard.feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>WSO2 Carbon - IoT Server Analytics Feature</name>
|
<name>WSO2 Carbon - IoT Server Analytics Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>analytics-feature</artifactId>
|
<artifactId>analytics-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,13 +23,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>androidsense-plugin-feature</artifactId>
|
<artifactId>androidsense-plugin-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature</artifactId>
|
<artifactId>org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>WSO2 Carbon - IoT Server Android Sense Analytics Feature</name>
|
<name>WSO2 Carbon - IoT Server Android Sense Analytics Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
|
|||||||
@ -23,13 +23,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>androidsense-plugin-feature</artifactId>
|
<artifactId>androidsense-plugin-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>org.wso2.carbon.device.mgt.iot.androidsense.backend.feature</artifactId>
|
<artifactId>org.wso2.carbon.device.mgt.iot.androidsense.backend.feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>WSO2 Carbon - IoT Server Android Sense Backend Feature</name>
|
<name>WSO2 Carbon - IoT Server Android Sense Backend Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
|
|||||||
@ -23,13 +23,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>androidsense-plugin-feature</artifactId>
|
<artifactId>androidsense-plugin-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>org.wso2.carbon.device.mgt.iot.androidsense.ui.feature</artifactId>
|
<artifactId>org.wso2.carbon.device.mgt.iot.androidsense.ui.feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>WSO2 Carbon - IoT Server Android Sense UI Feature</name>
|
<name>WSO2 Carbon - IoT Server Android Sense UI Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>device-types-feature</artifactId>
|
<artifactId>device-types-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>arduino-plugin-feature</artifactId>
|
<artifactId>arduino-plugin-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>arduino-plugin-feature</artifactId>
|
<artifactId>arduino-plugin-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>arduino-plugin-feature</artifactId>
|
<artifactId>arduino-plugin-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>device-types-feature</artifactId>
|
<artifactId>device-types-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,13 +22,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>device-types-feature</artifactId>
|
<artifactId>device-types-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>WSO2 Carbon - Device Management IoT Plugins Feature</name>
|
<name>WSO2 Carbon - Device Management IoT Plugins Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>raspberrypi-plugin-feature</artifactId>
|
<artifactId>raspberrypi-plugin-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>raspberrypi-plugin-feature</artifactId>
|
<artifactId>raspberrypi-plugin-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>raspberrypi-plugin-feature</artifactId>
|
<artifactId>raspberrypi-plugin-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>device-types-feature</artifactId>
|
<artifactId>device-types-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>virtual-fire-alarm-plugin-feature</artifactId>
|
<artifactId>virtual-fire-alarm-plugin-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>virtual-fire-alarm-plugin-feature</artifactId>
|
<artifactId>virtual-fire-alarm-plugin-feature</artifactId>
|
||||||
<version>4.0.18-SNAPSHOT</version>
|
<version>4.0.29-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user