Merge branch 'cloud-3.1.0'

revert-dabc3590
kamidu 8 years ago
commit 564c188b83

@ -1,5 +1,4 @@
{{unit "cdmf.unit.device.type.android.leaflet"}} {{unit "cdmf.unit.device.type.android.leaflet"}}
{{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"}}
@ -52,41 +51,16 @@
<tr role="row" class="even"> <tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Status</td> <td class="sorting_1" style="padding:10px 15px; width: 15%;">Status</td>
<td style="padding:10px 15px;"> <td style="padding:10px 15px;">
{{#if permissions.CHANGE_DEVICE_STATUS}} {{#equal device.status "ACTIVE"}}<span><i
{{#equal device.status "ACTIVE"}}<span><i id="statusIcon" class="fw fw-success icon-success"></i>Active</span>{{/equal}}
class="fw fw-success icon-success"></i> {{#equal device.status "INACTIVE"}}<span><i
<a href="#" id="status" data-type="select" data-pk="1" class="fw fw-warning icon-warning"></i>Inactive</span>{{/equal}}
data-title="Select status" {{#equal device.status "BLOCKED"}}<span><i
selectedValue="Active"></a> class="fw fw-remove icon-danger"></i>Blocked</span>{{/equal}}
</span>{{/equal}} {{#equal device.status "REMOVED"}}<span><i
{{#equal device.status "INACTIVE"}}<span><i id="statusIcon" class="fw fw-delete icon-danger"></i>Removed</span>{{/equal}}
class="fw fw-warning icon-warning"></i> {{#equal device.status "UNREACHABLE"}}<span><i
<a href="#" id="status" data-type="select" data-pk="1" class="fw fw-warning icon-warning"></i>Unreachable</span>{{/equal}}
data-title="Select status"
selectedValue="Inactive"></a>
</span>{{/equal}}
{{#equal device.status "BLOCKED"}}<span><i id="statusIcon"
class="fw fw-remove icon-danger"></i>
<a href="#" id="status" data-type="select" data-pk="1"
data-title="Select status"
selectedValue="Blocked"></a>
</span>{{/equal}}
{{#equal device.status "REMOVED"}}<span><i id="statusIcon"
class="fw fw-delete icon-danger"></i>
<a href="#" id="status" data-type="select" data-pk="1"
data-title="Select status"
selectedValue="Removed"></a>
</span>{{/equal}}
{{else}}
{{#equal device.status "ACTIVE"}}<span><i
class="fw fw-success icon-success"></i> Active</span>{{/equal}}
{{#equal device.status "INACTIVE"}}<span><i
class="fw fw-warning icon-warning"></i> Inactive</span>{{/equal}}
{{#equal device.status "BLOCKED"}}<span><i
class="fw fw-remove icon-danger"></i> Blocked</span>{{/equal}}
{{#equal device.status "REMOVED"}}<span><i
class="fw fw-delete icon-danger"></i> Removed</span>{{/equal}}
{{/if}}
</td> </td>
</tr> </tr>
{{/if}} {{/if}}
@ -147,7 +121,7 @@
</div> </div>
<div class="add-margin-top-4x"> <div class="add-margin-top-4x">
{{unit "cdmf.unit.device.type.android.operation-bar" device=device {{unit "cdmf.unit.device.type.android.operation-bar" device=device
backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}} backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}}
</div> </div>
{{/if}} {{/if}}
{{/zone}} {{/zone}}
@ -356,7 +330,17 @@
</a> </a>
</h4> </h4>
</div> </div>
<div class="panel-heading display-none-xs">Device Location</div> <div class="panel-heading display-none-xs">
Device Location
<span>
<a href="javascript:void(0);" id="refresh-location">
<i class="fw fw-refresh"></i>
</a>
</span>
<div id="map-spinner" class="wr-advance-operations-init hidden">
<i class="fw fw-settings fw-spin fw-2x"></i> Fetching the latest location...
</div>
</div>
<div id="collapseThree" class="panel-collapse collapse in" role="tabpanel" <div id="collapseThree" class="panel-collapse collapse in" role="tabpanel"
aria-labelledby="device_location"> aria-labelledby="device_location">
<div class="panel-body"> <div class="panel-body">

@ -35,6 +35,37 @@ var InitiateViewOption = null;
serviceUrl = "/api/device-mgt/android/v1.0/admin/devices/info"; serviceUrl = "/api/device-mgt/android/v1.0/admin/devices/info";
serviceUrlLocal = "/api/device-mgt/android/v1.0/admin/devices/location"; serviceUrlLocal = "/api/device-mgt/android/v1.0/admin/devices/location";
} }
if (serviceUrl) {
invokerUtil.post(
serviceUrl,
payload,
// success-callback
function () {
$(".panel-body").show();
},
// error-callback
function () {
var defaultInnerHTML =
"<br><p class='fw-warning'>Device data may not have been updated. Please refresh to try again.<p>";
$(".panel-body").append(defaultInnerHTML);
}
);
invokerUtil.post(
serviceUrlLocal,
payload,
// success-callback
function () {
$(".panel-body").show();
},
// error-callback
function () {
var defaultInnerHTML =
"<br><p class='fw-warning'>Device data may not have been updated. Please refresh to try again.<p>";
$(".panel-body").append(defaultInnerHTML);
}
);
}
$(".media.tab-responsive [data-toggle=tab]").on("shown.bs.tab", function (e) { $(".media.tab-responsive [data-toggle=tab]").on("shown.bs.tab", function (e) {
var activeTabPane = $(e.target).attr("href"); var activeTabPane = $(e.target).attr("href");
@ -55,12 +86,12 @@ var InitiateViewOption = null;
}); });
$('.media.tab-responsive a[data-toggle="collapse"]').on('click',function(){ $('.media.tab-responsive a[data-toggle="collapse"]').on('click', function () {
var clickedPanel = $(this).attr('href'); var clickedPanel = $(this).attr('href');
if($(clickedPanel).hasClass('in')){ if ($(clickedPanel).hasClass('in')) {
$(clickedPanel).collapse('hide'); $(clickedPanel).collapse('hide');
}else{ } else {
$(clickedPanel).collapse('show'); $(clickedPanel).collapse('show');
} }
}); });
@ -130,26 +161,26 @@ var InitiateViewOption = null;
var parentHeight = $(arrow).parent().innerHeight(); var parentHeight = $(arrow).parent().innerHeight();
if($(selectedTab).prev().length){ if ($(selectedTab).prev().length) {
$(selectedTab).prevAll().each(function() { $(selectedTab).prevAll().each(function () {
totalHeight += $(this).innerHeight(); totalHeight += $(this).innerHeight();
}); });
arrowPosition = totalHeight + (selectedTabHeight / 2); arrowPosition = totalHeight + (selectedTabHeight / 2);
}else{ } else {
arrowPosition = selectedTabHeight / 2; arrowPosition = selectedTabHeight / 2;
} }
if(arrowPosition >= parentHeight){ if (arrowPosition >= parentHeight) {
parentHeight = arrowPosition + 50; parentHeight = arrowPosition + 50;
$(arrow).siblings(".panel.active").height(parentHeight); $(arrow).siblings(".panel.active").height(parentHeight);
}else{ } else {
$(arrow).parent().removeAttr("style"); $(arrow).parent().removeAttr("style");
} }
$(arrow).css("top", arrowPosition - 10); $(arrow).css("top", arrowPosition - 10);
} }
$(document).ready(function() { $(document).ready(function () {
$(".device-detail-body").removeClass("hidden"); $(".device-detail-body").removeClass("hidden");
$("#loading-content").remove(); $("#loading-content").remove();
loadApplicationsList(); loadApplicationsList();
@ -165,7 +196,7 @@ var InitiateViewOption = null;
loadApplicationsList(); loadApplicationsList();
}); });
}); });
function loadOperationsLog(update) { function loadOperationsLog(update) {
var owner = $("#device-owner").data("owner"); var owner = $("#device-owner").data("owner");
var operationsLogTable = "#operations-log-table"; var operationsLogTable = "#operations-log-table";
@ -178,12 +209,12 @@ var InitiateViewOption = null;
serverSide: true, serverSide: true,
processing: false, processing: false,
searching: false, searching: false,
ordering: false, ordering: false,
pageLength : 10, pageLength: 10,
order: [], order: [],
ajax: { ajax: {
url: "/devicemgt/api/operation/paginate", url: "/devicemgt/api/operation/paginate",
data: {deviceId : deviceIdentifier, deviceType: deviceType, owner:owner}, data: {deviceId: deviceIdentifier, deviceType: deviceType, owner: owner},
dataSrc: function (json) { dataSrc: function (json) {
$("#operations-spinner").addClass("hidden"); $("#operations-spinner").addClass("hidden");
$("#operations-log-container").empty(); $("#operations-log-container").empty();
@ -191,43 +222,43 @@ var InitiateViewOption = null;
} }
}, },
columnDefs: [ columnDefs: [
{targets: 0, data: "code" }, {targets: 0, data: "code"},
{targets: 1, data: "status", render: {
function (status) { targets: 1, data: "status", render: function (status) {
var html; var html;
switch (status) { switch (status) {
case "COMPLETED" : case "COMPLETED" :
html = "<span><i class='fw fw-success icon-success'></i> Completed</span>"; html = "<span><i class='fw fw-success icon-success'></i> Completed</span>";
break; break;
case "PENDING" : case "PENDING" :
html = "<span><i class='fw fw-warning icon-warning'></i> Pending</span>"; html = "<span><i class='fw fw-warning icon-warning'></i> Pending</span>";
break; break;
case "ERROR" : case "ERROR" :
html = "<span><i class='fw fw-error icon-danger'></i> Error</span>"; html = "<span><i class='fw fw-error icon-danger'></i> Error</span>";
break; break;
case "IN_PROGRESS" : case "IN_PROGRESS" :
html = "<span><i class='fw fw-success icon-warning'></i> In Progress</span>"; html = "<span><i class='fw fw-success icon-warning'></i> In Progress</span>";
break; break;
case "REPEATED" : case "REPEATED" :
html = "<span><i class='fw fw-success icon-warning'></i> Repeated</span>"; html = "<span><i class='fw fw-success icon-warning'></i> Repeated</span>";
break; break;
}
return html;
} }
return html;
}
}, },
{targets: 2, data: "createdTimeStamp", render: {
function (date) { targets: 2, data: "createdTimeStamp", render: function (date) {
var value = String(date); var value = String(date);
return value.slice(0, 16); return value.slice(0, 16);
} }
} }
], ],
"createdRow": function(row, data) { "createdRow": function (row, data) {
$(row).attr("data-type", "selectable"); $(row).attr("data-type", "selectable");
$(row).attr("data-id", data["id"]); $(row).attr("data-id", data["id"]);
$.each($("td", row), $.each($("td", row),
function(colIndex) { function (colIndex) {
switch(colIndex) { switch (colIndex) {
case 1: case 1:
$(this).attr("data-grid-label", "Code"); $(this).attr("data-grid-label", "Code");
$(this).attr("data-display", data["code"]); $(this).attr("data-display", data["code"]);
@ -276,18 +307,16 @@ var InitiateViewOption = null;
var content = template(viewModel); var content = template(viewModel);
$("#applications-list-container").html(content); $("#applications-list-container").html(content);
} else { } else {
$("#applications-list-container"). $("#applications-list-container").html("<div class='message message-info'><h4><i class='icon fw fw-info'></i>No applications found.</h4>" +
html("<div class='message message-info'><h4><i class='icon fw fw-info'></i>No applications found.</h4>" + "<p>Please try refreshing the list in a while.</p></div>");
"<p>Please try refreshing the list in a while.</p></div>");
} }
} }
}, },
// error-callback // error-callback
function () { function () {
$("#applications-list-container"). $("#applications-list-container").html("<div class='panel-body'><br><p class='fw-warning'>&nbsp;Loading application list " +
html("<div class='panel-body'><br><p class='fw-warning'>&nbsp;Loading application list " + "was not successful. please try refreshing the list in a while.<p></div>");
"was not successful. please try refreshing the list in a while.<p></div>"); });
});
}); });
} }
@ -338,17 +367,15 @@ var InitiateViewOption = null;
$("#policy-compliance-table").addClass("hidden"); $("#policy-compliance-table").addClass("hidden");
} }
} else { } else {
$("#policy-list-container"). $("#policy-list-container").html("<div class='panel-body'><br><p class='fw-warning'> This device " +
html("<div class='panel-body'><br><p class='fw-warning'> This device " + "has no policy applied.<p></div>");
"has no policy applied.<p></div>");
} }
} }
}, },
// error-callback // error-callback
function () { function () {
$("#policy-list-container"). $("#policy-list-container").html("<div class='panel-body'><br><p class='fw-warning'> Loading policy compliance related data " +
html("<div class='panel-body'><br><p class='fw-warning'> Loading policy compliance related data " + "was not successful. please try refreshing data in a while.<p></div>");
"was not successful. please try refreshing data in a while.<p></div>");
} }
); );
} }
@ -356,9 +383,8 @@ var InitiateViewOption = null;
}, },
// error-callback // error-callback
function () { function () {
$("#policy-list-container"). $("#policy-list-container").html("<div class='panel-body'><br><p class='fw-warning'> Loading policy compliance related data " +
html("<div class='panel-body'><br><p class='fw-warning'> Loading policy compliance related data " + "was not successful. please try refreshing data in a while.<p></div>");
"was not successful. please try refreshing data in a while.<p></div>");
} }
); );
} }

