Resolve conflicts with master

revert-dabc3590
kamidu 8 years ago
commit e3a08d824a

@ -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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -14,7 +14,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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -33,7 +33,7 @@ function setPopupMaxHeight() {
* show popup function. * show popup function.
*/ */
function showPopup() { function showPopup() {
$(modalPopup).show(); $(modalPopup).modal('show');
setPopupMaxHeight(); setPopupMaxHeight();
$('#downloadForm').validate({ $('#downloadForm').validate({
rules: { rules: {
@ -65,7 +65,7 @@ function hidePopup() {
$('label[for=deviceName]').remove(); $('label[for=deviceName]').remove();
$('.control-group').removeClass('success').removeClass('error'); $('.control-group').removeClass('success').removeClass('error');
$(modalPopupContent).html(''); $(modalPopupContent).html('');
$(modalPopup).hide(); $(modalPopup).modal('hide');
} }
/* /*

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>iot-plugins</artifactId> <artifactId>iot-plugins</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -33,7 +33,7 @@ function setPopupMaxHeight() {
* show popup function. * show popup function.
*/ */
function showPopup() { function showPopup() {
$(modalPopup).show(); $(modalPopup).modal('show');
setPopupMaxHeight(); setPopupMaxHeight();
$('#downloadForm').validate({ $('#downloadForm').validate({
rules: { rules: {
@ -65,7 +65,7 @@ function hidePopup() {
$('label[for=deviceName]').remove(); $('label[for=deviceName]').remove();
$('.control-group').removeClass('success').removeClass('error'); $('.control-group').removeClass('success').removeClass('error');
$(modalPopupContent).html(''); $(modalPopupContent).html('');
$(modalPopup).hide(); $(modalPopup).modal('hide');
} }
/* /*

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>iot-plugins</artifactId> <artifactId>iot-plugins</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>iot-plugins</artifactId> <artifactId>iot-plugins</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -20,7 +20,7 @@
<parent> <parent>
<artifactId>iot-base-plugin</artifactId> <artifactId>iot-base-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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>
<artifactId>iot-base-plugin</artifactId> <artifactId>iot-base-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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>
<artifactId>iot-base-plugin</artifactId> <artifactId>iot-base-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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>
<artifactId>iot-base-plugin</artifactId> <artifactId>iot-base-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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>
<artifactId>iot-base-plugin</artifactId> <artifactId>iot-base-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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>
<artifactId>iot-base-plugin</artifactId> <artifactId>iot-base-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -21,7 +21,7 @@
<parent> <parent>
<artifactId>iot-base-plugin</artifactId> <artifactId>iot-base-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -20,7 +20,7 @@
<parent> <parent>
<artifactId>iot-base-plugin</artifactId> <artifactId>iot-base-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -23,7 +23,7 @@
<parent> <parent>
<artifactId>iot-base-plugin</artifactId> <artifactId>iot-base-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -23,7 +23,7 @@
<parent> <parent>
<artifactId>iot-base-plugin</artifactId> <artifactId>iot-base-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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>iot-plugins</artifactId> <artifactId>iot-plugins</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
@ -36,7 +36,7 @@
<module>androidsense-plugin</module> <module>androidsense-plugin</module>
<module>arduino-plugin</module> <module>arduino-plugin</module>
<module>raspberrypi-plugin</module> <module>raspberrypi-plugin</module>
<module>virtual-fire-alarm-plugin</module> <!--module>virtual-fire-alarm-plugin</module-->
<module>iot-base-plugin</module> <module>iot-base-plugin</module>
<module>iot-analytics</module> <module>iot-analytics</module>
</modules> </modules>

@ -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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -33,7 +33,7 @@ function setPopupMaxHeight() {
* show popup function. * show popup function.
*/ */
function showPopup() { function showPopup() {
$(modalPopup).show(); $(modalPopup).modal('show');
setPopupMaxHeight(); setPopupMaxHeight();
$('#downloadForm').validate({ $('#downloadForm').validate({
rules: { rules: {
@ -65,7 +65,7 @@ function hidePopup() {
$('label[for=deviceName]').remove(); $('label[for=deviceName]').remove();
$('.control-group').removeClass('success').removeClass('error'); $('.control-group').removeClass('success').removeClass('error');
$(modalPopupContent).html(''); $(modalPopupContent).html('');
$(modalPopup).hide(); $(modalPopup).modal('hide');
} }
/* /*

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>iot-plugins</artifactId> <artifactId>iot-plugins</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -33,7 +33,7 @@ function setPopupMaxHeight() {
* Shows agent download popup. * Shows agent download popup.
*/ */
function showAgentDownloadPopup() { function showAgentDownloadPopup() {
$(modalPopup).show(); $(modalPopup).modal('show');
setPopupMaxHeight(); setPopupMaxHeight();
var deviceType = ""; var deviceType = "";
$('.deviceType').each(function () { $('.deviceType').each(function () {
@ -50,7 +50,7 @@ function hideAgentDownloadPopup() {
$('label[for=deviceName]').remove(); $('label[for=deviceName]').remove();
$('.control-group').removeClass('success').removeClass('error'); $('.control-group').removeClass('success').removeClass('error');
$(modalPopupContent).html(''); $(modalPopupContent).html('');
$(modalPopup).hide(); $(modalPopup).modal('hide');
} }
/* /*

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>iot-plugins</artifactId> <artifactId>iot-plugins</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
@ -176,6 +176,12 @@
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.mgt.analytics.data.publisher</artifactId> <artifactId>org.wso2.carbon.device.mgt.analytics.data.publisher</artifactId>
<scope>provided</scope> <scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.analytics</groupId> <groupId>org.wso2.carbon.analytics</groupId>
@ -199,6 +205,12 @@
<dependency> <dependency>
<groupId>io.swagger</groupId> <groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs</artifactId> <artifactId>swagger-jaxrs</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>

@ -44,6 +44,8 @@ public class ApplicationInstallation extends AndroidOperation implements Seriali
@ApiModelProperty(name = "url", value = "Application URL", required = true) @ApiModelProperty(name = "url", value = "Application URL", required = true)
private String url; private String url;
@ApiModelProperty(name = "schedule", value = "Application install schedule.", required = false)
private String schedule;
public String getAppIdentifier() { public String getAppIdentifier() {
return appIdentifier; return appIdentifier;
@ -68,4 +70,12 @@ public class ApplicationInstallation extends AndroidOperation implements Seriali
public void setUrl(String url) { public void setUrl(String url) {
this.url = url; this.url = url;
} }
public String getSchedule() {
return schedule;
}
public void setSchedule(String schedule) {
this.schedule = schedule;
}
} }

@ -43,10 +43,6 @@ public class ApplicationUninstallation extends AndroidOperation implements Seria
@Pattern(regexp = "^[A-Za-z]*$") @Pattern(regexp = "^[A-Za-z]*$")
private String type; private String type;
@ApiModelProperty(name = "name", value = "The name of the application.", required = true)
@Size(min = 2, max = 45)
private String name;
public String getAppIdentifier() { public String getAppIdentifier() {
return appIdentifier; return appIdentifier;
} }
@ -63,11 +59,4 @@ public class ApplicationUninstallation extends AndroidOperation implements Seria
this.type = type; this.type = type;
} }
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
} }

@ -44,7 +44,7 @@ public class ApplicationUpdate extends AndroidOperation implements Serializable
private String type; private String type;
@ApiModelProperty(name = "url", value = "The URL of the application.", required = true) @ApiModelProperty(name = "url", value = "The URL of the application.", required = true)
private String url; private String url;
@ApiModelProperty(name = "schedule", value = "Application update schedule.", required = true) @ApiModelProperty(name = "schedule", value = "Application update schedule.", required = false)
private String schedule; private String schedule;
public String getAppIdentifier() { public String getAppIdentifier() {

@ -21,7 +21,6 @@ package org.wso2.carbon.mdm.services.android.services;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.wso2.carbon.apimgt.annotations.api.API; import org.wso2.carbon.apimgt.annotations.api.API;
import org.wso2.carbon.apimgt.annotations.api.Permission; import org.wso2.carbon.apimgt.annotations.api.Permission;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.mdm.services.android.bean.wrapper.AndroidApplication; import org.wso2.carbon.mdm.services.android.bean.wrapper.AndroidApplication;
import org.wso2.carbon.mdm.services.android.bean.wrapper.AndroidDevice; import org.wso2.carbon.mdm.services.android.bean.wrapper.AndroidDevice;
@ -330,7 +329,7 @@ public interface DeviceManagementService {
message = "Internal Server Error. \n " + message = "Internal Server Error. \n " +
"Server error occurred while dis-enrolling the device.") "Server error occurred while dis-enrolling the device.")
}) })
@Permission(name = "Enroll Device", permission = "/device-mgt/devices/enroll/android") @Permission(name = "Disenroll Device", permission = "/device-mgt/devices/disenroll/android")
Response disEnrollDevice( Response disEnrollDevice(
@ApiParam( @ApiParam(
name = "id", name = "id",

@ -534,6 +534,18 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
throw new BadRequestException( throw new BadRequestException(
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build()); new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
} }
String scheduledTime = applicationInstallationBeanWrapper.getOperation().getSchedule();
if (scheduledTime != null && !scheduledTime.isEmpty()) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
try {
String formattedScheduledDate = format.format(format.parse(scheduledTime));
applicationInstallationBeanWrapper.getOperation().setSchedule(formattedScheduledDate);
} catch (ParseException e) {
String errorMessage = "Invalid date string is provided in for schedule parameter";
throw new BadRequestException(
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
}
}
ApplicationInstallation applicationInstallation = applicationInstallationBeanWrapper.getOperation(); ApplicationInstallation applicationInstallation = applicationInstallationBeanWrapper.getOperation();
JSONObject payload = new JSONObject(applicationInstallation.toJSON()); JSONObject payload = new JSONObject(applicationInstallation.toJSON());
@ -615,6 +627,18 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
throw new BadRequestException( throw new BadRequestException(
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build()); new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
} }
String scheduledTime = applicationUpdateBeanWrapper.getOperation().getSchedule();
if (scheduledTime != null && !scheduledTime.isEmpty()) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
try {
String formattedScheduledDate = format.format(format.parse(scheduledTime));
applicationUpdateBeanWrapper.getOperation().setSchedule(formattedScheduledDate);
} catch (ParseException e) {
String errorMessage = "Invalid date string is provided in for schedule parameter";
throw new BadRequestException(
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
}
}
ApplicationUpdate applicationUpdate = applicationUpdateBeanWrapper.getOperation(); ApplicationUpdate applicationUpdate = applicationUpdateBeanWrapper.getOperation();
ProfileOperation operation = new ProfileOperation(); ProfileOperation operation = new ProfileOperation();
operation.setCode(AndroidConstants.OperationCodes.UPDATE_APPLICATION); operation.setCode(AndroidConstants.OperationCodes.UPDATE_APPLICATION);

@ -32,7 +32,7 @@ import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementExcept
import org.wso2.carbon.mdm.services.android.bean.ErrorResponse; import org.wso2.carbon.mdm.services.android.bean.ErrorResponse;
import org.wso2.carbon.mdm.services.android.bean.wrapper.AndroidApplication; import org.wso2.carbon.mdm.services.android.bean.wrapper.AndroidApplication;
import org.wso2.carbon.mdm.services.android.bean.wrapper.AndroidDevice; import org.wso2.carbon.mdm.services.android.bean.wrapper.AndroidDevice;
import org.wso2.carbon.mdm.services.android.exception.*; import org.wso2.carbon.mdm.services.android.exception.UnexpectedServerErrorException;
import org.wso2.carbon.mdm.services.android.services.DeviceManagementService; import org.wso2.carbon.mdm.services.android.services.DeviceManagementService;
import org.wso2.carbon.mdm.services.android.util.AndroidAPIUtils; import org.wso2.carbon.mdm.services.android.util.AndroidAPIUtils;
import org.wso2.carbon.mdm.services.android.util.AndroidConstants; import org.wso2.carbon.mdm.services.android.util.AndroidConstants;
@ -179,8 +179,8 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
notification.setOperationId(operation.getId()); notification.setOperationId(operation.getId());
notification.setStatus(org.wso2.carbon.device.mgt.common.notification.mgt.Notification. notification.setStatus(org.wso2.carbon.device.mgt.common.notification.mgt.Notification.
Status.NEW.toString()); Status.NEW.toString());
notification.setDescription("Operation " + operation.getCode() + " failed to execute on device " + notification.setDescription(operation.getCode() + " operation did fail to execute on device " +
deviceName + ". Device ID : " + deviceId); deviceName + " with identifier " + deviceId);
AndroidAPIUtils.getNotificationManagementService().addNotification(id, notification); AndroidAPIUtils.getNotificationManagementService().addNotification(id, notification);
} }
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {

@ -124,6 +124,15 @@
<method>POST</method> <method>POST</method>
</Permission> </Permission>
<Permission>
<name>GET Events</name>
<path>/device-mgt/admin/events/get</path>
<url>/events</url>
<method>GET</method>
</Permission>
<!-- End of event related permissions --> <!-- End of event related permissions -->
<!-- Operations related permissions --> <!-- Operations related permissions -->
@ -156,6 +165,13 @@
<method>POST</method> <method>POST</method>
</Permission> </Permission>
<Permission>
<name>Logcat</name>
<path>/device-mgt/admin/device/android/operation/logcat</path>
<url>/admin/devices/logcat</url>
<method>POST</method>
</Permission>
<Permission> <Permission>
<name>Configure VPN</name> <name>Configure VPN</name>
<path>/device-mgt/admin/device/android/operation/configure-vpn</path> <path>/device-mgt/admin/device/android/operation/configure-vpn</path>

@ -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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<name>WSO2 Carbon - Mobile Android UI</name> <name>WSO2 Carbon - Mobile Android UI</name>
<packaging>pom</packaging> <packaging>pom</packaging>

@ -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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -23,7 +23,7 @@
<parent> <parent>
<artifactId>mobile-base-plugin</artifactId> <artifactId>mobile-base-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -15,6 +15,7 @@
specific language governing permissions and limitations specific language governing permissions and limitations
under the License. under the License.
}} }}
{{unit "cdmf.unit.ui.title" pageTitle="Device Management"}} {{unit "cdmf.unit.ui.title" pageTitle="Device Management"}}
{{unit "cdmf.unit.data-tables-extended"}} {{unit "cdmf.unit.data-tables-extended"}}
@ -37,33 +38,23 @@
{{#zone "navbarActions"}} {{#zone "navbarActions"}}
{{#if permissions.ENROLL_DEVICE}} {{#if permissions.ENROLL_DEVICE}}
<li id = "enroll-btn"> <li id="enroll-btn" class="hidden">
<a href="javascript:toggleEnrollment()"> <a href="javascript:toggleEnrollment()">
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i> <i class="fw fw-ring fw-stroke fw-stack-2x"></i>
<i class="fw fw-mobile fw-stack-1x"></i> <i class="fw fw-add fw-stack-1x"></i>
<span class="fw-stack fw-move-right fw-move-top"> </span>
<i class="fw fw-circle fw-stack-2x fw-stroke fw-inverse"></i> &nbsp;&nbsp;Add New Device
<i class="fw fw-circle fw-stack-2x"></i>
<i class="fw fw-add fw-stack-1x"></i>
</span>
</span>
&nbsp;&nbsp;Enroll Device
</a> </a>
</li> </li>
{{/if}} {{/if}}
{{#if permissions.ADVANCED_SEARCH}} {{#if permissions.ADVANCED_SEARCH}}
<li id = "advanced-search-btn"> <li id="advanced-search-btn" class="hidden">
<a href="{{appContext}}devices/search"> <a href="{{appContext}}devices/search">
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i> <i class="fw fw-ring fw-stroke fw-stack-2x"></i>
<i class="fw fw-mobile fw-stack-1x"></i> <i class="fw fw-search fw-stack-1x"></i>
<span class="fw-stack fw-move-right fw-move-top"> </span>
<i class="fw fw-circle fw-stack-2x fw-stroke fw-inverse"></i>
<i class="fw fw-circle fw-stack-2x"></i>
<i class="fw fw-search fw-stack-1x"></i>
</span>
</span>
&nbsp;&nbsp;Advanced Search &nbsp;&nbsp;Advanced Search
</a> </a>
</li> </li>
@ -72,55 +63,59 @@
{{#zone "content"}} {{#zone "content"}}
{{#if permissions.VIEW_DEVICES}} {{#if permissions.VIEW_DEVICES}}
<div id="loading-content" class="col-centered"> <div id="no-device-view" class="ast-container list-view hidden">
<i class="fw fw-settings fw-spin fw-2x"></i> <div class="ctrl-info-panel col-centered text-center wr-login">
&nbsp;&nbsp;&nbsp; <h3 class="text-muted">
Loading devices . . . <i class="fw fw-mobile fw-3x"></i>
<br> </h3>
</div> <h3 class="text-muted">You do not have any enrolled device at the moment</h3>
<div id="device-listing-status" class="raw hidden"> <h3>
<ul style="list-style-type: none;"> <a href="javascript:toggleEnrollment()" class="btn-operations btn-default">
<li class="message message-info"> <span class="fw-stack">
<h4> <i class="fw fw-ring fw-stack-2x"></i>
<i class="icon fw fw-info"></i> <i class="fw fw-add fw-stack-1x"></i>
<a id="device-listing-status-msg"></a> </span>
</h4> &nbsp;&nbsp;Add New Device
</li> </a>
</ul> </h3>
</div>
</div> </div>
<div id="device-table"> <div id="device-table" class="hidden">
<table class="table table-striped table-hover list-table display responsive nowrap data-table grid-view" <table id="device-grid"
id="device-grid"> class="table table-striped table-hover list-table display responsive nowrap data-table grid-view">
<thead> <thead>
<tr class="sort-row"> <tr class="sort-row">
<th class="no-sort"></th> <th class="no-sort"></th>
<th>By Device Name</th> <th>By Device Name</th>
<th>By Owner</th> <th>By Owner</th>
<th>By Status</th> <th>By Status</th>
<th>By Platform</th> <th>By Platform</th>
<th>By Ownership</th> <th>By Ownership</th>
<th class="no-sort"></th> <th class="no-sort"></th>
</tr> </tr>
<tr class="filter-row filter-box"> <tr class="filter-row filter-box">
<th class="no-sort"></th> <th class="no-sort"></th>
<th data-for="By Device Name"></th> <th data-for="By Device Name"></th>
<th data-for="By Owner" class="text-filter"></th> <th data-for="By Owner" class="text-filter"></th>
<th data-for="By Status" class="select-filter"></th> <th data-for="By Status" class="select-filter"></th>
<th data-for="By Platform" class="select-filter data-platform"></th> <th data-for="By Platform" class="select-filter data-platform"></th>
<th data-for="By Ownership" class="select-filter"></th> <th data-for="By Ownership" class="select-filter data-ownership"></th>
<th class="no-sort"></th> <th class="no-sort"></th>
</tr> </tr>
<tr class="bulk-action-row hidden"> <tr class="bulk-action-row hidden">
<th colspan="7"> <th colspan="7">
<div id="operation-bar"> <div id="operation-bar">
{{unit "mdm.unit.device.operation-bar"}} {{unit "mdm.unit.device.operation-bar"}}
</div> </div>
<div id="operation-guide" class="bs-callout bs-callout-info"> <div id="operation-guide" class="bs-callout bs-callout-info">
<h4>Enabling Device Operations</h4> <h4>Enabling Device Operations</h4>
<p>To enable device operations, select the desired platform from above filter.</p> <h5 class="add-padding-top-1x">
</div> To enable device operations, select the desired platform and
</th> ownership from above filter.
</tr> </h5>
</div>
</th>
</tr>
</thead> </thead>
<tbody id="ast-container"></tbody> <tbody id="ast-container"></tbody>
</table> </table>
@ -136,25 +131,6 @@
<a href="#">By Ownership</a> <a href="#">By Ownership</a>
</div> </div>
</div> </div>
<div id="no-device-view" class="ast-container list-view hidden">
<div class="ctrl-info-panel col-centered text-center wr-login">
<h2>You do not have any device enrolled at the moment.</h2>
<p class="text-center">
<a href="javascript:toggleEnrollment()" class="wr-btn">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-mobile fw-stack-1x"></i>
<span class="fw-stack fw-move-right fw-move-bottom">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-circle fw-stack-2x fw-stroke text-info"></i>
<i class="fw fw-add fw-stack-1x fw-inverse"></i>
</span>
</span>
&nbsp;&nbsp;Enroll New Device
</a>
</p>
</div>
</div>
{{else}} {{else}}
<h1 class="page-sub-title"> <h1 class="page-sub-title">
Permission Denied Permission Denied

@ -76,26 +76,81 @@ function loadDevices() {
return {}; return {};
} }
var fnCreatedRow = function (nRow, aData, dataIndex) { var dataFilter = function (data) {
$(nRow).attr('data-type', 'selectable'); var noDeviceView = "#no-device-view";
$(nRow).attr('data-deviceid', aData.deviceIdentifier);
$(nRow).attr('data-devicetype', aData.deviceType); data = JSON.parse(data);
var json;
if (data["count"] == 0) {
if ($(noDeviceView).length) {
$(noDeviceView).removeClass('hidden');
}
$(".bulk-action-row").addClass('hidden');
json = {
"recordsTotal": 0,
"recordsFiltered": 0,
"data": []
};
} else if (data["count"] > 0) {
$(noDeviceView).remove();
$("#enroll-btn").removeClass('hidden');
$("#advanced-search-btn").removeClass('hidden');
$(".bulk-action-row").removeClass('hidden');
$("#device-table").removeClass('hidden');
var objects = [];
$(data.devices).each(function (index) {
objects.push(
{
model: getPropertyValue(data.devices[index].properties, "DEVICE_MODEL"),
vendor: getPropertyValue(data.devices[index].properties, "VENDOR"),
user: data.devices[index].enrolmentInfo.owner,
status: data.devices[index].enrolmentInfo.status,
ownership: data.devices[index].enrolmentInfo.ownership,
deviceType: data.devices[index].type,
deviceIdentifier: data.devices[index].deviceIdentifier,
name : data.devices[index].name
}
);
});
json = {
"recordsTotal": data["count"],
"recordsFiltered": data["count"],
"data": objects
};
}
return JSON.stringify(json);
}; };
// possible params - nRow, aData, dataIndex
var fnCreatedRow = function (nRow, aData) {
$(nRow).attr('data-type', 'selectable');
$(nRow).attr('data-devicetype', aData["deviceType"]);
$(nRow).attr('data-deviceid', aData["deviceIdentifier"]);
};
var columns = [ var columns = [
{ {
class : 'remove-padding icon-only content-fill viewEnabledIcon', class : 'remove-padding icon-only content-fill viewEnabledIcon',
data : 'icon', data : null,
render: function (data, type, row) { render: function (data, type, row) {
var deviceType = row.deviceType; var deviceType = row.deviceType;
var deviceIdentifier = row.deviceIdentifier; var deviceIdentifier = row.deviceIdentifier;
var url = "#"; var url = "#";
if (status != 'REMOVED') { if (row.status != 'REMOVED') {
url = "device/" + deviceType + "?id=" + deviceIdentifier; url = "device/" + deviceType + "?id=" + deviceIdentifier;
} }
return '<div onclick="javascript:InitiateViewOption(\'' + url + '\')" class="thumbnail icon">' + return '<div onclick="javascript:InitiateViewOption(\'' + url + '\')" class="thumbnail icon">' +
'<i class="square-element text fw fw-mobile"></i></div>' '<i class="square-element text fw fw-mobile"></i>' +
'</div>'
} }
}, },
{ {
@ -156,35 +211,6 @@ function loadDevices() {
} }
]; ];
var dataFilter = function (data) {
data = JSON.parse(data);
var objects = [];
$(data.devices).each(function (index) {
objects.push(
{
model: getPropertyValue(data.devices[index].properties, "DEVICE_MODEL"),
vendor: getPropertyValue(data.devices[index].properties, "VENDOR"),
user: data.devices[index].enrolmentInfo.owner,
status: data.devices[index].enrolmentInfo.status,
ownership: data.devices[index].enrolmentInfo.ownership,
deviceType: data.devices[index].type,
deviceIdentifier: data.devices[index].deviceIdentifier,
name : data.devices[index].name
}
);
});
var json = {
"recordsTotal": data.count,
"recordsFiltered": data.count,
"data": objects
};
return JSON.stringify(json);
};
$('#device-grid').datatables_extended_serverside_paging( $('#device-grid').datatables_extended_serverside_paging(
null, null,
"/api/device-mgt/v1.0/devices", "/api/device-mgt/v1.0/devices",
@ -194,7 +220,6 @@ function loadDevices() {
function () { function () {
$(".icon .text").res_text(0.2); $(".icon .text").res_text(0.2);
$('#device-grid').removeClass('hidden'); $('#device-grid').removeClass('hidden');
$("#loading-content").remove();
}, { }, {
"placeholder" : "Search By Device Name", "placeholder" : "Search By Device Name",
"searchKey" : "name" "searchKey" : "name"
@ -210,46 +235,20 @@ function loadDevices() {
*/ */
//var assetContainer = "#ast-container"; //var assetContainer = "#ast-container";
function openCollapsedNav(){ //function openCollapsedNav(){
$('.wr-hidden-nav-toggle-btn').addClass('active'); // $('.wr-hidden-nav-toggle-btn').addClass('active');
$('#hiddenNav').slideToggle('slideDown', function(){ // $('#hiddenNav').slideToggle('slideDown', function(){
if($(this).css('display') == 'none'){ // if($(this).css('display') == 'none'){
$('.wr-hidden-nav-toggle-btn').removeClass('active'); // $('.wr-hidden-nav-toggle-btn').removeClass('active');
} // }
}); // });
} //}
function initPage() {
var currentUser = $("#device-listing").data("currentUser");
var serviceURL = "/api/device-mgt/v1.0/devices";
invokerUtil.get(
serviceURL,
function (data) {
if (data) {
data = JSON.parse(data);
if (data["count"] > 0) {
$(".bulk-action-row").removeClass('hidden');
loadDevices();
} else {
$("#loading-content").remove();
$("#device-table").remove();
$("#no-device-view").removeClass('hidden');
$("#advanced-search-btn").addClass('hidden');
$("#enroll-btn").addClass('hidden');
}
}
}, function () {
initPage();
}
);
}
/* /*
* DOM ready functions. * DOM ready functions.
*/ */
$(document).ready(function () { $(document).ready(function () {
initPage(); loadDevices();
/* Adding selected class for selected devices */ /* Adding selected class for selected devices */
$(deviceCheckbox).each(function () { $(deviceCheckbox).each(function () {

@ -19,7 +19,7 @@
{{unit "mdm.unit.date-range-picker"}} {{unit "mdm.unit.date-range-picker"}}
{{#zone "content"}} {{#zone "content"}}
<div id = "operations-mod" data-permissions="{{permissions}}"> <div id="operations-mod" data-permissions="{{permissions}}" data-device-type="{{deviceType}}" data-ownership="{{ownership}}">
{{unit "mdm.unit.device.operation-mod"}} {{unit "mdm.unit.device.operation-mod"}}
</div> </div>
{{/zone}} {{/zone}}

@ -16,8 +16,8 @@
* under the License. * under the License.
*/ */
function onRequest() { function onRequest(context) {
// var log = new Log("mdm.unit.device.operation-bar"); var log = new Log("mdm.unit.device.operation-bar");
var userModule = require("/app/modules/business-controllers/user.js")["userModule"]; var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
var viewModel = {}; var viewModel = {};
var permissions = {}; var permissions = {};
@ -93,10 +93,14 @@ function onRequest() {
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/windows/ring")) { if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/windows/ring")) {
permissions["windows"].push("DEVICE_RING"); permissions["windows"].push("DEVICE_RING");
} }
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/windows/lockreset")) { if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/windows/lock-reset")) {
permissions["windows"].push("LOCK_RESET"); permissions["windows"].push("LOCK_RESET");
} }
viewModel["permissions"] = stringify(permissions); viewModel["permissions"] = stringify(permissions);
viewModel["deviceType"] = context.unit.params.deviceType;
viewModel["ownership"] = context.unit.params.ownership;
return viewModel; return viewModel;
} }

@ -31,6 +31,10 @@ var operations = '.wr-operations',
"ANDROID": "android", "ANDROID": "android",
"IOS": "ios", "IOS": "ios",
"WINDOWS": "windows" "WINDOWS": "windows"
},
ownershipTypeConstants = {
"BYOD": "BYOD",
"COPE": "COPE"
}; };
/* /*
@ -94,62 +98,79 @@ function getDevicesByTypes(deviceList) {
return deviceTypes; return deviceTypes;
} }
function unloadOperationBar() { //function unloadOperationBar() {
$("#showOperationsBtn").addClass("hidden"); // $("#showOperationsBtn").addClass("hidden");
$(".wr-operations").html(""); // $(".wr-operations").html("");
} //}
function loadOperationBar(deviceType) { function loadOperationBar(deviceType, ownership) {
var operationBar = $("#operations-bar"); var operationBar = $("#operations-bar");
var operationBarSrc = operationBar.attr("src"); var operationBarSrc = operationBar.attr("src");
var platformType = deviceType;
//var selectedDeviceID = deviceId;
$.template("operations-bar", operationBarSrc, function (template) { $.template("operations-bar", operationBarSrc, function (template) {
//var serviceURL = "/mdm-admin/features/" + platformType; var serviceURL = "/api/device-mgt/v1.0/devices/" + deviceType + "/*/features";
var serviceURL = "/api/device-mgt/v1.0/devices/" + platformType + "/*/features"; invokerUtil.get(
var successCallback = function (data) { serviceURL,
var permittedOperations = []; // success callback
var i; function (data) {
var permissionList = $("#operations-mod").data("permissions"); var permittedOperations = [];
var totalFeatures = JSON.parse(data); var i;
for (i = 0; i < permissionList[deviceType].length; i++) { var permissionList = $("#operations-mod").data("permissions");
var j; var totalFeatures = JSON.parse(data);
for (j = 0; j < totalFeatures.length; j++) { for (i = 0; i < permissionList[deviceType].length; i++) {
if (permissionList[deviceType][i] == totalFeatures[j]["code"]) { var j;
permittedOperations.push(totalFeatures[j]); for (j = 0; j < totalFeatures.length; j++) {
if (permissionList[deviceType][i] == totalFeatures[j]["code"]) {
if (deviceType == platformTypeConstants.ANDROID &&
totalFeatures[j]["code"] == "DEVICE_UNLOCK") {
if (ownership == ownershipTypeConstants.COPE) {
permittedOperations.push(totalFeatures[j]);
}
} else {
permittedOperations.push(totalFeatures[j]);
}
}
} }
} }
}
var viewModel = {}; var viewModel = {};
permittedOperations = permittedOperations.filter(function (current) { permittedOperations = permittedOperations.filter(function (current) {
var iconName; var iconName;
switch (deviceType) { switch (deviceType) {
case platformTypeConstants.ANDROID: case platformTypeConstants.ANDROID:
iconName = operationModule.getAndroidIconForFeature(current.code); iconName = operationModule.getAndroidIconForFeature(current.code);
current.type = deviceType; break;
break; case platformTypeConstants.WINDOWS:
case platformTypeConstants.WINDOWS: iconName = operationModule.getWindowsIconForFeature(current.code);
iconName = operationModule.getWindowsIconForFeature(current.code); break;
break; case platformTypeConstants.IOS:
case platformTypeConstants.IOS: iconName = operationModule.getIOSIconForFeature(current.code);
iconName = operationModule.getIOSIconForFeature(current.code); break;
break; }
}
/* adding ownership in addition to device-type
as it's vital in cases where UI for the same feature should change
according to ownership
*/
if (ownership) {
current.ownership = ownership;
}
if (iconName) {
current.icon = iconName;
}
if (iconName) {
current.icon = iconName;
return current; return current;
} });
});
viewModel.features = permittedOperations; viewModel.features = permittedOperations;
var content = template(viewModel); var content = template(viewModel);
$(".wr-operations").html(content); $(".wr-operations").html(content);
}; },
invokerUtil.get(serviceURL, successCallback, function (message) { // error callback
$(".wr-operations").html(message); function (message) {
}); $(".wr-operations").html(message);
});
}); });
} }

@ -107,14 +107,16 @@
<div class="modal-body add-margin-top-2x add-margin-bottom-2x"> <div class="modal-body add-margin-top-2x add-margin-bottom-2x">
<h4> <h4>
{{#equal code "WIPE_DATA"}} {{#equal code "WIPE_DATA"}}
{{#equal type "android"}} {{#equal deviceType "android"}}
Enter PIN code (Optional - This is required only if the device type is BYOD). {{#equal ownership "BYOD"}}
<br><br> Enter PIN code* of the device
<div> <br><br>
<input type="password" class="form-control modal-input operationDataKeys" id="pin" <div>
data-key="pin"> <input id="pin" type="password"
</div> class="form-control modal-input operationDataKeys"
<br> placeholder="[ Required for a BYOD device ]" data-key="pin" />
</div>
{{/equal}}
{{/equal}} {{/equal}}
{{/equal}} {{/equal}}
{{#equal code "NOTIFICATION"}} {{#equal code "NOTIFICATION"}}
@ -141,26 +143,28 @@
<br> <br>
{{/equal}} {{/equal}}
{{#equal code "DEVICE_LOCK"}} {{#equal code "DEVICE_LOCK"}}
{{#equal type "android"}} {{#equal deviceType "android"}}
Type your message to be shown in the lock screen (Optional). {{#equal ownership "COPE"}}
<br><br> <label class="wr-input-control checkbox">
<div> <input id="hard-lock" type="checkbox" class="form-control operationDataKeys"
<textarea class="form-control modal-input operationDataKeys" id="lock-message" data-key="hard-lock"/>
data-key="lock-message"></textarea>
</div>
<br>
<label class="wr-input-control checkbox">
<input id="hard-lock" type="checkbox" class="form-control operationDataKeys"
data-key="hard-lock"/>
<span class="helper" title="Once it enables, device will be blocked permanently."> <span class="helper" title="Once it enables, device will be blocked permanently.">
&nbsp;&nbsp;&nbsp;Enable Permanent Lock &nbsp;&nbsp;&nbsp;Enable Permanent Lock
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
</label> </label>
<br><br>
{{/equal}}
Type your message to be shown in the lock screen
<br><br>
<div>
<textarea id="lock-message" class="form-control modal-input operationDataKeys"
data-key="lock-message" placeholder="[ Message content is optional ]"></textarea>
</div>
{{/equal}} {{/equal}}
{{/equal}} {{/equal}}
{{#equal code "UPGRADE_FIRMWARE"}} {{#equal code "UPGRADE_FIRMWARE"}}
{{#equal type "android"}} {{#equal deviceType "android"}}
Enter firmware upgrade scheduling information. Enter firmware upgrade scheduling information.
<br><br> <br><br>
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">

@ -1195,9 +1195,9 @@ var operationModule = function () {
var featureMap = { var featureMap = {
"DEVICE_LOCK": "lock-devices", "DEVICE_LOCK": "lock-devices",
"DISENROLL": "disenroll", "DISENROLL": "disenroll",
"DEVICE_RING": "ring-devices", "DEVICE_RING": "ring-device",
"LOCK_RESET": "lock-reset-devices", "LOCK_RESET": "lock-reset",
"WIPE_DATA": "wipe-devices" "WIPE_DATA": "wipe-data"
}; };
//return "/mdm-windows-agent/services/windows/operation/" + featureMap[operationCode]; //return "/mdm-windows-agent/services/windows/operation/" + featureMap[operationCode];
return "/api/device-mgt/windows/v1.0/services/windows/admin/devices/" + featureMap[operationCode]; return "/api/device-mgt/windows/v1.0/services/windows/admin/devices/" + featureMap[operationCode];
@ -1211,16 +1211,16 @@ var operationModule = function () {
var featureMap = { var featureMap = {
"DEVICE_LOCK": "fw-lock", "DEVICE_LOCK": "fw-lock",
"DEVICE_LOCATION": "fw-map-location", "DEVICE_LOCATION": "fw-map-location",
"CLEAR_PASSWORD": "fw-key", "CLEAR_PASSWORD": "fw-clear",
"ENTERPRISE_WIPE": "fw-clear", "ENTERPRISE_WIPE": "fw-block",
"WIPE_DATA": "fw-database", "WIPE_DATA": "fw-delete",
"DEVICE_RING": "fw-dial-up", "DEVICE_RING": "fw-dial-up",
"DEVICE_REBOOT": "fw-refresh", "DEVICE_REBOOT": "fw-refresh",
"UPGRADE_FIRMWARE": "fw-up-arrow", "UPGRADE_FIRMWARE": "fw-hardware",
"DEVICE_MUTE": "fw-mute", "DEVICE_MUTE": "fw-mute",
"NOTIFICATION": "fw-message", "NOTIFICATION": "fw-message",
"CHANGE_LOCK_CODE": "fw-security", "CHANGE_LOCK_CODE": "fw-security",
"DEVICE_UNLOCK": "fw-lock" "DEVICE_UNLOCK": "fw-key"
}; };
return featureMap[operationCode]; return featureMap[operationCode];
}; };
@ -1234,9 +1234,9 @@ var operationModule = function () {
var featureMap = { var featureMap = {
"DEVICE_LOCK": "fw-lock", "DEVICE_LOCK": "fw-lock",
"DEVICE_RING": "fw-dial-up", "DEVICE_RING": "fw-dial-up",
"DISENROLL": "fw-delete", "DISENROLL": "fw-export",
"LOCK_RESET": "fw-key", "LOCK_RESET": "fw-key",
"WIPE_DATA": "fw-clear" "WIPE_DATA": "fw-delete"
}; };
return featureMap[operationCode]; return featureMap[operationCode];
}; };
@ -1250,7 +1250,7 @@ var operationModule = function () {
var featureMap = { var featureMap = {
"DEVICE_LOCK": "fw-lock", "DEVICE_LOCK": "fw-lock",
"LOCATION": "fw-map-location", "LOCATION": "fw-map-location",
"ENTERPRISE_WIPE": "fw-clear", "ENTERPRISE_WIPE": "fw-block",
"NOTIFICATION": "fw-message", "NOTIFICATION": "fw-message",
"RING": "fw-dial-up" "RING": "fw-dial-up"
}; };

@ -22,39 +22,12 @@ var InitiateViewOption = null;
var deviceId = $(".device-id"); var deviceId = $(".device-id");
var deviceIdentifier = deviceId.data("deviceid"); var deviceIdentifier = deviceId.data("deviceid");
var deviceType = deviceId.data("type"); var deviceType = deviceId.data("type");
var payload = [deviceIdentifier]; var ownership = deviceId.data("ownership");
var operationTable; var operationTable;
var serviceUrl;
if (deviceType == "ios") {
serviceUrl = "/ios/operation/deviceinfo";
} else if (deviceType == "android") {
//var serviceUrl = "/mdm-android-agent/operation/device-info";
serviceUrl = "/api/device-mgt/android/v1.0/admin/devices/info";
}
if (serviceUrl) {
invokerUtil.post(
serviceUrl,
payload,
// success-callback
function () {
$(".panel-body").show();
},
// error-callback
function () {
var defaultInnerHTML =
"<br><p class='small'><i class='fw-warning'></i>&nbsp;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");
var activeListGroupItem = $(".media .list-group-item.active"); var activeListGroupItem = $(".media .list-group-item.active");
$(activeTabPane).removeClass("visible-xs-block"); $(activeTabPane).removeClass("visible-xs-block");
$(activeTabPane).siblings().not(".arrow-left").addClass("visible-xs-block"); $(activeTabPane).siblings().not(".arrow-left").addClass("visible-xs-block");
positionArrow(activeListGroupItem); positionArrow(activeListGroupItem);
@ -62,25 +35,21 @@ var InitiateViewOption = null;
$(".media.tab-responsive .tab-content").on("shown.bs.collapse", function (e) { $(".media.tab-responsive .tab-content").on("shown.bs.collapse", function (e) {
var thisParent = $(e.target).parent(); var thisParent = $(e.target).parent();
var activeTabPaneCaret = thisParent.find('.caret-updown'); var activeTabPaneCaret = thisParent.find(".caret-updown");
var activeTabPaneCaretSiblings = thisParent.siblings().find('.caret-updown'); var activeTabPaneCaretSiblings = thisParent.siblings().find(".caret-updown");
activeTabPaneCaret.removeClass("fw-up").addClass("fw-down"); activeTabPaneCaret.removeClass("fw-up").addClass("fw-down");
activeTabPaneCaretSiblings.removeClass("fw-down").addClass("fw-up"); activeTabPaneCaretSiblings.removeClass("fw-down").addClass("fw-up");
}); });
$(".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');
} }
}); });
function positionArrow(selectedTab) { function positionArrow(selectedTab) {
var selectedTabHeight = $(selectedTab).innerHeight(); var selectedTabHeight = $(selectedTab).innerHeight();
var arrowPosition = 0; var arrowPosition = 0;
@ -108,30 +77,6 @@ var InitiateViewOption = null;
$(arrow).css("top", arrowPosition - 10); $(arrow).css("top", arrowPosition - 10);
} }
$(document).ready(function() {
$(".device-detail-body").removeClass("hidden");
$("#loading-content").remove();
loadOperationBar(deviceType);
loadOperationsLog(false);
loadApplicationsList();
loadPolicyCompliance();
$("#refresh-policy").click(function () {
$("#policy-spinner").removeClass("hidden");
loadPolicyCompliance();
});
$("#refresh-apps").click(function () {
$("#apps-spinner").removeClass("hidden");
loadApplicationsList();
});
$("#refresh-operations").click(function () {
$("#operations-spinner").removeClass("hidden");
loadOperationsLog(true);
});
});
function loadOperationsLog(update) { function loadOperationsLog(update) {
var operationsLogTable = "#operations-log-table"; var operationsLogTable = "#operations-log-table";
if (update) { if (update) {
@ -273,8 +218,8 @@ var InitiateViewOption = null;
// success-callback // success-callback
function (data, textStatus, jqXHR) { function (data, textStatus, jqXHR) {
if (jqXHR.status == 200 && data) { if (jqXHR.status == 200 && data) {
data = JSON.parse(data);
$("#policy-spinner").addClass("hidden"); $("#policy-spinner").addClass("hidden");
data = JSON.parse(data);
if (data["active"] == true) { if (data["active"] == true) {
activePolicy = data; activePolicy = data;
invokerUtil.get( invokerUtil.get(
@ -290,42 +235,82 @@ var InitiateViewOption = null;
if (data["complianceData"]) { if (data["complianceData"]) {
if (data["complianceData"]["complianceFeatures"] && if (data["complianceData"]["complianceFeatures"] &&
data["complianceData"]["complianceFeatures"].length > 0) { data["complianceData"]["complianceFeatures"].length > 0) {
viewModel["compliance"] = "NON-COMPLIANT"; viewModel["complianceStatus"] = "NON-COMPLIANT";
viewModel["complianceFeatures"] = data["complianceData"]["complianceFeatures"]; viewModel["complianceFeatures"] = data["complianceData"]["complianceFeatures"];
content = template(viewModel); content = template(viewModel);
$("#policy-list-container").html(content); $("#policy-list-container").html(content);
} else { } else {
viewModel["compliance"] = "COMPLIANT"; viewModel["complianceStatus"] = "COMPLIANT";
content = template(viewModel); content = template(viewModel);
$("#policy-list-container").html(content); $("#policy-list-container").html(content);
$("#policy-compliance-table").addClass("hidden"); $("#policy-compliance-table").addClass("hidden");
} }
} else {
$("#policy-list-container").
html("<div class='panel-body'><br><p class='fw-warning'> This device " +
"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='message message-warning'>" +
"was not successful. please try refreshing data in a while.<p></div>"); "<h4 class='remove-margin'>" +
"<i class='icon fw fw-warning'></i>" +
"Loading policy compliance related data " +
"was not successful. please try refreshing in a while." +
"</h4>" +
"</div>");
} }
); );
} }
} else if ((jqXHR.status == 200 && !data)) {
$("#policy-spinner").addClass("hidden");
$("#policy-list-container").
html("<div class='message message-info'>" +
"<h4 class='remove-margin'>" +
"<i class='icon fw fw-info'></i>" +
"There is currently no effective policy applied for this device." +
"</h4>" +
"</div>");
} }
}, },
// error-callback // error-callback
function () { function () {
$("#policy-spinner").addClass("hidden");
$("#policy-list-container"). $("#policy-list-container").
html("<div class='panel-body'><br><p class='fw-warning'> Loading policy compliance related data " + html("<div class='message message-warning'>" +
"was not successful. please try refreshing data in a while.<p></div>"); "<h4 class='remove-margin'>" +
"<i class='icon fw fw-warning'></i>" +
"Loading policy compliance related data " +
"was not successful. please try refreshing in a while." +
"</h4>" +
"</div>");
} }
); );
} }
); );
} }
$(document).ready(function () {
$(".device-detail-body").removeClass("hidden");
$("#loading-content").remove();
loadOperationBar(deviceType, ownership);
loadOperationsLog(false);
loadApplicationsList();
loadPolicyCompliance();
$("#refresh-policy").click(function () {
$("#policy-spinner").removeClass("hidden");
loadPolicyCompliance();
});
$("#refresh-apps").click(function () {
$("#apps-spinner").removeClass("hidden");
loadApplicationsList();
});
$("#refresh-operations").click(function () {
$("#operations-spinner").removeClass("hidden");
loadOperationsLog(true);
});
});
}()); }());

@ -1,29 +1,31 @@
<div class="wr-app-listing"> <div class="wr-app-listing">
<div class="wr-applist"> <div class="wr-applist">
{{#each applications}} {{#each applications}}
<a style="text-align: center; width: 110px; height: 140px;"> <a style="width: 130px; height: 180px;" class="text-center">
{{#equal platform "android"}}<i class="icon fw fw-android"></i>{{/equal}}
{{#equal platform "ios"}}<i class="icon fw fw-apple"></i>{{/equal}}
{{#equal platform "windows"}}<i class="icon fw fw-windows"></i>{{/equal}}
{{#equal isActive true}} {{#equal isActive true}}
<span style="word-wrap: break-word;"> {{#equal platform "android"}}<i class="icon fw fw-android"></i>{{/equal}}
<i class="fw fw-ok icon-success" style="font-size: 14px;"></i> {{#equal platform "ios"}}<i class="icon fw fw-apple"></i>{{/equal}}
&nbsp;Active {{#equal platform "windows"}}<i class="icon fw fw-windows"></i>{{/equal}}
</span>
<span style="word-wrap: break-word;"><b>{{name}}</b></span> <span style="word-wrap: break-word;"><b>{{name}}</b></span>
<span style="word-wrap: break-word;"><b>V:{{version}}</b></span> <span style="word-wrap: break-word;"><b>V:{{version}}</b></span>
<span style="word-wrap: break-word;" class="text-center">
<i class="fw fw-ok icon-success" style="font-size: 14px;"></i>Active
</span>
{{#if memoryUsage}} {{#if memoryUsage}}
<span style="word-wrap: break-word;"> <span style="word-wrap: break-word;">
Memory Usage Memory Usage
</span> </span>
<span style="word-wrap: break-word;"> <span style="word-wrap: break-word;">
( {{memoryUsage}} Bytes ) ( {{memoryUsage}} Bytes )
</span> </span>
{{/if}} {{/if}}
{{/equal}} {{/equal}}
{{#equal isActive false}} {{#equal isActive false}}
<span style="word-wrap: break-word;">{{name}}</span> {{#equal platform "android"}}<i class="icon fw fw-android text-muted"></i>{{/equal}}
<span style="word-wrap: break-word;"><b>V:{{version}}</b></span> {{#equal platform "ios"}}<i class="icon fw fw-apple text-muted"></i>{{/equal}}
{{#equal platform "windows"}}<i class="icon fw fw-windows text-muted"></i>{{/equal}}
<span style="word-wrap: break-word;" class="text-muted">{{name}}</span>
<span style="word-wrap: break-word;" class="text-muted"><b>V:{{version}}</b></span>
{{/equal}} {{/equal}}
</a> </a>
{{/each}} {{/each}}

@ -1,61 +1,69 @@
<div class="wr-list-group wr-sortable policy-list"> <div class="wr-list-group wr-sortable policy-list">
<span class="list-group-item" id="{{id}}"> <span class="list-group-item" id="{{id}}">
<div class="row"> <div class="row">
<div class="col-lg-3 clearfix"> <div class="col-lg-2 clearfix" style="padding-left: 20px; padding-top: 10px;">
<span class="wr-list-icon"> <span class="wr-list-icon">
{{#equal deviceType "android"}} {{#equal deviceType "android"}}
<i class=" fw fw-android"></i> <i class=" fw fw-android"></i>
{{/equal}} {{/equal}}
{{#equal deviceType "ios"}} {{#equal deviceType "ios"}}
<i class=" fw fw-apple"></i> <i class=" fw fw-apple"></i>
{{/equal}} {{/equal}}
{{#equal deviceType "windows"}} {{#equal deviceType "windows"}}
<i class=" fw fw-windows"></i> <i class=" fw fw-windows"></i>
{{/equal}} {{/equal}}
</span> </span>
<span class="wr-list-desc"> <span class="wr-list-desc">
<h3 class="wr-list-name">{{policy.policyName}}</h3> <h3 class="wr-list-name">{{policy.policyName}}</h3>
<span class="wr-list-username">{{deviceType}}</span> <span>{{deviceType}}</span>
</span> </span>
</div> </div>
<div class="col-lg-6"> <div class="col-lg-7">
<div class="row no-gutter"> <div class="row no-gutter">
<div class="wr-desc-list-configs col-lg-4"> <div class="wr-desc-list-configs col-lg-4">
<div> <div>
<b>Ownership Type : </b> {{policy.ownershipType}} <b>Ownership Type</b>
<br>
{{policy.ownershipType}}
</div>
</div> </div>
</div> <div class="wr-desc-list-configs col-lg-4">
<div class="wr-desc-list-configs col-lg-4"> <div>
<div> <b>Compliance Type</b>
<b>Compliance Type :</b> {{policy.compliance}} <br>
{{policy.compliance}}
</div>
</div> </div>
</div> <div class="wr-desc-list-configs col-lg-4">
<div class="wr-desc-list-configs col-lg-4"> <div>
<div> <b>Compliance Status</b>
<b>Compliance :</b> <br>
{{#equal compliance "COMPLIANT"}} {{#equal complianceStatus "COMPLIANT"}}
<span><i class="fw fw-ok icon-success"></i> Compliant</span> <span><i class="fw fw-ok icon-success"></i>&nbsp;&nbsp;Compliant</span>
{{/equal}} {{/equal}}
{{#equal compliance "NON-COMPLIANT"}} {{#equal complianceStatus "NON-COMPLIANT"}}
<span><i class="fw fw-warning icon-danger"></i> Not Compliant</span> <span><i class="fw fw-warning icon-danger"></i>&nbsp;&nbsp;Not Compliant</span>
{{/equal}} {{/equal}}
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-lg-2">
<span class="list-group-item-actions" style="padding-top: 15px;">
<!--suppress HtmlUnknownTarget -->
<a href="/emm/policy/view?id={{policy.id}}"
class="cu-btn-inner policy-view-link"
data-id="{{id}}">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-view fw-stack-1x"></i>
</span>
&nbsp;View
</a>
</span>
</div>
</div> </div>
<div class="col-lg-3"> </span>
<span class="list-group-item-actions">
<a href="/emm/policies/view?id={{policy.id}}" class="cu-btn-inner policy-view-link" data-id="{{id}}">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-view fw-stack-1x"></i>
</span>
View
</a>
</span>
</div>
</div>
</span>
</div> </div>
<table class="table table-striped table-hover table-bordered display data-table" id="policy-compliance-table"> <table class="table table-striped table-hover table-bordered display data-table" id="policy-compliance-table">
<thead> <thead>
@ -68,9 +76,9 @@
{{#each complianceFeatures}} {{#each complianceFeatures}}
<tr data-type="selectable"> <tr data-type="selectable">
<td data-display="{{featureCode}}" data-grid-label="Feature Code">{{featureCode}}</td> <td data-display="{{featureCode}}" data-grid-label="Feature Code">{{featureCode}}</td>
<td data-display="{{compliance}}" data-grid-label="Status"> <td data-display="{{complianceStatus}}" data-grid-label="Status">
{{#equal compliance true}}<span><i class="fw fw-ok icon-success"></i> Compliant</span>{{/equal}} {{#equal complianceStatus true}}<span><i class="fw fw-ok icon-success"></i>&nbsp;&nbsp;Compliant</span>{{/equal}}
{{#equal compliance false}}<span><i class="fw fw-warning icon-danger"></i> Not Compliant</span>{{/equal}} {{#equal complianceStatus false}}<span><i class="fw fw-warning icon-danger"></i>&nbsp;&nbsp;Not Compliant</span>{{/equal}}
</td> </td>
</tr> </tr>
{{/each}} {{/each}}

@ -3,16 +3,17 @@
{{unit "mdm.unit.device.qr-modal"}} {{unit "mdm.unit.device.qr-modal"}}
{{#zone "content"}} {{#zone "content"}}
{{#if isAuthorized}} {{#if deviceFound}}
<h1 class="page-sub-title device-id device-select" data-deviceid="{{device.deviceIdentifier}}" data-type="{{device.type}}"> {{#if isAuthorized}}
Device {{device.name}} <h1 class="page-sub-title device-id device-select" data-deviceid="{{device.deviceIdentifier}}" data-type="{{device.type}}" data-ownership="{{device.viewModel.ownership}}">
{{#if device.viewModel.model}} Device {{device.name}}
<span class="lbl-device"> {{#if device.viewModel.model}}
<span class="lbl-device">
( {{device.viewModel.vendor}} {{device.viewModel.model}} ) ( {{device.viewModel.vendor}} {{device.viewModel.model}} )
</span> </span>
{{/if}} {{/if}}
</h1> </h1>
<div class="row no-gutter add-padding-5x add-margin-top-5x" style="border: 1px solid #e4e4e4;"> <div class="row no-gutter add-padding-5x add-margin-top-5x" style="border: 1px solid #e4e4e4;">
<div class="media"> <div class="media">
<div class="media-left media-middle asset-image col-xs-2 col-sm-2 col-md-2 col-lg-2"> <div class="media-left media-middle asset-image col-xs-2 col-sm-2 col-md-2 col-lg-2">
<div class="thumbnail icon"><i class="square-element text fw fw-mobile"></i></div> <div class="thumbnail icon"><i class="square-element text fw fw-mobile"></i></div>
@ -22,354 +23,430 @@
{{#defineZone "device-detail-properties"}} {{#defineZone "device-detail-properties"}}
<table class="table table-responsive table-striped" id="members"> <table class="table table-responsive table-striped" id="members">
<tbody> <tbody>
<tr role="row" class="even"> {{#if device.viewModel.deviceIdentifier}}
<td class="sorting_1" style="padding:10px 15px; width: 1%;">Device</td>
<td style="padding:10px 15px;">{{device.viewModel.vendor}} {{device.properties.model}}</td>
</tr>
{{#if device.viewModel.model}}
<tr role="row" class="odd"> <tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px;">Model</td> <td class="sorting_1" style="padding:10px 15px; width: 15%;">Device ID</td>
<td style="padding:10px 15px;">{{device.viewModel.model}}</td> <td style="padding:10px 15px;">{{device.viewModel.deviceIdentifier}}</td>
</tr> </tr>
{{/if}} {{/if}}
<tr role="row" class="even"> {{#if device.viewModel.deviceName}}
<td class="sorting_1" style="padding:10px 15px;">IMEI</td> <tr role="row" class="even">
<td style="padding:10px 15px;">{{device.viewModel.imei}}</td> <td class="sorting_1" style="padding:10px 15px; width: 15%;">Name</td>
</tr> <td style="padding:10px 15px;">{{device.viewModel.deviceName}}</td>
{{#if device.viewModel.udid}} </tr>
{{/if}}
{{#if device.viewModel.vendor}}
{{#if device.viewModel.model}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Model</td>
<td style="padding:10px 15px;">{{device.viewModel.vendor}} {{device.viewModel.model}}</td>
</tr>
{{/if}}
{{/if}}
{{#if device.status}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Status</td>
<td style="padding:10px 15px;">
{{#equal device.status "ACTIVE"}}<span><i class="fw fw-ok icon-success"></i>&nbsp;&nbsp;Active</span>{{/equal}}
{{#equal device.status "INACTIVE"}}<span><i class="fw fw-warning icon-warning"></i>&nbsp;&nbsp;Inactive</span>{{/equal}}
{{#equal device.status "BLOCKED"}}<span><i class="fw fw-remove icon-danger"></i>&nbsp;&nbsp;Blocked</span>{{/equal}}
{{#equal device.status "REMOVED"}}<span><i class="fw fw-delete icon-danger"></i>&nbsp;&nbsp;Removed</span>{{/equal}}
</td>
</tr>
{{/if}}
{{#if device.viewModel.owner}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Owner</td>
<td style="padding:10px 15px;">{{device.viewModel.owner}}</td>
</tr>
{{/if}}
{{#if device.viewModel.ownership}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Ownership</td>
<td style="padding:10px 15px;">{{device.viewModel.ownership}}</td>
</tr>
{{/if}}
{{#if device.viewModel.imei}}
<tr role="row" class="even"> <tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px;">UDID</td> <td class="sorting_1" style="padding:10px 15px; width: 15%;">IMEI</td>
<td style="padding:10px 15px;">{{device.viewModel.imei}}</td>
</tr>
{{/if}}
{{#if device.viewModel.udid}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">UDID</td>
<td style="padding:10px 15px;">{{device.viewModel.udid}}</td> <td style="padding:10px 15px;">{{device.viewModel.udid}}</td>
</tr> </tr>
{{/if}} {{/if}}
{{#if device.viewModel.os_build_date}} {{#if device.viewModel.os_build_date}}
<tr role="row" class="even"> <tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Firmware Build Date</td> <td class="sorting_1" style="padding:10px 15px; width: 15%;">Firmware Build Date</td>
<td style="padding:10px 15px;">{{device.viewModel.os_build_date}}</td> <td style="padding:10px 15px;">{{device.viewModel.os_build_date}}</td>
</tr> </tr>
{{/if}} {{/if}}
{{#if device.viewModel.phoneNumber}} {{#if device.viewModel.phoneNumber}}
<tr role="row" class="even"> <tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px;">Phone Number</td> <td class="sorting_1" style="padding:10px 15px; width: 15%;">Phone Number</td>
<td style="padding:10px 15px;">{{device.viewModel.phoneNumber}}</td> <td style="padding:10px 15px;">{{device.viewModel.phoneNumber}}</td>
</tr> </tr>
{{/if}} {{/if}}
<tr role="row" class="even"> {{#if device.viewModel.lastUpdatedTime}}
<td class="sorting_1" style="padding:10px 15px;">Status</td> <tr role="row" class="even">
<td style="padding:10px 15px;"> <td class="sorting_1" style="padding:10px 15px; width: 15%;">Last Update</td>
{{#equal device.status "ACTIVE"}}<span><i class="fw fw-ok icon-success"></i>&nbsp;&nbsp;Active</span>{{/equal}} <td style="padding:10px 15px;">{{device.viewModel.lastUpdatedTime}}</td>
{{#equal device.status "INACTIVE"}}<span><i class="fw fw-warning icon-warning"></i>&nbsp;&nbsp;Inactive</span>{{/equal}} </tr>
{{#equal device.status "BLOCKED"}}<span><i class="fw fw-remove icon-danger"></i>&nbsp;&nbsp;Blocked</span>{{/equal}} {{/if}}
{{#equal device.status "REMOVED"}}<span><i class="fw fw-delete icon-danger"></i>&nbsp;&nbsp;Removed</span>{{/equal}}
</td>
</tr>
</tbody> </tbody>
</table> </table>
{{/defineZone}} {{/defineZone}}
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Operations</div> <div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Operations</div>
<div class="add-margin-top-4x"> <div class="add-margin-top-4x">
{{unit "mdm.unit.device.operation-bar" deviceType=device.type}} {{unit "mdm.unit.device.operation-bar" deviceType=device.type ownership=device.viewModel.ownership}}
</div> </div>
</div> </div>
</div> </div>
<div class="media tab-responsive"> <div class="media tab-responsive">
<div class="media-left col-xs-1 col-sm-1 col-md-2 col-lg-2 hidden-xs"> <div class="media-left col-xs-1 col-sm-1 col-md-2 col-lg-2 hidden-xs">
<ul class="list-group nav nav-pills nav-stacked" role="tablist"> <ul class="list-group nav nav-pills nav-stacked" role="tablist">
<li role="presentation" class="list-group-item active"> <li role="presentation" class="list-group-item active">
<a href="#device_details_tab" role="tab" data-toggle="tab" aria-controls="device_details_tab"> <a href="#device_details_tab" role="tab" data-toggle="tab" aria-controls="device_details_tab">
<i class="icon fw fw-mobile"></i><span class="hidden-sm">Device Details</span> <i class="icon fw fw-mobile"></i><span class="hidden-sm">Device Details</span>
</a> </a>
</li> </li>
<li role="presentation" class="list-group-item"> <li role="presentation" class="list-group-item">
<a href="#policy_compliance_tab" role="tab" data-toggle="tab" aria-controls="policy_compliance_tab"> <a href="#policy_compliance_tab" role="tab" data-toggle="tab" aria-controls="policy_compliance_tab">
<i class="icon fw fw-policy"></i><span class="hidden-sm">Policy Compliance</span> <i class="icon fw fw-policy"></i><span class="hidden-sm">Policy Compliance</span>
</a> </a>
</li> </li>
<li role="presentation" class="list-group-item"> <li role="presentation" class="list-group-item">
<a href="#device_location_tab" role="tab" data-toggle="tab" <a href="#device_location_tab" role="tab" data-toggle="tab"
data-lat="{{device.viewModel.location.latitude}}" data-lat="{{device.viewModel.location.latitude}}"
data-long="{{device.viewModel.location.longitude}}" data-long="{{device.viewModel.location.longitude}}"
aria-controls="device_location_tab"> aria-controls="device_location_tab">
<i class="icon fw fw-map-location"></i><span class="hidden-sm">Device Location</span> <i class="icon fw fw-map-location"></i><span class="hidden-sm">Device Location</span>
</a> </a>
</li> </li>
<li role="presentation" class="list-group-item"> <li role="presentation" class="list-group-item">
<a href="#installed_applications_tab" role="tab" data-toggle="tab" aria-controls="installed_applications_tab"> <a href="#installed_applications_tab" role="tab" data-toggle="tab" aria-controls="installed_applications_tab">
<i class="icon fw fw-application"></i><span class="hidden-sm">Installed Applications</span> <i class="icon fw fw-application"></i><span class="hidden-sm">Installed Applications</span>
</a> </a>
</li> </li>
<li role="presentation" class="list-group-item"> <li role="presentation" class="list-group-item">
<a href="#event_log_tab" role="tab" data-toggle="tab" aria-controls="event_log_tab"> <a href="#event_log_tab" role="tab" data-toggle="tab" aria-controls="event_log_tab">
<i class="icon fw fw-text"></i><span class="hidden-sm">Operations Log</span> <i class="icon fw fw-text"></i><span class="hidden-sm">Operations Log</span>
</a> </a>
</li> </li>
</ul> </ul>
</div> </div>
{{#defineZone "device-detail-properties"}} {{#defineZone "device-detail-properties"}}
<div class="media-body add-padding-left-5x remove-padding-xs"> <div class="media-body add-padding-left-5x remove-padding-xs">
<div class="panel-group tab-content remove-padding" id="tabs" role="tablist" aria-multiselectable="true"> <div class="panel-group tab-content remove-padding" id="tabs" role="tablist" aria-multiselectable="true">
<div class="arrow-left hidden-xs"></div> <div class="arrow-left hidden-xs"></div>
<div class="panel panel-default" role="tabpanel" id="device_details_tab"> <div class="panel panel-default" role="tabpanel" id="device_details_tab">
<div class="panel-heading visible-xs collapsed" id="device_details"> <div class="panel-heading visible-xs collapsed" id="device_details">
<h4 class="panel-title"> <h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#tabs" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> <a role="button" data-toggle="collapse" data-parent="#tabs" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<i class="fw fw-mobile fw-2x"></i> <i class="fw fw-mobile fw-2x"></i>
Device Details Device Details
<i class="caret-updown fw fw-down"></i> <i class="caret-updown fw fw-down"></i>
</a> </a>
</h4> </h4>
</div> </div>
<div class="panel-heading display-none-xs">Device Details</div> <div class="panel-heading display-none-xs">Device Details</div>
<div id="loading-content" class="col-centered"> <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="device_details">
<i class="fw fw-settings fw-spin fw-2x"></i> Loading Device Details... <div class="panel-body ">
<div class="device-detail-body">
<!-- device summary -->
{{#equal device.type "windows"}}
<div class="message message-info">
<h4 class="remove-margin"><i class="icon fw fw-info"></i>Not available yet</h4>
</div> </div>
<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="device_details"> {{/equal}}
<div class="panel-body "> {{#if device.viewModel.deviceInfo}}
<div class="device-detail-body"> {{#if device.viewModel.BatteryLevel}}
<!-- device summary --> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
{{#equal device.type "windows"}} <div class="col-md-12">
<div class="message message-info"> <div class="wr-stats-board-tile">
<h4 class="remove-margin"><i class="icon fw fw-info"></i>Not available yet</h4> <div class="tile-name">BATTERY</div>
</div> <div>
{{/equal}} <div class="tile-icon"><i class="fw fw-battery"></i></div>
{{#if device.viewModel.BatteryLevel}} <div class="tile-stats">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> {{device.viewModel.BatteryLevel.value}} %
<div class="col-md-12">
<div class="wr-stats-board-tile">
<div class="tile-name">BATTERY</div>
<div>
<div class="tile-icon"><i class="fw fw-battery"></i></div>
<div class="tile-stats">
{{device.viewModel.BatteryLevel}} %
</div>
</div>
</div>
</div> </div>
</div> </div>
{{/if}} </div>
{{#if device.viewModel.DeviceCapacity}} </div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> </div>
<div class="col-md-12"> {{/if}}
<div class="wr-stats-board-tile"> <!--{{#if device.viewModel.cpuUsage}}-->
<div class="tile-name">STORAGE</div> <!--<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">-->
<div> <!--<div class="col-md-12">-->
<div class="tile-icon"><i class="fw fw-hdd"></i></div> <!--<div class="wr-stats-board-tile">-->
<div class="tile-stats"> <!--<div class="tile-name">CPU Usage</div>-->
{{device.viewModel.DeviceCapacityPercentage}} % <!--<div>-->
<span class="tile-stats-free"> <!--<div class="tile-icon"><i class="fw fw-dashboard"></i></div>-->
{{device.viewModel.AvailableDeviceCapacity}} GB Free <!--<div class="tile-stats">-->
</span> <!--{{device.viewModel.cpuUsage.value}} %-->
</div> <!--</div>-->
</div> <!--</div>-->
</div> <!--</div>-->
</div> <!--</div>-->
</div> <!--</div>-->
{{/if}} <!--{{/if}}-->
{{#if device.viewModel.internal_memory.FreeCapacity}} {{#if device.viewModel.ramUsage}}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="col-md-12"> <div class="col-md-12">
<div class="wr-stats-board-tile"> <div class="wr-stats-board-tile">
<div class="tile-name">LOCAL STORAGE</div> <div class="tile-name">RAM Usage</div>
<div> <div>
<div class="tile-icon"><i class="fw fw-hdd"></i></div> <div class="tile-icon"><i class="fw fw-hardware"></i></div>
<div class="tile-stats"> <div class="tile-stats">
{{device.viewModel.internal_memory.DeviceCapacityPercentage}} % {{device.viewModel.ramUsage.value}} %
<span class="tile-stats-free">
{{device.viewModel.internal_memory.FreeCapacity}} GB Free
</span>
</div>
</div>
</div>
</div> </div>
</div> </div>
{{/if}} </div>
{{#if device.viewModel.external_memory.FreeCapacity}} </div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> </div>
<div class="col-md-12"> {{/if}}
<div class="wr-stats-board-tile"> {{#if device.viewModel.internalMemory}}
<div class="tile-name">EXTERNAL STORAGE</div> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div> <div class="col-md-12">
<div class="tile-icon"><i class="fw fw-usb-drive"></i></div> <div class="wr-stats-board-tile">
<div class="tile-stats"> <div class="tile-name">Local Storage</div>
{{device.viewModel.external_memory.DeviceCapacityPercentage}} % <div>
<span class="tile-stats-free"> <div class="tile-icon"><i class="fw fw-hdd"></i></div>
{{device.viewModel.external_memory.FreeCapacity}} GB Free <div class="tile-stats">
</span> {{device.viewModel.internalMemory.usage}} %
</div> <span class="tile-stats-free">
</div> TOTAL OF {{device.viewModel.internalMemory.total}} GB
</div> </span>
</div> </div>
</div> </div>
{{/if}} </div>
</div> </div>
</div> </div>
</div> {{/if}}
</div> {{#if device.viewModel.externalMemory}}
<div class="panel panel-default visible-xs-block" role="tabpanel" id="policy_compliance_tab"> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="panel-heading visible-xs collapsed" id="policy_compliance"> <div class="col-md-12">
<h4 class="panel-title"> <div class="wr-stats-board-tile">
<a role="button" data-toggle="collapse" data-parent="#tabs" href="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo"> <div class="tile-name">External Storage</div>
<i class="fw fw-policy fw-2x"></i> <div>
Policy Compliance <div class="tile-icon"><i class="fw fw-usb-drive"></i></div>
<i class="caret-updown fw fw-down"></i> <div class="tile-stats">
</a> {{device.viewModel.externalMemory.usage}} %
</h4> <span class="tile-stats-free">
</div> TOTAL OF {{device.viewModel.externalMemory.total}} GB
<div class="panel-heading display-none-xs"> </span>
Policy Compliance </div>
<span> </div>
<a href="javascript:void(0);" id="refresh-policy">
<i class="fw fw-refresh"></i>
</a>
</span>
</div>
<div id="collapseTwo" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="policy_compliance">
<div class="panel-body ">
<span class="visible-xs add-padding-2x text-right">
<a href="javascript:void(0);" id="refresh-policy">
<i class="fw fw-refresh"></i>
</a>
</span>
<div id="policy-spinner" class="wr-advance-operations-init hidden">
<i class="fw fw-settings fw-spin fw-2x"></i> Loading Policy Compliance...
</div>
<div id="policy-list-container">
<div class="message message-info">
<h4 class="remove-margin"><i class="icon fw fw-info"></i>There is no active policy for this device.</h4>
</div> </div>
</div> </div>
</div> </div>
</div> {{/if}}
</div> {{else}}
<div class="panel panel-default visible-xs-block" role="tabpanel" id="device_location_tab"> <div class="message message-info">
<div class="panel-heading visible-xs collapsed" id="device_location"> <h4 class="remove-margin">
<h4 class="panel-title"> <i class="icon fw fw-info"></i>
<a role="button" data-toggle="collapse" data-parent="#tabs" href="#collapseThree" aria-expanded="true" aria-controls="collapseThree"> Battery, RAM and Storage related information are not available yet.
<i class="fw fw-map-location fw-2x"></i>
Device Location
<i class="caret-updown fw fw-down"></i>
</a>
</h4> </h4>
</div> </div>
<div class="panel-heading display-none-xs">Device Location</div> {{/if}}
<div id="collapseThree" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="device_location"> </div>
<div class="panel-body"> </div>
<div id="map-error" class="message message-danger"> </div>
<h4 class="remove-margin"><i class="icon fw fw-error"></i>Device location cannot be retrieved.</h4> </div>
</div> <div class="panel panel-default visible-xs-block" role="tabpanel" id="policy_compliance_tab">
<div id="device-location" <div class="panel-heading visible-xs collapsed" id="policy_compliance">
data-lat="{{device.viewModel.location.latitude}}" <h4 class="panel-title">
data-long="{{device.viewModel.location.longitude}}"> <a role="button"
</div> data-toggle="collapse" data-parent="#tabs" href="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo">
</div> <i class="fw fw-policy fw-2x"></i>
</div> Policy Compliance
<i class="caret-updown fw fw-down"></i>
</a>
</h4>
</div>
<div class="panel-heading display-none-xs">
Policy Compliance
&nbsp;&nbsp;
<span>
<a href="javascript:void(0);" id="refresh-policy">
<i class="fw fw-refresh"></i>
</a>
</span>
</div>
<div id="collapseTwo" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="policy_compliance">
<div class="panel-body ">
<span class="visible-xs add-padding-2x text-right">
<a href="javascript:void(0);" id="refresh-policy">
<i class="fw fw-refresh"></i>
</a>
</span>
<div id="policy-spinner" class="wr-advance-operations-init hidden">
<i class="fw fw-settings fw-spin fw-2x"></i> Loading Policy Compliance...
</div>
<div id="policy-list-container">
<div class="message message-info">
<h4 class="remove-margin">
<i class="icon fw fw-info"></i>
There is currently no effective policy applied for this device.
</h4>
</div> </div>
<div class="panel panel-default visible-xs-block" role="tabpanel" id="installed_applications_tab"> </div>
<div class="panel-heading visible-xs collapsed" id="installed_applications"> </div>
<h4 class="panel-title"> </div>
<a role="button" data-toggle="collapse" data-parent="#tabs" href="#collapseFour" aria-expanded="true" aria-controls="collapseFour"> </div>
<i class="fw fw-application fw-2x"></i> <div class="panel panel-default visible-xs-block" role="tabpanel" id="device_location_tab">
Installed Applications <div class="panel-heading visible-xs collapsed" id="device_location">
<i class="caret-updown fw fw-down"></i> <h4 class="panel-title">
</a> <a role="button" data-toggle="collapse" data-parent="#tabs" href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">
</h4> <i class="fw fw-map-location fw-2x"></i>
</div> Device Location
<div class="panel-heading display-none-xs"> <i class="caret-updown fw fw-down"></i>
Installed Applications </a>
<span> </h4>
<a href="javascript:void(0);" id="refresh-apps"> </div>
<i class="fw fw-refresh"></i> <div class="panel-heading display-none-xs">Device Location</div>
</a> <div id="collapseThree" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="device_location">
</span> <div class="panel-body">
</div> <div id="map-error" class="message message-danger">
<div id="collapseFour" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="installed_applications"> <h4 class="remove-margin">
<div class="panel-body "> <i class="icon fw fw-error"></i>
<span class="visible-xs add-padding-2x text-right"> &nbsp;Device location cannot be retrieved.
<a href="javascript:void(0);" id="refresh-apps"> </h4>
<i class="fw fw-refresh"></i> </div>
</a> <div id="device-location"
</span> data-lat="{{device.viewModel.location.latitude}}"
<div id="apps-spinner" class="wr-advance-operations-init hidden"> data-long="{{device.viewModel.location.longitude}}">
<i class="fw fw-settings fw-spin fw-2x"></i> Loading Applications List... </div>
</div> </div>
<div id="applications-list-container"> </div>
<div class="message message-info"> </div>
<h4><i class="icon fw fw-info"></i>No applications found.</h4> <div class="panel panel-default visible-xs-block" role="tabpanel" id="installed_applications_tab">
<p>Please try refreshing the list in a while.</p> <div class="panel-heading visible-xs collapsed" id="installed_applications">
</div> <h4 class="panel-title">
</div> <a role="button" data-toggle="collapse" data-parent="#tabs" href="#collapseFour" aria-expanded="true" aria-controls="collapseFour">
</div> <i class="fw fw-application fw-2x"></i>
</div> Installed Applications
<i class="caret-updown fw fw-down"></i>
</a>
</h4>
</div>
<div class="panel-heading display-none-xs">
Installed Applications
&nbsp;&nbsp;
<span>
<a href="javascript:void(0);" id="refresh-apps">
<i class="fw fw-refresh"></i>
</a>
</span>
</div>
<div id="collapseFour" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="installed_applications">
<div class="panel-body">
<span class="visible-xs add-padding-2x text-right">
<a href="javascript:void(0);" id="refresh-apps">
<i class="fw fw-refresh"></i>
</a>
</span>
<div id="apps-spinner" class="wr-advance-operations-init hidden">
<i class="fw fw-settings fw-spin fw-2x"></i> Loading Applications List...
</div>
<div id="applications-list-container">
<div class="message message-info">
<h4>
<i class="icon fw fw-info"></i>
No applications found.
</h4>
<p>Please try refreshing in a while.</p>
</div> </div>
<div class="panel panel-default visible-xs-block" role="tabpanel" id="event_log_tab"> </div>
<div class="panel-heading visible-xs collapsed" id="event_log"> </div>
<h4 class="panel-title"> </div>
<a role="button" data-toggle="collapse" data-parent="#tabs" href="#collapseFive" aria-expanded="true" aria-controls="collapseFive"> </div>
<i class="fw fw-text fw-2x"></i> <div class="panel panel-default visible-xs-block" role="tabpanel" id="event_log_tab">
Operations Logs <div class="panel-heading visible-xs collapsed" id="event_log">
<i class="caret-updown fw fw-down"></i> <h4 class="panel-title">
</a> <a role="button" data-toggle="collapse" data-parent="#tabs" href="#collapseFive" aria-expanded="true" aria-controls="collapseFive">
</h4> <i class="fw fw-text fw-2x"></i>
</div> Operations Log
<div class="panel-heading display-none-xs"> <i class="caret-updown fw fw-down"></i>
Operations Logs </a>
<span> </h4>
<a href="javascript:void(0);" id="refresh-operations"> </div>
<i class="fw fw-refresh"></i> <div class="panel-heading display-none-xs">
</a> Operations Log
</span> &nbsp;&nbsp;
</div> <span>
<div id="collapseFive" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="event_log"> <a href="javascript:void(0);" id="refresh-operations">
<div class="panel-body"> <i class="fw fw-refresh"></i>
</a>
</span>
</div>
<div id="collapseFive" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="event_log">
<div class="panel-body">
<span class="visible-xs add-padding-2x text-right"> <span class="visible-xs add-padding-2x text-right">
<a href="javascript:void(0);" id="refresh-operations"> <a href="javascript:void(0);" id="refresh-operations">
<i class="fw fw-refresh"></i> <i class="fw fw-refresh"></i>
</a> </a>
</span> </span>
<div id="operations-spinner" class="wr-advance-operations-init hidden"> <div id="operations-spinner" class="wr-advance-operations-init hidden">
<i class="fw fw-settings fw-spin fw-2x"></i> Loading Operations Log... <i class="fw fw-settings fw-spin fw-2x"></i> Loading Operations Log...
</div> </div>
<div id="operations-log-container"> <div id="operations-log-container">
<div class="message message-info"> <div class="message message-info">
<h4 class="remove-margin"><i class="icon fw fw-info"></i>There are no operations, performed yet on this device.</h4> <h4 class="remove-margin">
</div> <i class="icon fw fw-info"></i>
</div> There are no operations, performed yet on this device.
<table class="table table-striped table-hover table-bordered display data-table" id="operations-log-table"> </h4>
<thead>
<tr class="sort-row">
<th>Operation Code</th>
<th>Status</th>
<th>Request created at</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div> </div>
</div> </div>
<table class="table table-striped table-hover table-bordered display data-table" id="operations-log-table">
<thead>
<tr class="sort-row">
<th>Operation Code</th>
<th>Status</th>
<th>Request created at</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div> </div>
{{/defineZone}} </div>
</div>
</div> </div>
</div> </div>
{{/defineZone}}
</div>
</div>
{{else}}
<h1 class="page-sub-title">
Permission Denied
</h1>
<br>
You are not authorized to view specified device in the system.
{{/if}}
{{else}} {{else}}
<h1 class="page-sub-title"> <h1 class="page-sub-title">
Permission Denied Device not found
</h1> </h1>
<br> <br>
You are not authorized to view specified device in the system. You have tried to access either a removed or non-existing device.
{{/if}} {{/if}}
{{/zone}} {{/zone}}
{{#zone "bottomJs"}} {{#zone "bottomJs"}}
{{#if isAuthorized}} {{#if isAuthorized}}
<!--suppress HtmlUnknownTarget -->
<script id="policy-view" src="{{@unit.publicUri}}/templates/policy-compliance.hbs" <script id="policy-view" src="{{@unit.publicUri}}/templates/policy-compliance.hbs"
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>
<!--suppress HtmlUnknownTarget -->
<script id="applications-list" src="{{@unit.publicUri}}/templates/applications-list.hbs" <script id="applications-list" src="{{@unit.publicUri}}/templates/applications-list.hbs"
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>
<!--suppress HtmlUnknownTarget -->
<script id="operations-log" src="{{@unit.publicUri}}/templates/operations-log.hbs" <script id="operations-log" src="{{@unit.publicUri}}/templates/operations-log.hbs"
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>

@ -26,6 +26,7 @@ function onRequest(context) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"]; var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var response = deviceModule.viewDevice(deviceType, deviceId); var response = deviceModule.viewDevice(deviceType, deviceId);
if (response["status"] == "success") { if (response["status"] == "success") {
deviceData["deviceFound"] = true;
deviceData["isAuthorized"] = true; deviceData["isAuthorized"] = true;
var device = response["content"]; var device = response["content"];
@ -50,16 +51,18 @@ function onRequest(context) {
latitude: device["properties"]["LATITUDE"], latitude: device["properties"]["LATITUDE"],
longitude: device["properties"]["LONGITUDE"] longitude: device["properties"]["LONGITUDE"]
}; };
viewModel["ownership"] = device["ownership"];
} else if (device["type"] == "android") { } else if (device["type"] == "android") {
viewModel["deviceIdentifier"] = device["deviceIdentifier"];
viewModel["deviceName"] = device["name"];
viewModel["owner"] = device["owner"];
viewModel["ownership"] = device["ownership"];
viewModel["imei"] = device["properties"]["IMEI"]; viewModel["imei"] = device["properties"]["IMEI"];
viewModel["model"] = device["properties"]["DEVICE_MODEL"];
viewModel["vendor"] = device["properties"]["VENDOR"];
var osBuildDate = device["properties"]["OS_BUILD_DATE"]; var osBuildDate = device["properties"]["OS_BUILD_DATE"];
if (osBuildDate != null && osBuildDate != "0") { if (osBuildDate != null && osBuildDate != "0") {
viewModel["os_build_date"] = new Date(osBuildDate * 1000); viewModel["os_build_date"] = new Date(osBuildDate * 1000);
} }
viewModel["internal_memory"] = {};
viewModel["external_memory"] = {};
viewModel["location"] = { viewModel["location"] = {
latitude: device["properties"]["LATITUDE"], latitude: device["properties"]["LATITUDE"],
longitude: device["properties"]["LONGITUDE"] longitude: device["properties"]["LONGITUDE"]
@ -72,33 +75,74 @@ function onRequest(context) {
} }
} }
deviceInfo = info; deviceInfo = info;
viewModel["BatteryLevel"] = deviceInfo["BATTERY_LEVEL"];
viewModel["internal_memory"]["FreeCapacity"] = Math. if (device["deviceInfo"]) {
round(deviceInfo["INTERNAL_AVAILABLE_MEMORY"] * 100)/100; viewModel["deviceInfo"] = true;
viewModel["internal_memory"]["DeviceCapacityPercentage"] = Math.
round(deviceInfo["INTERNAL_AVAILABLE_MEMORY"] viewModel["model"] = device["deviceInfo"]["deviceModel"];
/ deviceInfo["INTERNAL_TOTAL_MEMORY"] * 10000) / 100; viewModel["vendor"] = device["deviceInfo"]["vendor"];
viewModel["external_memory"]["FreeCapacity"] = Math. viewModel["lastUpdatedTime"] = device["deviceInfo"]["updatedTime"].
round(deviceInfo["EXTERNAL_AVAILABLE_MEMORY"] * 100) / 100; substr(0, device["deviceInfo"]["updatedTime"].indexOf("+"));
viewModel["external_memory"]["DeviceCapacityPercentage"] = Math.
round(deviceInfo["EXTERNAL_AVAILABLE_MEMORY"] viewModel["BatteryLevel"] = {};
/ deviceInfo["EXTERNAL_TOTAL_MEMORY"] * 10000) / 100; viewModel["BatteryLevel"]["value"] = device["deviceInfo"]["batteryLevel"];
viewModel["cpuUsage"] = {};
viewModel["cpuUsage"]["value"] = device["deviceInfo"]["cpuUsage"];
viewModel["ramUsage"] = {};
if (device["deviceInfo"]["totalRAMMemory"] != 0) {
viewModel["ramUsage"]["value"] = Math.
round((device["deviceInfo"]["totalRAMMemory"] - device["deviceInfo"]["availableRAMMemory"])
/ device["deviceInfo"]["totalRAMMemory"] * 10000) / 100;
} else {
viewModel["ramUsage"]["value"] = 0;
}
viewModel["internalMemory"] = {};
viewModel["externalMemory"] = {};
viewModel["internalMemory"]["total"] = Math.
round(device["deviceInfo"]["internalTotalMemory"] * 100) / 100;
if (device["deviceInfo"]["internalTotalMemory"] != 0) {
viewModel["internalMemory"]["usage"] = Math.
round((device["deviceInfo"]["internalTotalMemory"] - device["deviceInfo"]["internalAvailableMemory"])
/ device["deviceInfo"]["internalTotalMemory"] * 10000) / 100;
} else {
viewModel["internalMemory"]["usage"] = 0;
}
viewModel["externalMemory"]["total"] = Math.
round(device["deviceInfo"]["externalTotalMemory"] * 100) / 100;
if (device["deviceInfo"]["externalTotalMemory"] != 0) {
viewModel["externalMemory"]["usage"] = Math.
round((device["deviceInfo"]["externalTotalMemory"] - device["deviceInfo"]["externalAvailableMemory"])
/ device["deviceInfo"]["externalTotalMemory"] * 10000) / 100;
} else {
viewModel["externalMemory"]["usage"] = 0;
}
} else {
viewModel["deviceInfo"] = false;
}
} else if (device["type"] == "windows") { } else if (device["type"] == "windows") {
viewModel["imei"] = device["properties"]["IMEI"]; viewModel["imei"] = device["properties"]["IMEI"];
viewModel["model"] = device["properties"]["DEVICE_MODEL"]; viewModel["model"] = device["properties"]["DEVICE_MODEL"];
viewModel["vendor"] = device["properties"]["VENDOR"]; viewModel["vendor"] = device["properties"]["VENDOR"];
viewModel["internal_memory"] = {}; viewModel["internalMemory"] = {};
viewModel["external_memory"] = {}; viewModel["externalMemory"] = {};
viewModel["location"] = { viewModel["location"] = {
latitude: device["properties"]["LATITUDE"], latitude: device["properties"]["LATITUDE"],
longitude: device["properties"]["LONGITUDE"] longitude: device["properties"]["LONGITUDE"]
}; };
viewModel["ownership"] = device["ownership"];
} }
device["viewModel"] = viewModel; device["viewModel"] = viewModel;
} }
deviceData["device"] = device; deviceData["device"] = device;
} else if (response["status"] == "unauthorized") { } else if (response["status"] == "unauthorized") {
deviceData["deviceFound"] = true;
deviceData["isAuthorized"] = false; deviceData["isAuthorized"] = false;
} else if (response["status"] == "notFound") {
deviceData["deviceFound"] = false;
} }
return deviceData; return deviceData;
} }

@ -49,7 +49,9 @@ var androidOperationConstants = {
"VPN_OPERATION": "vpn", "VPN_OPERATION": "vpn",
"VPN_OPERATION_CODE": "VPN", "VPN_OPERATION_CODE": "VPN",
"APPLICATION_OPERATION":"app-restriction", "APPLICATION_OPERATION":"app-restriction",
"APPLICATION_OPERATION_CODE":"APP-RESTRICTION" "APPLICATION_OPERATION_CODE":"APP-RESTRICTION",
"KIOSK_APPS_CODE":"KIOSK_APPS",
"KIOSK_APPS":"cosu-whitelisted-applications"
}; };
// Constants to define iOS Operation Constants // Constants to define iOS Operation Constants
@ -520,6 +522,93 @@ validateStep["policy-profile"] = function () {
validationStatusArray.push(validationStatus); validationStatusArray.push(validationStatus);
} }
if ($.inArray(androidOperationConstants["KIOSK_APPS_CODE"], configuredOperations) != -1) {
//If COSU whitelisting applications configured
operation = androidOperationConstants["KIOSK_APPS"];
// Initializing continueToCheckNextInputs to true
continueToCheckNextInputs = true;
var whitelistedApplicationsGridChildInputs = "div#cosu-whitelisted-applications .child-input";
if (continueToCheckNextInputs) {
if ($(whitelistedApplicationsGridChildInputs).length == 0) {
validationStatus = {
"error": true,
"subErrorMsg": "Applications are not provided in application whitelist list.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
else {
childInputCount = 0;
childInputArray = [];
emptyChildInputCount = 0;
duplicatesExist = false;
// Looping through each child input
$(whitelistedApplicationsGridChildInputs).each(function () {
childInputCount++;
if (childInputCount % 2 == 0) {
// If child input is of second column
childInput = $(this).val();
childInputArray.push(childInput);
// Updating emptyChildInputCount
if (!childInput) {
// If child input field is empty
emptyChildInputCount++;
}
}
});
// Checking for duplicates
initialChildInputArrayLength = childInputArray.length;
if (emptyChildInputCount == 0 && initialChildInputArrayLength > 1) {
for (m = 0; m < (initialChildInputArrayLength - 1); m++) {
poppedChildInput = childInputArray.pop();
for (n = 0; n < childInputArray.length; n++) {
if (poppedChildInput == childInputArray[n]) {
duplicatesExist = true;
break;
}
}
if (duplicatesExist) {
break;
}
}
}
// Updating validationStatus
if (emptyChildInputCount > 0) {
// If empty child inputs are present
validationStatus = {
"error": true,
"subErrorMsg": "One or more package names of " +
"applications are empty.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
} else if (duplicatesExist) {
// If duplicate input is present
validationStatus = {
"error": true,
"subErrorMsg": "Duplicate values exist with " +
"for package names.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
}
}
if (continueToCheckNextInputs) {
validationStatus = {
"error": false,
"okFeature": operation
};
}
// Updating validationStatusArray with validationStatus
validationStatusArray.push(validationStatus);
}
} }
}if (policy["platform"] == platformTypeConstants["WINDOWS"]) { }if (policy["platform"] == platformTypeConstants["WINDOWS"]) {
if (configuredOperations.length == 0) { if (configuredOperations.length == 0) {

@ -114,7 +114,9 @@ var androidOperationConstants = {
"WIFI_OPERATION": "wifi", "WIFI_OPERATION": "wifi",
"WIFI_OPERATION_CODE": "WIFI", "WIFI_OPERATION_CODE": "WIFI",
"APPLICATION_OPERATION":"app-restriction", "APPLICATION_OPERATION":"app-restriction",
"APPLICATION_OPERATION_CODE":"APP-RESTRICTION" "APPLICATION_OPERATION_CODE":"APP-RESTRICTION",
"KIOSK_APPS_CODE":"KIOSK_APPS",
"KIOSK_APPS":"cosu-whitelisted-applications"
}; };
// Constants to define Android Operation Constants // Constants to define Android Operation Constants
@ -491,6 +493,93 @@ validateStep["policy-profile"] = function () {
validationStatusArray.push(validationStatus); validationStatusArray.push(validationStatus);
}
if ($.inArray(androidOperationConstants["KIOSK_APPS_CODE"], configuredOperations) != -1) {
//If COSU whitelisting applications configured
operation = androidOperationConstants["KIOSK_APPS"];
// Initializing continueToCheckNextInputs to true
continueToCheckNextInputs = true;
var whitelistedApplicationsGridChildInputs = "div#cosu-whitelisted-applications .child-input";
if (continueToCheckNextInputs) {
if ($(whitelistedApplicationsGridChildInputs).length == 0) {
validationStatus = {
"error": true,
"subErrorMsg": "Applications are not provided in application whitelist list.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
else {
childInputCount = 0;
childInputArray = [];
emptyChildInputCount = 0;
duplicatesExist = false;
// Looping through each child input
$(whitelistedApplicationsGridChildInputs).each(function () {
childInputCount++;
if (childInputCount % 2 == 0) {
// If child input is of second column
childInput = $(this).val();
childInputArray.push(childInput);
// Updating emptyChildInputCount
if (!childInput) {
// If child input field is empty
emptyChildInputCount++;
}
}
});
// Checking for duplicates
initialChildInputArrayLength = childInputArray.length;
if (emptyChildInputCount == 0 && initialChildInputArrayLength > 1) {
for (m = 0; m < (initialChildInputArrayLength - 1); m++) {
poppedChildInput = childInputArray.pop();
for (n = 0; n < childInputArray.length; n++) {
if (poppedChildInput == childInputArray[n]) {
duplicatesExist = true;
break;
}
}
if (duplicatesExist) {
break;
}
}
}
// Updating validationStatus
if (emptyChildInputCount > 0) {
// If empty child inputs are present
validationStatus = {
"error": true,
"subErrorMsg": "One or more package names of " +
"applications are empty.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
} else if (duplicatesExist) {
// If duplicate input is present
validationStatus = {
"error": true,
"subErrorMsg": "Duplicate values exist with " +
"for package names.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
}
}
if (continueToCheckNextInputs) {
validationStatus = {
"error": false,
"okFeature": operation
};
}
// Updating validationStatusArray with validationStatus
validationStatusArray.push(validationStatus);
} }
} }
} if (policy["platform"] == platformTypeConstants["WINDOWS"]) { } if (policy["platform"] == platformTypeConstants["WINDOWS"]) {

@ -57,17 +57,6 @@
<span id="work-profile-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span> <span id="work-profile-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
<span id="work-profile-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span> <span id="work-profile-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a> </a>
<!--COSU-->
<a href="javascript:void(0)" onclick="showAdvanceOperation('android-for-work-cosu', this)">
<span class="wr-hidden-operation-icon fw-stack">
<i class="fw fw-service fw-stack-2x"></i>
</span>
&nbsp;&nbsp;COSU Configuration
<span id="android-for-work-cosu-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
<span id="android-for-work-cosu-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
<span id="android-for-work-cosu-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a>
<!--/COSU-->
<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">
<i class="fw fw-application fw-stack-1x"></i> <i class="fw fw-application fw-stack-1x"></i>
@ -106,14 +95,14 @@
<span id="cosu-system-update-policy-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span> <span id="cosu-system-update-policy-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></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 class="fw fw-error"></i></span>
</a> </a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('cosu-whitelist-applications', this)"> <a href="javascript:void(0)" onclick="showAdvanceOperation('cosu-whitelisted-applications', this)">
<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-whitelist-applications-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span> <span id="cosu-whitelisted-applications-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
<span id="cosu-whitelist-applications-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span> <span id="cosu-whitelisted-applications-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
<span id="cosu-whitelist-applications-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span> <span id="cosu-whitelisted-applications-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a> </a>
</div> </div>
@ -1469,14 +1458,14 @@
</div> </div>
<!-- cosu-whitelist-applications --> <!-- cosu-whitelist-applications -->
<div class="wr-hidden-operation" data-operation="cosu-whitelist-applications"> <div class="wr-hidden-operation" data-operation="cosu-whitelisted-applications">
<div class="panel panel-default operation-data" data-operation="cosu-whitelist-applications" <div class="panel panel-default operation-data" data-operation="cosu-whitelisted-applications"
data-operation-code="KIOSK_APPS"> data-operation-code="KIOSK_APPS">
<div id="cosu-whitelist-applications-heading" class="panel-heading" role="tab"> <div id="cosu-whitelisted-applications-heading" class="panel-heading" role="tab">
<h2 class="sub-title panel-title"> <h2 class="sub-title panel-title">
Whitelist Applications (COSU) Whitelist Applications (COSU)
<label id="cosu-whitelist-applications-lbl" class="wr-input-control switch" data-toggle="collapse" <label id="cosu-whitelisted-applications-lbl" class="wr-input-control switch" data-toggle="collapse"
data-target="#cosu-whitelist-applications-body"> data-target="#cosu-whitelisted-applications-body">
<input type="checkbox"/> <input type="checkbox"/>
<span class="helper"></span> <span class="helper"></span>
<span class="text"></span> <span class="text"></span>
@ -1491,10 +1480,10 @@
</h2> </h2>
</div> </div>
<div id="cosu-whitelist-applications-body" class="panel-collapse panel-body collapse" role="tabpanel" <div id="cosu-whitelisted-applications-body" class="panel-collapse panel-body collapse" role="tabpanel"
aria-labelledby="cosu-whitelist-applications-body"> aria-labelledby="cosu-whitelisted-applications-body">
<div id="cosu-whitelist-applications-feature-error-msg" class="alert alert-danger hidden" role="alert"> <div id="cosu-whitelisted-applications-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>

@ -1951,6 +1951,24 @@ var slideDownPaneAgainstValueSet = function (selectElement, paneID, valueSet) {
); );
} }
}; };
var slideDownPaneAgainstValueSetForRadioButtons = function (selectElement, paneID, valueSet) {
var selectedValueOnChange = selectElement.value;
var i, slideDownVotes = 0;
for (i = 0; i < valueSet.length; i++) {
if (selectedValueOnChange == valueSet[i]) {
slideDownVotes++;
}
}
var paneSelector = "#" + paneID;
if(slideDownVotes > 0) {
$(paneSelector).removeClass("hidden");
} else {
$(paneSelector).addClass("hidden");
}
};
// End of HTML embedded invoke methods // End of HTML embedded invoke methods

@ -73,14 +73,14 @@
<span id="cosu-system-update-policy-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span> <span id="cosu-system-update-policy-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></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 class="fw fw-error"></i></span>
</a> </a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('cosu-whitelist-applications', this)"> <a href="javascript:void(0)" onclick="showAdvanceOperation('cosu-whitelisted-applications', this)">
<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-whitelist-applications-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span> <span id="cosu-whitelisted-applications-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
<span id="cosu-whitelist-applications-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span> <span id="cosu-whitelisted-applications-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
<span id="cosu-whitelist-applications-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span> <span id="cosu-whitelisted-applications-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a> </a>
</div> </div>
@ -1395,14 +1395,14 @@
</div> </div>
<!-- cosu-whitelist-applications --> <!-- cosu-whitelist-applications -->
<div class="wr-hidden-operation" data-operation="cosu-whitelist-applications"> <div class="wr-hidden-operation" data-operation="cosu-whitelisted-applications">
<div class="panel panel-default operation-data" data-operation="cosu-whitelist-applications" <div class="panel panel-default operation-data" data-operation="cosu-whitelisted-applications"
data-operation-code="KIOSK_APPS"> data-operation-code="KIOSK_APPS">
<div id="cosu-whitelist-applications-heading" class="panel-heading" role="tab"> <div id="cosu-whitelisted-applications-heading" class="panel-heading" role="tab">
<h2 class="sub-title panel-title"> <h2 class="sub-title panel-title">
Whitelist Applications (COSU) Whitelist Applications (COSU)
<label id="cosu-whitelist-applications-lbl" class="wr-input-control switch hidden" data-toggle="collapse" <label id="cosu-whitelisted-applications-lbl" class="wr-input-control switch hidden" data-toggle="collapse"
data-target="#cosu-whitelist-applications-body"> data-target="#cosu-whitelisted-applications-body">
<input type="checkbox"/> <input type="checkbox"/>
<span class="helper"></span> <span class="helper"></span>
<span class="text"></span> <span class="text"></span>
@ -1417,10 +1417,10 @@
</h2> </h2>
</div> </div>
<div id="cosu-whitelist-applications-body" class="panel-collapse panel-body collapse" role="tabpanel" <div id="cosu-whitelisted-applications-body" class="panel-collapse panel-body collapse" role="tabpanel"
aria-labelledby="cosu-whitelist-applications-body"> aria-labelledby="cosu-whitelisted-applications-body">
<div id="cosu-whitelist-applications-feature-error-msg" class="alert alert-danger hidden" role="alert"> <div id="cosu-whitelisted-applications-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>
@ -1475,7 +1475,7 @@
maxlength="100" data-default="" placeholder="[ Package Name ]" disabled/> maxlength="100" data-default="" placeholder="[ Package Name ]" disabled/>
</td> </td>
<td> <td>
<span class="list-group-item-actions"> <span class="list-group-item-actions hidden">
<a href="#cosu-whitelisted-applications-grid" class="grid-input-remove" <a href="#cosu-whitelisted-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">

@ -81,12 +81,13 @@
<li class="visible-inline-block"> <li class="visible-inline-block">
<!--<a href="{{appContext}}notification-listing" title="Failures of operations on the device side will be listed here">--> <!--<a href="{{appContext}}notification-listing" title="Failures of operations on the device side will be listed here">-->
<a data-toggle="sidebar" data-target="#right-sidebar" data-container=".page-content" <a data-toggle="sidebar" data-target="#right-sidebar" data-container=".page-content"
aria-expanded="false" rel="notifications-sidebar"> aria-expanded="false" rel="notifications-sidebar">
<span class="icon fw-stack"> <span id="notification-bubble" class="badge notifications hidden"></span>
<i class="fw fw-notification fw-stack-1x"></i> <span id="notifications-icon" class="icon fw-stack hidden">
</span> <i class="fw fw-notification fw-stack-1x"></i>
<span class="hidden-xs">Notifications</span> </span>
<span class="badge notifications" id="notification-bubble"></span> <span id="notifications-spacer" class="hidden">&nbsp;</span>
<span class="text-capitalize">Notifications</span>
</a> </a>
</li> </li>
</ul> </ul>
@ -94,12 +95,19 @@
{{#zone "sidePanes"}} {{#zone "sidePanes"}}
<!--suppress HtmlUnknownAttribute --> <!--suppress HtmlUnknownAttribute -->
<div class="sidebar-wrapper" id="right-sidebar" is-authorized="{{permissions.LIST_NOTIFICATIONS}}" <div class="sidebar-wrapper" id="right-sidebar" is-authorized="{{permissions.LIST_NOTIFICATIONS}}"
data-side="right" data-width="320" data-sidebar-fixed="true" data-fixed-offset="60" data-spy="affix" data-side="right" data-width="300" data-sidebar-fixed="true" data-fixed-offset="60" data-spy="affix"
data-offset-top="80"> data-offset-top="80">
<br>
<ul class="sidebar-messages"></ul> <ul class="sidebar-messages"></ul>
<br> <br>
<div class="text-center"><a href="{{appContext}}notification-listing" class="btn btn-primary">Show All Notifications</a></div> <div class="text-center">
<a href="{{appContext}}notification-listing" class="btn-operations btn-default">
<span class="fw-stack">
<i class="fw fw-ring fw-stroke fw-stack-2x"></i>
<i class="fw fw-notification fw-stack-1x"></i>
</span>
&nbsp;&nbsp;View All Notifications
</a>
</div>
</div> </div>
{{/zone}} {{/zone}}
{{#zone "bottomJs"}} {{#zone "bottomJs"}}

@ -80,14 +80,19 @@ function toggleEnrollment() {
var updateNotificationCountOnSuccess = function (data, textStatus, jqXHR) { var updateNotificationCountOnSuccess = function (data, textStatus, jqXHR) {
var notificationBubble = "#notification-bubble"; var notificationBubble = "#notification-bubble";
var notificationIcon = "#notifications-icon";
var notificationSpacer = "#notifications-spacer";
if (jqXHR.status == 200 && data) { if (jqXHR.status == 200 && data) {
var responsePayload = JSON.parse(data); var responsePayload = JSON.parse(data);
var newNotificationsCount = responsePayload["count"]; var newNotificationsCount = responsePayload["count"];
if (newNotificationsCount > 0) { if (newNotificationsCount > 0) {
$(notificationBubble).html(newNotificationsCount); $(notificationBubble).html(newNotificationsCount + " NEW");
$(notificationBubble).show(); $(notificationBubble).removeClass("hidden");
$(notificationSpacer).removeClass("hidden");
} else { } else {
$(notificationBubble).hide(); $(notificationBubble).addClass("hidden");
$(notificationSpacer).addClass("hidden");
$(notificationIcon).removeClass("hidden");
} }
} }
}; };
@ -102,7 +107,7 @@ function loadNewNotificationsOnSideViewPanel() {
if ($("#right-sidebar").attr("is-authorized") == "false") { if ($("#right-sidebar").attr("is-authorized") == "false") {
$("#notification-bubble-wrapper").remove(); $("#notification-bubble-wrapper").remove();
} else { } else {
var serviceURL = emmAdminBasePath + "/notifications?status=NEW"; var serviceURL = emmAdminBasePath + "/notifications?offset=0&limit=6&status=NEW";
invokerUtil.get(serviceURL, updateNotificationCountOnSuccess, updateNotificationCountOnError); invokerUtil.get(serviceURL, updateNotificationCountOnSuccess, updateNotificationCountOnError);
loadNewNotifications(); loadNewNotifications();
} }
@ -117,7 +122,7 @@ function loadNewNotifications() {
var currentUser = notifications.data("currentUser"); var currentUser = notifications.data("currentUser");
$.template("notification-listing", notifications.attr("src"), function (template) { $.template("notification-listing", notifications.attr("src"), function (template) {
var serviceURL = emmAdminBasePath + "/notifications?offset=0&limit=5&status=NEW"; var serviceURL = emmAdminBasePath + "/notifications?offset=0&limit=6&status=NEW";
invokerUtil.get( invokerUtil.get(
serviceURL, serviceURL,
// on success // on success
@ -128,7 +133,6 @@ function loadNewNotifications() {
if (responsePayload["notifications"]) { if (responsePayload["notifications"]) {
if (responsePayload.count > 0) { if (responsePayload.count > 0) {
viewModel["notifications"] = responsePayload["notifications"]; viewModel["notifications"] = responsePayload["notifications"];
// viewModel["appContext"] = context;
$(messageSideBar).html(template(viewModel)); $(messageSideBar).html(template(viewModel));
} else { } else {
$(messageSideBar).html( $(messageSideBar).html(

@ -1,12 +1,15 @@
<h4 class="message text-muted">
Most Recent
</h4>
{{#each notifications}} {{#each notifications}}
<li class="message message-info" data-type="selectable" > <li class="message" data-type="selectable" >
<h4> <h4>
<i class="icon fw fw-info"></i> <i class="icon fw fw-mobile text-muted"></i>
<a href="{{../appContext}}/device/{{deviceType}}?id={{deviceIdentifier}}#event_log_tab" <a href="device/{{deviceType}}?id={{deviceIdentifier}}"
data-id="{{operationId}}" data-id="{{operationId}}"
data-url="device/{{deviceType}}?id={{deviceIdentifier}}#event_log_tab" data-url="device/{{deviceType}}?id={{deviceIdentifier}}"
class="new-notification text-capitalize" data-click-event="remove-form"> class="new-notification text-capitalize" data-click-event="remove-form">
{{deviceType}} {{deviceName}} Failure on {{deviceType}} {{deviceName}}
</a> </a>
</h4> </h4>
<p>{{description}}</p> <p>{{description}}</p>

@ -37,7 +37,7 @@ function setPopupMaxHeight() {
* show popup function. * show popup function.
*/ */
function showPopup() { function showPopup() {
$(modalPopup).show(); $(modalPopup).modal('show');
setPopupMaxHeight(); setPopupMaxHeight();
} }
@ -47,7 +47,7 @@ function showPopup() {
function hidePopup() { function hidePopup() {
$(modalPopupContent).html(""); $(modalPopupContent).html("");
$(modalPopupContent).removeClass("operation-data"); $(modalPopupContent).removeClass("operation-data");
$(modalPopup).hide(); $(modalPopup).modal('hide');
} }
var updateNotificationCount = function (data, textStatus, jqXHR) { var updateNotificationCount = function (data, textStatus, jqXHR) {

@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>mobile-base-plugin</artifactId> <artifactId>mobile-base-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>mobile-base-plugin</artifactId> <artifactId>mobile-base-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
@ -58,7 +58,7 @@
javax.xml.bind.*, javax.xml.bind.*,
javax.naming, javax.naming,
javax.sql, javax.sql,
javax.xml.parsers, javax.xml.parsers; version=0.0.0,
org.w3c.dom, org.w3c.dom,
org.wso2.carbon.context, org.wso2.carbon.context,
org.wso2.carbon.utils.*, org.wso2.carbon.utils.*,

@ -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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
@ -173,16 +173,18 @@
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.ws.commons.axiom</groupId> <groupId>org.apache.ws.commons.axiom.wso2</groupId>
<artifactId>axiom-api</artifactId> <artifactId>axiom</artifactId>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <!--dependency>
<groupId>org.apache.ws.commons.axiom</groupId> <groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-impl</artifactId> <artifactId>axiom-impl</artifactId>
</dependency> </dependency-->
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
<artifactId>log4j</artifactId> <artifactId>log4j</artifactId>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
@ -206,12 +208,14 @@
<artifactId>saaj-impl</artifactId> <artifactId>saaj-impl</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.bouncycastle</groupId> <groupId>org.wso2.orbit.org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId> <artifactId>bcpkix-jdk15on</artifactId>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.bouncycastle</groupId> <groupId>org.wso2.orbit.org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId> <artifactId>bcprov-jdk15on</artifactId>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.codehaus.plexus</groupId> <groupId>org.codehaus.plexus</groupId>
@ -240,6 +244,7 @@
<dependency> <dependency>
<groupId>commons-io</groupId> <groupId>commons-io</groupId>
<artifactId>commons-io</artifactId> <artifactId>commons-io</artifactId>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.ws.rs</groupId> <groupId>javax.ws.rs</groupId>
@ -269,6 +274,10 @@
<groupId>org.wso2.carbon.identity</groupId> <groupId>org.wso2.carbon.identity</groupId>
<artifactId>org.wso2.carbon.identity.base</artifactId> <artifactId>org.wso2.carbon.identity.base</artifactId>
</exclusion> </exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
@ -307,10 +316,12 @@
<dependency> <dependency>
<groupId>org.wso2.tomcat</groupId> <groupId>org.wso2.tomcat</groupId>
<artifactId>tomcat-servlet-api</artifactId> <artifactId>tomcat-servlet-api</artifactId>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.code.gson</groupId> <groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId> <artifactId>gson</artifactId>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>

@ -77,8 +77,8 @@ public class OperationHandler {
} }
} else if (Constants.SyncMLResponseCodes.PIN_NOTFOUND.equals(status.getData())) { } else if (Constants.SyncMLResponseCodes.PIN_NOTFOUND.equals(status.getData())) {
for (Operation operation : pendingDataOperations) { for (Operation operation : pendingDataOperations) {
if (operation.getId() == status.getCommandReference() && (OperationCode.Command.DEVICE_LOCK.equals( if (operation.getId() == status.getCommandReference() &&
operation.getCode()))) { (PluginConstants.OperationCodes.DEVICE_LOCK.equals(operation.getCode()))) {
operation.setStatus(Operation.Status.ERROR); operation.setStatus(Operation.Status.ERROR);
if (syncmlDocument.getHeader().getSource().getLocURI() != null) { if (syncmlDocument.getHeader().getSource().getLocURI() != null) {
updateStatus(syncmlDocument.getHeader().getSource().getLocURI(), pendingDataOperations); updateStatus(syncmlDocument.getHeader().getSource().getLocURI(), pendingDataOperations);
@ -353,7 +353,7 @@ public class OperationHandler {
for (ItemTag item : results) { for (ItemTag item : results) {
for (OperationCode.Info info : OperationCode.Info.values()) { for (OperationCode.Info info : OperationCode.Info.values()) {
if (item.getSource().getLocURI().equals(info.getCode()) && if (item.getSource().getLocURI().equals(info.getCode()) &&
PluginConstants.OperationCodes.CAMERA_STATUS.equals(info.name())) { PluginConstants.OperationCodes.CAMERA_STATUS.equals(info.name())) {
Profile cameraProfile = new Profile(); Profile cameraProfile = new Profile();
cameraProfile.setFeatureCode(PluginConstants.OperationCodes.CAMERA); cameraProfile.setFeatureCode(PluginConstants.OperationCodes.CAMERA);
cameraProfile.setData(item.getData()); cameraProfile.setData(item.getData());
@ -365,7 +365,7 @@ public class OperationHandler {
profiles.add(cameraProfile); profiles.add(cameraProfile);
} }
if (item.getSource().getLocURI().equals(info.getCode()) && if (item.getSource().getLocURI().equals(info.getCode()) &&
PluginConstants.OperationCodes.ENCRYPT_STORAGE_STATUS.equals(info.name())) { PluginConstants.OperationCodes.ENCRYPT_STORAGE_STATUS.equals(info.name())) {
Profile encryptStorage = new Profile(); Profile encryptStorage = new Profile();
encryptStorage.setFeatureCode(PluginConstants.OperationCodes.ENCRYPT_STORAGE); encryptStorage.setFeatureCode(PluginConstants.OperationCodes.ENCRYPT_STORAGE);
encryptStorage.setData(item.getData()); encryptStorage.setData(item.getData());
@ -377,7 +377,7 @@ public class OperationHandler {
profiles.add(encryptStorage); profiles.add(encryptStorage);
} }
if (item.getSource().getLocURI().equals(info.getCode()) && if (item.getSource().getLocURI().equals(info.getCode()) &&
PluginConstants.OperationCodes.DEVICE_PASSWORD_STATUS.equals(info.name())) { PluginConstants.OperationCodes.DEVICE_PASSWORD_STATUS.equals(info.name())) {
Profile encryptStorage = new Profile(); Profile encryptStorage = new Profile();
encryptStorage.setFeatureCode(PluginConstants.OperationCodes.PASSCODE_POLICY); encryptStorage.setFeatureCode(PluginConstants.OperationCodes.PASSCODE_POLICY);
encryptStorage.setData(item.getData()); encryptStorage.setData(item.getData());
@ -394,7 +394,6 @@ public class OperationHandler {
Notification notification = new Notification(); Notification notification = new Notification();
notification.setDescription("Auto generated DevicePin : " + pinValue); notification.setDescription("Auto generated DevicePin : " + pinValue);
notification.setOperationId(result.getCommandReference()); notification.setOperationId(result.getCommandReference());
// notification.setDeviceIdentifier(deviceIdentifier);
notification.setStatus(String.valueOf(Notification.Status.NEW)); notification.setStatus(String.valueOf(Notification.Status.NEW));
try { try {
nmService.addNotification(deviceIdentifier, notification); nmService.addNotification(deviceIdentifier, notification);
@ -476,7 +475,7 @@ public class OperationHandler {
} }
} }
WindowsAPIUtils.getPolicyManagerService().checkPolicyCompliance(deviceIdentifier, WindowsAPIUtils.getPolicyManagerService().checkPolicyCompliance(deviceIdentifier,
complianceFeatures); complianceFeatures);
} }
} catch (JSONException e) { } catch (JSONException e) {
throw new WindowsOperationException("Error occurred while parsing json object.", e); throw new WindowsOperationException("Error occurred while parsing json object.", e);

@ -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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<name>WSO2 Carbon - Mobile Windows UI</name> <name>WSO2 Carbon - Mobile Windows UI</name>
<packaging>pom</packaging> <packaging>pom</packaging>

@ -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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-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.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.iot.androidsense.feature</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - IoT Server Android Sense Feature</name> <name>WSO2 Carbon - IoT Server Android Sense 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>iot-plugins-feature</artifactId> <artifactId>iot-plugins-feature</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>iot-plugins-feature</artifactId> <artifactId>iot-plugins-feature</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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>iot-analytics-feature</artifactId> <artifactId>iot-analytics-feature</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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>2.2.1-SNAPSHOT</version> <version>2.2.2-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>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>iot-plugins-feature</artifactId> <artifactId>iot-plugins-feature</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -23,14 +23,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>iot-base-plugin-feature</artifactId> <artifactId>iot-base-plugin-feature</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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.adapter.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.iot.adapter.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<name>WSO2 Carbon - IoT Device Management Feature</name> <name>WSO2 Carbon - IoT Device Management Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains the adapter bundles required for IoT Server</description> <description>This feature contains the adapter bundles required for IoT Server</description>
@ -172,7 +172,7 @@
org.igniterealtime.smack.wso2:smackx:${smackx.wso2.version} org.igniterealtime.smack.wso2:smackx:${smackx.wso2.version}
</bundleDef> </bundleDef>
<bundleDef> <bundleDef>
org.wso2.carbon.identity:org.wso2.carbon.identity.oauth.stub:${carbon.identity.version} org.wso2.carbon.identity:org.wso2.carbon.identity.oauth.stub:${identity.inbound.auth.oauth.version}
</bundleDef> </bundleDef>
</bundles> </bundles>
<importFeatures> <importFeatures>

@ -23,14 +23,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>iot-base-plugin-feature</artifactId> <artifactId>iot-base-plugin-feature</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.iot.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<name>WSO2 Carbon - IoT Device Management Feature</name> <name>WSO2 Carbon - IoT Device Management Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains the core bundles required for IoT Server</description> <description>This feature contains the core bundles required for IoT Server</description>

@ -22,13 +22,13 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>iot-plugins-feature</artifactId> <artifactId>iot-plugins-feature</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>iot-base-plugin-feature</artifactId> <artifactId>iot-base-plugin-feature</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Device Management IoT Base Plugin Feature</name> <name>WSO2 Carbon - Device Management IoT Base Plugin Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>iot-devicetypes-feature</artifactId> <artifactId>iot-devicetypes-feature</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
</parent> </parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>iot-plugins-feature</artifactId> <artifactId>iot-plugins-feature</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
</parent> </parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>

@ -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>2.2.1-SNAPSHOT</version> <version>2.2.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>iot-plugins-feature</artifactId> <artifactId>iot-plugins-feature</artifactId>
<version>2.2.1-SNAPSHOT</version> <version>2.2.2-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>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save