@ -17,8 +17,10 @@
*/ */
var map; var map;
var isAnalitics = false;
var marker;
function loadLeafletMap() { function loadLeafletMap(refresh) {
var deviceLocationID = "#device-location", var deviceLocationID = "#device-location",
locations = $(deviceLocationID).data("locations"), locations = $(deviceLocationID).data("locations"),
@ -28,8 +30,48 @@ function loadLeafletMap() {
zoomLevel = 13, zoomLevel = 13,
tileSet = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", tileSet = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
attribution = "&copy; <a href='https://openstreetmap.org/copyright'>OpenStreetMap</a> contributors"; attribution = "&copy; <a href='https://openstreetmap.org/copyright'>OpenStreetMap</a> contributors";
if (locations && locations.locations.length > 0) {
if (refresh && !isAnalitics) {
$("#map-spinner").removeClass("hidden");
var applicationsList = $("#applications-list");
var deviceId = applicationsList.data("device-id");
var deviceType = applicationsList.data("device-type");
invokerUtil.get(
"/api/device-mgt/v1.0/devices/" + deviceType + "/" + deviceId + "/location",
// success-callback
function (data, textStatus, jqXHR) {
if (jqXHR.status == 200 && data) {
data = JSON.parse(data);
if (data.latitude && data.longitude) {
map.removeLayer(marker);
// marker = L.marker([6.912853, 79.855635], {"opacity": opacVal}).addTo(map).bindPopup("Your device is here");
marker = L.marker([data.latitude, data.longitude], {"opacity": opacVal}).addTo(map).bindPopup("Your device is here");
map.panTo(new L.LatLng(data.latitude, data.longitude));
// map.panTo(new L.LatLng(40.737, -73.923));
marker.on('mouseover', function (e) {
this.openPopup();
});
marker.on('mouseout', function (e) {
this.closePopup();
});
}
$("#map-spinner").addClass("hidden");
} else {
$("#map-spinner").adddClass("hidden");
$("#device-location").hide();
$("#map-error").show();
}
},
// error-callback
function () {
$("#map-spinner").addClass("hidden");
$("#device-location").hide();
$("#map-error").show();
});
} else if (locations && locations.locations.length > 0) {
isAnalitics = true;
var locationSets = locations.locations; var locationSets = locations.locations;
map = L.map(container).setView([locationSets[0].lat, locationSets[0].lng], zoomLevel); map = L.map(container).setView([locationSets[0].lat, locationSets[0].lng], zoomLevel);
L.tileLayer(tileSet, {attribution: attribution}).addTo(map); L.tileLayer(tileSet, {attribution: attribution}).addTo(map);
@ -48,23 +90,26 @@ function loadLeafletMap() {
} }
$("#map-error").hide(); $("#map-error").hide();
$("#device-location").show(); $("#device-location").show();
setTimeout(function(){ map.invalidateSize()}, 400); setTimeout(function () {
map.invalidateSize()
}, 400);
} else if (location_long && location_lat) { } else if (location_long && location_lat) {
map = L.map(container).setView([location_lat, location_long], zoomLevel); map = L.map(container).setView([location_lat, location_long], zoomLevel);
L.tileLayer(tileSet, {attribution: attribution}).addTo(map); L.tileLayer(tileSet, {attribution: attribution}).addTo(map);
var m = L.marker([location_lat, location_long], {"opacity": opacVal}).addTo(map).bindPopup("Your device is here"); marker = L.marker([location_lat, location_long], {"opacity": opacVal}).addTo(map).bindPopup("Your device is here");
m.on('mouseover', function (e) { marker.on('mouseover', function (e) {
this.openPopup(); this.openPopup();
}); });
m.on('mouseout', function (e) { marker.on('mouseout', function (e) {
this.closePopup(); this.closePopup();
}); });
$("#map-error").hide(); $("#map-error").hide();
$("#device-location").show(); $("#device-location").show();
setTimeout(function(){ map.invalidateSize()}, 400); setTimeout(function () {
map.invalidateSize()
}, 400);
} else { } else {
$("#device-location").hide(); $("#device-location").hide();
$("#map-error").show(); $("#map-error").show();
@ -73,6 +118,10 @@ function loadLeafletMap() {
$(document).ready(function () { $(document).ready(function () {
$(".location_tab").on("click", function () { $(".location_tab").on("click", function () {
loadLeafletMap(); loadLeafletMap(false);
});
$("#refresh-location").on("click", function () {
loadLeafletMap(true);
}); });
}); });

@ -65,48 +65,54 @@
{{description}} {{description}}
<br> <br>
</h4> </h4>
<div id="operation-form">
<form action="{{params.0.uri}}" method="{{params.0.method}}" <form action="{{params.0.uri}}" method="{{params.0.method}}"
style="padding-bottom: 20px;" style="padding-bottom: 20px;"
data-payload="{{payload}}" id="form-{{operation}}" data-payload="{{payload}}" id="form-{{operation}}"
data-device-id="{{../device.deviceIdentifier}}" data-device-id="{{../device.deviceIdentifier}}"
data-content-type="{{params.0.contentType}}" data-content-type="{{params.0.contentType}}"
data-operation-code="{{operation}}"> data-operation-code="{{operation}}">
{{#each params.0.pathParams}} {{#each params.0.pathParams}}
<input type="{{type}}" id="{{name}}" placeholder="{{name}}" class="form-control" data-param-type="path" value="{{value}}" /> <input type="{{type}}" id="{{name}}" placeholder="{{name}}" class="form-control"
<br /> data-param-type="path" value="{{value}}"/>
{{/each}} <br/>
{{#each params.0.formParams}} {{/each}}
<input type="{{type}}" id="{{name}}" name="{{name}}" placeholder="{{name}}" class="form-control" data-param-type="form" value="{{value}}" /> {{#each params.0.formParams}}
<br /> <input type="{{type}}" id="{{name}}" name="{{name}}" placeholder="{{name}}"
{{/each}} class="form-control" data-param-type="form" value="{{value}}"/>
{{#each params.0.queryParams}}
<input type="{{type}}" id="{{name}}" placeholder="{{name}}" class="form-control" data-param-type="query" value="{{value}}" />
<br />
{{/each}}
{{#each uiParams}}
{{#equal this.type "checkbox"}}
<input type="{{this.type}}" id="{{this.id}}"
class="checkbox"
placeholder="{{this.label}}"
data-param-type="form"/>
{{this.label}}
<br/> <br/>
{{/equal}} {{/each}}
{{#equal this.type "text"}} {{#each params.0.queryParams}}
<input type="{{this.type}}" id="{{this.id}}" <input type="{{type}}" id="{{name}}" placeholder="{{name}}" class="form-control"
placeholder="{{this.label}}" class="form-control" data-param-type="query" value="{{value}}"/>
data-param-type="form" value=""/>
<br/> <br/>
{{/equal}} {{/each}}
{{/each}} {{#each uiParams}}
<button id="btnSend" type="button" onclick="submitForm('form-{{operation}}')" class="btn btn-default">&nbsp;&nbsp;&nbsp;&nbsp;Send {{#equal this.type "checkbox"}}
to Device&nbsp;&nbsp;&nbsp;&nbsp;</button> <input type="{{this.type}}" id="{{this.id}}"
<label id="lblSending" class="wr-input-label hidden"><i class="checkbox"
class="fw fw-lifecycle fw-spin fw-2x"></i> Sending..</label> placeholder="{{this.label}}"
<label id="lblSent" class="wr-input-label hidden"><i data-param-type="form"/>
class="fw fw-check fw-2x"></i> Sent</label> {{this.label}}
</form> <br/>
{{/equal}}
{{#equal this.type "text"}}
<input type="{{this.type}}" id="{{this.id}}"
placeholder="{{this.label}}" class="form-control"
data-param-type="form" value=""/>
<br/>
{{/equal}}
{{/each}}
<button id="btnSend" type="button" onclick="submitForm('form-{{operation}}')"
class="btn btn-default">Send
to Device</button>
<label id="lblSending" class="wr-input-label hidden"><i
class="fw fw-lifecycle fw-spin fw-2x"></i> Sending..</label>
<label id="lblSent" class="wr-input-label hidden"><i
class="fw fw-check fw-2x"></i> Sent</label>
<i id="lbl-execution" class="fw fw-wso2-logo fw-pulse fw-2x hidden"> Executing Operation </i>
</form>
</div>
</div> </div>
</div> </div>
</div> </div>

@ -28,6 +28,8 @@ function operationSelect(selection) {
} }
function submitForm(formId) { function submitForm(formId) {
$("#btnSend").addClass("hidden");
$("#lbl-execution").removeClass("hidden");
var form = $("#" + formId); var form = $("#" + formId);
var uri = form.attr("action"); var uri = form.attr("action");
var deviceId = form.data("device-id"); var deviceId = form.data("device-id");
@ -69,6 +71,12 @@ function submitForm(formId) {
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("");
var resetLoader = function () {
$("#btnSend").removeClass("hidden");
$('#lbl-execution').addClass("hidden");
};
var successCallBack = function (response) { var successCallBack = function (response) {
var res = response; var res = response;
try { try {
@ -79,11 +87,12 @@ function submitForm(formId) {
title.html("Operation Triggered!"); title.html("Operation Triggered!");
statusIcon.attr("class", defaultStatusClasses + " fw-check"); statusIcon.attr("class", defaultStatusClasses + " fw-check");
description.html(res); description.html(res);
console.log("success!"); // console.log("success!");
resetLoader();
$(modalPopupContent).html(content.html()); $(modalPopupContent).html(content.html());
}; };
var errorCallBack = function (response) { var errorCallBack = function (response) {
console.log(response); // console.log(response);
title.html("An Error Occurred!"); title.html("An Error Occurred!");
statusIcon.attr("class", defaultStatusClasses + " fw-error"); statusIcon.attr("class", defaultStatusClasses + " fw-error");
var reason = (response.responseText == "null")?response.statusText:response.responseText; var reason = (response.responseText == "null")?response.statusText:response.responseText;
@ -93,7 +102,8 @@ function submitForm(formId) {
//do nothing //do nothing
} }
description.html(reason); description.html(reason);
console.log("Error!"); // console.log("Error!");
resetLoader();
$(modalPopupContent).html(content.html()); $(modalPopupContent).html(content.html());
}; };
//executing http request //executing http request
@ -111,12 +121,12 @@ function submitForm(formId) {
title.html("An Error Occurred!"); title.html("An Error Occurred!");
statusIcon.attr("class", defaultStatusClasses + " fw-error"); statusIcon.attr("class", defaultStatusClasses + " fw-error");
description.html("This operation requires http method: " + httpMethod + " which is not supported yet!"); description.html("This operation requires http method: " + httpMethod + " which is not supported yet!");
resetLoader();
$(modalPopupContent).html(content.html()); $(modalPopupContent).html(content.html());
} }
} }
$(document).on('submit', 'form', function (e) { $(document).on('submit', 'form', function (e) {
cosole.log("darn!!");
e.preventDefault(); e.preventDefault();
var postOperationRequest = $.ajax({ var postOperationRequest = $.ajax({
url: $(this).attr("action") + '&' + $(this).serialize(), url: $(this).attr("action") + '&' + $(this).serialize(),

@ -65,48 +65,56 @@
<span id="vpn-ok" class="has-success status-icon hidden"><i class="fw fw-success"></i></span> <span id="vpn-ok" class="has-success status-icon hidden"><i class="fw fw-success"></i></span>
<span id="vpn-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span> <span id="vpn-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a> </a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('work-profile', this)"> {{#unless iscloud}}
<a href="javascript:void(0)" class="worker-profile" onclick="showAdvanceOperation('work-profile', this)">
<span class="wr-hidden-operations-icon fw-stack"> <span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-service fw-stack-2x"></i> <i class="fw fw-service fw-stack-2x"></i>
</span> </span>
Work-Profile Configurations Work-Profile Configurations
<span id="work-profile-configured" class="has-configured status-icon hidden"><i class="fw fw-success"></i></span> <span id="work-profile-configured" class="has-configured status-icon hidden"><i
<span id="work-profile-ok" class="has-success status-icon hidden"><i class="fw fw-success"></i></span> class="fw fw-success"></i></span>
<span id="work-profile-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span> <span id="work-profile-ok" class="has-success status-icon hidden"><i class="fw fw-success"></i></span>
</a> <span id="work-profile-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
<a href="javascript:void(0)" onclick="showAdvanceOperation('app-restriction', this)"> </a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('app-restriction', this)">
<span class="fw-stack fw-lg"> <span class="fw-stack fw-lg">
<i class="fw fw-application fw-stack-1x"></i> <i class="fw fw-application fw-stack-1x"></i>
<i class="fw fw-block fw-stack-2x"></i> <i class="fw fw-block fw-stack-2x"></i>
</span> </span>
Application Restrictions Application Restrictions
<span id="app-restriction-configured" class="has-configured status-icon hidden"><i <span id="app-restriction-configured" class="has-configured status-icon hidden"><i
class="fw fw-success"></i></span> class="fw fw-success"></i></span>
<span id="app-restriction-ok" class="has-success status-icon hidden"><i class="fw fw-success"></i></span> <span id="app-restriction-ok" class="has-success status-icon hidden"><i
<span id="app-restriction-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span> class="fw fw-success"></i></span>
</a> <span id="app-restriction-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
<a href="javascript:void(0)" onclick="showAdvanceOperation('cosu-system-update-policy', this)"> </a>
<a href="javascript:void(0)" class="worker-profile"
onclick="showAdvanceOperation('cosu-system-update-policy', this)">
<span class="wr-hidden-operation-icon fw-stack"> <span class="wr-hidden-operation-icon fw-stack">
<i class="fw fw-import fw-stack-2x"></i> <i class="fw fw-import fw-stack-2x"></i>
</span> </span>
System Update Policy (COSU) System Update Policy (COSU)
<span id="cosu-system-update-policy-configured" class="has-configured status-icon hidden"><i <span id="cosu-system-update-policy-configured" class="has-configured status-icon hidden"><i
class="fw fw-success"></i></span> class="fw fw-success"></i></span>
<span id="cosu-system-update-policy-ok" class="has-success status-icon hidden"><i <span id="cosu-system-update-policy-ok" class="has-success status-icon hidden"><i
class="fw fw-success"></i></span> class="fw fw-success"></i></span>
<span id="cosu-system-update-policy-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span> <span id="cosu-system-update-policy-error" class="has-error status-icon hidden"><i
</a> class="fw fw-error"></i></span>
<a href="javascript:void(0)" onclick="showAdvanceOperation('cosu-whitelisted-applications', this)" class="hide"> </a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('cosu-whitelisted-applications', this)"
class="hide">
<span class="wr-hidden-operations-icon fw-stack"> <span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-register fw-stack-2x"></i> <i class="fw fw-register fw-stack-2x"></i>
</span> </span>
Whitelist Apps (COSU) Whitelist Apps (COSU)
<span id="cosu-whitelisted-applications-configured" class="has-configured status-icon hidden"><i <span id="cosu-whitelisted-applications-configured" class="has-configured status-icon hidden"><i
class="fw fw-success"></i></span> class="fw fw-success"></i></span>
<span id="cosu-whitelisted-applications-ok" class="has-success status-icon hidden"><i class="fw fw-success"></i></span> <span id="cosu-whitelisted-applications-ok" class="has-success status-icon hidden"><i
<span id="cosu-whitelisted-applications-error" class="has-error status-icon hidden"><i class="fw fw-success"></i></span>
class="fw fw-error"></i></span> <span id="cosu-whitelisted-applications-error" class="has-error status-icon hidden"><i
</a> class="fw fw-error"></i></span>
</a>
{{/unless}}
</div> </div>
<div class="wr-hidden-operations-content col-lg-8"> <div class="wr-hidden-operations-content col-lg-8">
@ -302,400 +310,411 @@
</span> </span>
</label> </label>
</div> </div>
<div> {{#unless iscloud}}
<ul class="message message-info"> <div class="worker-profile-or-owner">
<i class="icon fw fw-info"></i> <ul class="message message-info">
<a id="policy-listing-status-msg"> Below Restrictions are valid only when the Agent is <i class="icon fw fw-info"></i>
<b>work-profile owner</b> or <b>device owner</b>.</a> <a id="policy-listing-status-msg"> Below Restrictions are valid only when the Agent is
</ul> <b>work-profile owner</b> or <b>device owner</b>.</a>
</div> </ul>
<div class="wr-input-control"> </div>
<label class="wr-input-control checkbox"> <div class="wr-input-control worker-profile-or-owner">
<input id="disallow-configuring-credentials-enabled" type="checkbox" <label class="wr-input-control checkbox">
class="operationDataKeys" <input id="disallow-configuring-credentials-enabled" type="checkbox"
data-key="disallowConfigCredentials"/> class="operationDataKeys"
<span class="helper" title="Having this checked would disallow configuring credentials."> data-key="disallowConfigCredentials"/>
<span class="helper"
title="Having this checked would disallow configuring credentials.">
Disallow configuring credentials Disallow configuring credentials
<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"> <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-VPN-enabled" type="checkbox" class="operationDataKeys" <input id="disallow-configuring-VPN-enabled" type="checkbox" class="operationDataKeys"
data-key="disallowConfigVpn"/> data-key="disallowConfigVpn"/>
<span class="helper" title="Having this checked would disallow configuring VPN."> <span class="helper" title="Having this checked would disallow configuring VPN.">
Disallow configuring VPN Disallow configuring VPN
<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"> <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-app-control-enabled" type="checkbox" <input id="disallow-configuring-app-control-enabled" type="checkbox"
class="operationDataKeys" class="operationDataKeys"
data-key="disallowAppControl"/> data-key="disallowAppControl"/>
<span class="helper" title="Having this checked would disallow configuring app control."> <span class="helper"
title="Having this checked would disallow configuring app control.">
Disallow configuring app control Disallow configuring app control
<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"> <div class="wr-input-control worker-profile-or-owner">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="disallow-cross-profile-copy-paste-enabled" type="checkbox" <input id="disallow-cross-profile-copy-paste-enabled" type="checkbox"
class="operationDataKeys" class="operationDataKeys"
data-key="disallowCrossProfileCopyPaste"/> data-key="disallowCrossProfileCopyPaste"/>
<span class="helper" title="Having this checked would disallow cross profile copy paste."> <span class="helper"
title="Having this checked would disallow cross profile copy paste.">
Disallow cross profile copy paste Disallow cross profile copy paste
<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"> <div class="wr-input-control worker-profile-or-owner">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="disallow-debugging-enabled" type="checkbox" class="operationDataKeys" <input id="disallow-debugging-enabled" type="checkbox" class="operationDataKeys"
data-key="disallowDebugging"/> data-key="disallowDebugging"/>
<span class="helper" title="Having this checked would disallow debugging."> <span class="helper" title="Having this checked would disallow debugging.">
Disallow debuging Disallow debuging
<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"> <div class="wr-input-control worker-profile-or-owner">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="disallow-install-apps-enabled" type="checkbox" class="operationDataKeys" <input id="disallow-install-apps-enabled" type="checkbox" class="operationDataKeys"
data-key="disallowInstallApps"/> data-key="disallowInstallApps"/>
<span class="helper" title="Having this checked would disallow install apps."> <span class="helper" title="Having this checked would disallow install apps.">
Disallow install apps Disallow install apps
<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"> <div class="wr-input-control worker-profile-or-owner">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="disallow-installing-from-unknown-enabled" type="checkbox" <input id="disallow-installing-from-unknown-enabled" type="checkbox"
class="operationDataKeys" class="operationDataKeys"
data-key="disallowInstallUnknownSources"/> data-key="disallowInstallUnknownSources"/>
<span class="helper" title="Having this checked would disallow installing from unknown <span class="helper" title="Having this checked would disallow installing from unknown
sources."> sources.">
Disallow install from unknown sources Disallow install from unknown sources
<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"> <div class="wr-input-control worker-profile-or-owner">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="disallow-modify-accounts-enabled" type="checkbox" class="operationDataKeys" <input id="disallow-modify-accounts-enabled" type="checkbox" class="operationDataKeys"
data-key="disallowModifyAccounts"/> data-key="disallowModifyAccounts"/>
<span class="helper" title="Having this checked would disallow modify accounts."> <span class="helper" title="Having this checked would disallow modify accounts.">
Disallow modify accounts Disallow modify accounts
<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"> <div class="wr-input-control worker-profile-or-owner">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="disallow-outgoing-beam-enabled" type="checkbox" class="operationDataKeys" <input id="disallow-outgoing-beam-enabled" type="checkbox" class="operationDataKeys"
data-key="disallowOutgoingBeam"/> data-key="disallowOutgoingBeam"/>
<span class="helper" title="Having this checked would disallow outgoing beam."> <span class="helper" title="Having this checked would disallow outgoing beam.">
Disallow outgoing beam Disallow outgoing beam
<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"> <div class="wr-input-control worker-profile-or-owner">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="disallow-location-sharing-enabled" type="checkbox" class="operationDataKeys" <input id="disallow-location-sharing-enabled" type="checkbox" class="operationDataKeys"
data-key="disallowLocationSharing"/> data-key="disallowLocationSharing"/>
<span class="helper" title="Having this checked would disallow location sharing."> <span class="helper" title="Having this checked would disallow location sharing.">
Disallow location sharing Disallow location sharing
<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"> <div class="wr-input-control worker-profile-or-owner">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="disallow-uninstall-apps-enabled" type="checkbox" class="operationDataKeys" <input id="disallow-uninstall-apps-enabled" type="checkbox" class="operationDataKeys"
data-key="disallowUninstallApps"/> data-key="disallowUninstallApps"/>
<span class="helper" title="Having this checked would disallow uninstall apps."> <span class="helper" title="Having this checked would disallow uninstall apps.">
Disallow uninstall apps Disallow uninstall apps
<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"> <div class="wr-input-control worker-profile-or-owner">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="disallow-parent-profile-app-linking-enabled" type="checkbox" <input id="disallow-parent-profile-app-linking-enabled" type="checkbox"
class="operationDataKeys" class="operationDataKeys"
data-key="disallowParentProfileAppLinking"/> data-key="disallowParentProfileAppLinking"/>
<span class="helper" title="Having this checked would disallow parent profile app linking."> <span class="helper"
title="Having this checked would disallow parent profile app linking.">
Disallow parent profile app linking Disallow parent profile app linking
<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"> <div class="wr-input-control worker-profile-or-owner">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="ensure-verifying-apps-enabled" type="checkbox" class="operationDataKeys" <input id="ensure-verifying-apps-enabled" type="checkbox" class="operationDataKeys"
data-key="ensureVerifyApps"/> data-key="ensureVerifyApps"/>
<span class="helper" title="Having this checked would ensure verifying apps ."> <span class="helper" title="Having this checked would ensure verifying apps .">
Ensure verifying apps Ensure verifying apps
<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"> <div class="wr-input-control worker-profile-or-owner">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="enable-auto-timing-enabled" type="checkbox" class="operationDataKeys" <input id="enable-auto-timing-enabled" type="checkbox" class="operationDataKeys"
data-key="enableAutoTime"/> data-key="enableAutoTime"/>
<span class="helper" title="Having this checked would enable auto timing ."> <span class="helper" title="Having this checked would enable auto timing .">
Enable auto timing Enable auto timing
<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"> <div class="wr-input-control worker-profile-or-owner">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="disable-screen-capture-enabled" type="checkbox" class="operationDataKeys" <input id="disable-screen-capture-enabled" type="checkbox" class="operationDataKeys"
data-key="disableScreenCapture"/> data-key="disableScreenCapture"/>
<span class="helper" title="Having this checked would disable screen capture ."> <span class="helper" title="Having this checked would disable screen capture .">
Disable screen capture Disable screen capture
<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> <div class="device-owner">
<ul class="message message-info"> <ul class="message message-info device-owner">
<i class="icon fw fw-info"></i> <i class="icon fw fw-info"></i>
<a id="policy-listing-status-msg"> Below Restrictions are valid only when the Agent is the <a id="policy-listing-status-msg"> Below Restrictions are valid only when the Agent is
<b>device owner</b>.</a> the
</ul> <b>device owner</b>.</a>
</div> </ul>
<div class="wr-input-control"> </div>
<label class="wr-input-control checkbox"> <div class="wr-input-control device-owner">
<input id="disallow-SMS-enabled" type="checkbox" class="operationDataKeys" <label class="wr-input-control checkbox">
data-key="disallowSMS"/> <input id="disallow-SMS-enabled" type="checkbox" class="operationDataKeys"
<span class="helper" title="Having this checked would disallow SMS."> 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"> <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"> <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" title="Having this checked would disallow configuring cell broadcast."> <span class="helper"
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"> <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" class="operationDataKeys" <input id="disallow-configuring-bluetooth-enabled" type="checkbox"
data-key="disallowConfigBluetooth"/> class="operationDataKeys"
<span class="helper" title="Having this checked would disallow configuring bluetooth."> data-key="disallowConfigBluetooth"/>
<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"> <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"> <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"> <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" class="operationDataKeys"
data-key="disallowConfigWifi"/> data-key="disallowConfigWifi"/>
<span class="helper" title="Having this checked would disallow configuring Wifi."> <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"> <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"> <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" class="operationDataKeys"
data-key="disallowOutgoingCalls"/> data-key="disallowOutgoingCalls"/>
<span class="helper" title="Having this checked would disallow outgoing calls."> <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"> <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" class="operationDataKeys" <input id="disallow-mount-physical-media-enabled" type="checkbox"
data-key="disallowMountPhysicalMedia"/> class="operationDataKeys"
<span class="helper" title="Having this checked would disallow mount physical media."> data-key="disallowMountPhysicalMedia"/>
<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"> <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"> <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"> <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"> <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"> <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"> <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"> <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" class="operationDataKeys"
data-key="disallowUnmuteMicrophone"/> data-key="disallowUnmuteMicrophone"/>
<span class="helper" title="Having this checked would disallow unmute microphone."> <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>
<br> <br>
<div> <div class="device-owner">
<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 Android <a id="policy-listing-status-msg">Below restrictions will be applied on devices with
version 6.0 Marshmallow onwards only.</a> Android
</ul> version 6.0 Marshmallow onwards only.</a>
</div> </ul>
<div class="wr-input-control"> </div>
<label class="wr-input-control checkbox"> <div class="wr-input-control device-owner">
<input id="disable-status-bar-enabled" type="checkbox" class="operationDataKeys" <label class="wr-input-control checkbox">
data-key="disableStatusBar"/> <input id="disable-status-bar-enabled" type="checkbox" class="operationDataKeys"
<span class="helper" title="Having this checked would disable status bar ."> data-key="disableStatusBar"/>
<span class="helper" title="Having this checked would disable status bar .">
Disable status bar Disable status bar
<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>
{{/unless}}
</div> </div>
</div> </div>
</div> </div>
@ -1375,9 +1394,7 @@
</label> </label>
</h2> </h2>
<div class="panel-title-description"> <div class="panel-title-description">
This configuration can be used to set a passcode policy to an Android Device. this configurations can be used to set when system update take place in the COSU devices.
Once this configuration profile is installed on a device, corresponding users will not be able
to modify these settings on their devices.
</div> </div>
</div> </div>
<div id="cosu-whitelisted-applications-body" class="panel-collapse panel-body collapse" role="tabpanel" <div id="cosu-whitelisted-applications-body" class="panel-collapse panel-body collapse" role="tabpanel"

@ -19,11 +19,13 @@
</div>--> </div>-->
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 add-padding-top-2x add-padding-bottom-2x"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 add-padding-top-2x add-padding-bottom-2x">
{{#if isVirtual}} {{#if isVirtual}}
<h3 class="text-center add-padding-bottom-4x">Download our Android-try-it emulator, enroll it with WSO2 Device Cloud and try it out!</h3> <h3 class="text-center add-padding-bottom-4x">Download our virtual Android device, enroll it with WSO2
Device Cloud and try it out!</h3>
<div class="text-center"><a <div class="text-center"><a
href="{{@unit.publicUri}}/assets/android-tryit.ZIP" href="{{@unit.publicUri}}/assets/android-tryit.ZIP"
class="btn-operations remove-margin download_agent"> class="btn-operations remove-margin download_agent">
<i class="fw fw-download fw-inverse fw-lg add-margin-1x"></i>Download the android-try-it Emulator</a></div> <i class="fw fw-download fw-inverse fw-lg add-margin-1x"></i>Download the virtual Android device</a>
</div>
{{else}} {{else}}
<h3 class="text-center">Scan to get the Android Agent.</h3> <h3 class="text-center">Scan to get the Android Agent.</h3>
<div class="enrollment-qr-container text-center"></div> <div class="enrollment-qr-container text-center"></div>
@ -31,7 +33,7 @@
{{#if isCloud}} {{#if isCloud}}
<div class="text-center"> <div class="text-center">
<a href='https://play.google.com/store/apps/details?id=org.wso2.iot.agent&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1' <a href='https://play.google.com/store/apps/details?id=org.wso2.iot.agent&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'
target="_blank"> target="_blank">
<img alt='Get it on Google Play' <img alt='Get it on Google Play'
src='{{@unit.publicUri}}/images/en_badge_web_generic_export.png'/> src='{{@unit.publicUri}}/images/en_badge_web_generic_export.png'/>
</a> </a>
@ -39,7 +41,7 @@
{{else}} {{else}}
<div class="text-center"> <div class="text-center">
<a href="{{host}}/android-web-agent/public/mdm.page.enrollments.android.download-agent/asset/android-agent.apk" <a href="{{host}}/android-web-agent/public/mdm.page.enrollments.android.download-agent/asset/android-agent.apk"
class="btn-operations remove-margin download_agent"> class="btn-operations remove-margin download_agent">
<i class="fw fw-download fw-inverse fw-lg add-margin-1x"></i> Download APK</a> <i class="fw fw-download fw-inverse fw-lg add-margin-1x"></i> Download APK</a>
</div> </div>
{{/if}} {{/if}}
@ -50,20 +52,20 @@
to save it to your computer.</p> to save it to your computer.</p>
<p class="doc-link">For further instructions and troubleshooting please visit the following <a href="https://docs.wso2.com/display/IoTS300/Android" <p class="doc-link">For further instructions and troubleshooting please visit the following <a href="https://docs.wso2.com/display/IoTS300/Android"
target="_blank">link</a>.</p>--> target="_blank">link</a>.</p>-->
{{#if isCloud}} {{#if isCloud}}
<p class="doc-link text-center">Need help? Read <a <p class="doc-link text-center">Need help? Read <a
{{#if isVirtual}} {{#if isVirtual}}
href="https://docs.wso2.com/display/DeviceCloud/Quick+Start+Guide" href="https://docs.wso2.com/display/DeviceCloud/Quick+Start+Guide"
{{else}} {{else}}
href="https://docs.wso2.com/display/DeviceCloud/Enrolling+an+Android+Device" href="https://docs.wso2.com/display/DeviceCloud/Enrolling+an+Android+Device"
{{/if}} {{/if}}
target="_blank">WSO2 Device Cloud documentation.</a> target="_blank">WSO2 Device Cloud documentation.</a>
</p> </p>
{{else}} {{else}}
<p class="doc-link text-center">Need help? Read <a <p class="doc-link text-center">Need help? Read <a
href="https://docs.wso2.com/display/IoTS310/Android" target="_blank">WSO2 href="https://docs.wso2.com/display/IoTS310/Android" target="_blank">WSO2
IoT Server documentation.</a></p> IoT Server documentation.</a></p>
{{/if}} {{/if}}
</div> </div>
<div class="row"> <div class="row">
@ -80,47 +82,47 @@
{{#if isCloud}} {{#if isCloud}}
<div class="row grey-bg"> <div class="row grey-bg">
{{#if isVirtual}} {{#if isVirtual}}
<div class="col-xs-12 col-sm-6 col-md-3 col-lg-4 col-md-offset-1 col-lg-offset-1 add-padding-top-2x add-padding-bottom-2x"> <div class="col-xs-12 col-sm-6 col-md-4 col-lg-4 add-padding-top-2x add-padding-bottom-2x">
<h5><strong>Step 1</strong></h5> <h5><strong>Step 1</strong></h5>
<div class="add-min-height"> <div class="add-min-height">
<ol> <ol>
<li>Unzip the 'android-tryit.zip file and run the 'start' script on your terminal.</li> <li>Unzip the 'android-tryit.zip file and run the 'start' script on your terminal.</li>
<li>Download and install the Android SDK. <li>Download and install the Android SDK:
<ul> <ul>
<li>If you already have an Android SDK on your computer, please provide the location of <li>If you already have an Android SDK on your computer, please provide the location of
the SDK. the SDK.
</li> </li>
<li>Else, this tool will download and install the minimum SDK components required to run <li>Else, this tool will download and install the minimum SDK components required to run
the emulator. the emulator.
This is a one-time process. This is a one-time process.
</li> </li>
</ul> </ul>
</li> </li>
<li>Next, you will be asked to create an AVD: <li>Next, you will be asked to create an AVD:
<ul> <ul>
<li>If you don't have one, the WSO2_AVD will be created for you.</li> <li>If you don't have one, the WSO2_AVD will be created for you.</li>
<li>Else, you can use an existing AVD to try out IoT Android agent.</li> <li>Else, you can use an existing AVD to try out IoT Android agent.</li>
</ul> </ul>
</li> </li>
</ol> </ol>
</div>
<img src="{{@unit.publicUri}}/images/android-tryit.png" class="img-responsive">
</div> </div>
<img src="{{@unit.publicUri}}/images/android-tryit.png" class="img-responsive">
</div>
{{else}} {{else}}
<div class="col-xs-12 col-sm-6 col-md-3 col-lg-3 col-md-offset-1 col-lg-offset-1 add-padding-top-2x add-padding-bottom-2x"> <div class="col-xs-12 col-sm-6 col-md-4 col-lg-4 add-padding-top-2x add-padding-bottom-2x">
<h5><strong>Step 1</strong></h5> <h5><strong>Step 1</strong></h5>
<div class="add-min-height"> <div class="add-min-height">
<p>Let's start by opening the Android agent on your device. <p>Let's start by opening the Android agent on your device.
<br/>Tap on <b>WSO2 Device Management Agent</b>. <br/>Tap on <b>WSO2 Device Management Agent</b>.
</p> </p>
</div>
<img src="{{@unit.publicUri}}/images/launch_agent.png" class="img-responsive">
</div> </div>
<img src="{{@unit.publicUri}}/images/launch_agent.png" class="img-responsive">
</div>
{{/if}} {{/if}}
<div class="col-xs-12 col-sm-6 col-md-3 col-lg-2 col-md-offset-1 col-lg-offset-1 add-padding-top-2x add-padding-bottom-2x"> <div class="col-xs-12 col-sm-6 col-md-3 col-lg-3 col-md-offset-1 col-lg-offset-1 add-padding-top-2x add-padding-bottom-2x">
<h5><strong>Step 2</strong></h5> <h5><strong>Step 2</strong></h5>
<div class="add-min-height"> <div class="add-min-height">
<p>Enter your: <p>Enter your :
<p> <p>
<ul> <ul>
<li>Organization: <b>{{@user.domain}}</b></li> <li>Organization: <b>{{@user.domain}}</b></li>
@ -130,7 +132,7 @@
</div> </div>
<img src="{{@unit.publicUri}}/images/register.png" class="img-responsive"> <img src="{{@unit.publicUri}}/images/register.png" class="img-responsive">
</div> </div>
<div class="col-xs-12 col-sm-6 col-md-3 col-lg-2 col-md-offset-1 col-lg-offset-1 add-padding-top-2x add-padding-bottom-2x"> <div class="col-xs-12 col-sm-6 col-md-3 col-lg-3 col-md-offset-1 col-lg-offset-1 add-padding-top-2x add-padding-bottom-2x">
<h5><strong>Step 3</strong></h5> <h5><strong>Step 3</strong></h5>
<div class="add-min-height"> <div class="add-min-height">
<p>To successfully register the virtual device,</p> <p>To successfully register the virtual device,</p>
@ -149,9 +151,13 @@
<li>Unzip the 'android-tryit.zip file and run the 'start' script on your terminal.</li> <li>Unzip the 'android-tryit.zip file and run the 'start' script on your terminal.</li>
<li>Download and install the Android SDK. <li>Download and install the Android SDK.
<ul> <ul>
<li>If you already have an Android SDK on your computer, please provide the location of the SDK.</li> <li>If you already have an Android SDK on your computer, please provide the location of the
<li>Else, this tool will download and install the minimum SDK components required to run the emulator. SDK.
This is a one-time process.</li> </li>
<li>Else, this tool will download and install the minimum SDK components required to run the
emulator.
This is a one-time process.
</li>
</ul> </ul>
</li> </li>
<li>Next, you will be asked to create an AVD: <li>Next, you will be asked to create an AVD:
@ -194,63 +200,6 @@
</div> </div>
<!--<div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-12 padding-double ">
<h3 class="uppercase">What You Need</h3>
<hr>
<ul class="list-unstyled">
<li class="padding-top-double"><span class="badge">STEP 01</span> Android
Mobile.
</li>
<li><span class="badge">STEP 02</span> Go ahead
and click [Enroll Device].
</li>
<li><span class="badge">STEP 03</span> Proceed
to the [Prepare] section.
</li>
</ul>
<br>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-8 col-md-9 col-lg-9">
<h3 class="uppercase">What it Does</h3>
<hr>
<p class="grey margin-top">Connect and manage your Android device with WSO2 IoT Server.</p>
<br>
<a href="javascript:toggleEnrollment()" class="download-link btn-operations"><i class="fw fw-mobile fw-inverse fw-lg add-margin-1x"></i> Enroll Device</a>
<a href="{{host}}/android-web-agent/public/mdm.page.enrollments.android.download-agent/asset/android-agent.apk" class="btn-operations"><i class="fw fw-download fw-inverse fw-lg add-margin-1x"></i> Download APK</a>
<a href="javascript:toggleEmailInvite()" class="btn-operations"><i class="fw fw-mail fw-inverse fw-lg add-margin-1x"></i> Invite by Email</a>
<p class="doc-link">Click <a href="https://docs.wso2.com/display/IoTS300/Android" target="_blank">here</a> for further instructions and troubleshooting.</p>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-12 padding-double grey-bg">
<h3 class="uppercase">Prepare</h3><hr>
<ul class="list-unstyled">
<li class="padding-top-double"><span class="badge">01</span> Download Device Agent into your Android Mobile.</li>
<li><span class="badge">02</span> Install Agent APK file.</li>
<li><span class="badge">03</span> Configure Agent App</li>
</ul>
<br>
</div>-->
<!--<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 padding-double">
<p class="grey margin-top">Click on the image to zoom</p>
<center>
<a href="{{@unit.publicUri}}/images/android_device.png" target="_blank">
<img src="{{@unit.publicUri}}/images/android_device.png" class="img-responsive">
</a>
</center>
</div>-->
{{#zone "topCss"}} {{#zone "topCss"}}
{{css "css/styles.css"}} {{css "css/styles.css"}}
{{/zone}} {{/zone}}

@ -1128,7 +1128,7 @@
<javax.ws.rs.version>1.1.1</javax.ws.rs.version> <javax.ws.rs.version>1.1.1</javax.ws.rs.version>
<!-- Carbon Device Management --> <!-- Carbon Device Management -->
<carbon.devicemgt.version>2.0.22</carbon.devicemgt.version> <carbon.devicemgt.version>2.0.42</carbon.devicemgt.version>
<carbon.devicemgt.version.range>[2.0.0, 3.0.0)</carbon.devicemgt.version.range> <carbon.devicemgt.version.range>[2.0.0, 3.0.0)</carbon.devicemgt.version.range>
<!-- Carbon App Management --> <!-- Carbon App Management -->

Loading…
Cancel
Save