diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/client/javascript/main.js b/product/modules/distribution/src/repository/jaggeryapps/cdm/client/javascript/main.js
index af57503da..70b835187 100644
--- a/product/modules/distribution/src/repository/jaggeryapps/cdm/client/javascript/main.js
+++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/client/javascript/main.js
@@ -17,7 +17,7 @@
*/
function identifierFormatter(value, row, index) {
return [
- '',
+ '',
value,
''
].join('');
@@ -27,7 +27,7 @@ var currentDeviceOperation;
var currentDevice;
var currentDeviceType;
function performOperation(){
- currentDevice = $("#deviceMain").data("deviceid");
+ currentDevice = escape($("#deviceMain").data("deviceid"));
currentDeviceType = $("#deviceMain").data("devicetype");
$.post("/cdm/api/operation/"+currentDeviceType+"/"+currentDevice+"/"+currentDeviceOperation,function(){
$('#confirmModel').modal('hide');
diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/modules/device.js b/product/modules/distribution/src/repository/jaggeryapps/cdm/modules/device.js
index 59fd1ba0c..49e6ef945 100644
--- a/product/modules/distribution/src/repository/jaggeryapps/cdm/modules/device.js
+++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/modules/device.js
@@ -26,6 +26,14 @@ var ArrayList = Packages.java.util.ArrayList;
var log = new Log();
var deviceManagementService = utility.getDeviceManagementService();
+var unspecifiedFilter = function(prop){
+ if(prop==null){
+ return "Unspecified";
+ }else{
+ return prop;
+ }
+}
+
var listDevices = function () {
var devices = deviceManagementService.getAllDevices("android");
var deviceList = [];
@@ -34,14 +42,14 @@ var listDevices = function () {
var propertiesList = DeviceManagerUtil.convertPropertiesToMap(device.getProperties());
deviceList.push({
- "identifier": device.getDeviceIdentifier(),
- "name": device.getName(),
- "ownership": device.getOwnership(),
- "owner": device.getOwner(),
- "deviceType": device.getType(),
- "vendor": propertiesList.get("vendor"),
- "model": propertiesList.get("model"),
- "osVersion": propertiesList.get("osVersion")
+ "identifier": unspecifiedFilter(device.getDeviceIdentifier()),
+ "name": unspecifiedFilter(device.getName()),
+ "ownership": unspecifiedFilter(device.getOwnership()),
+ "owner": unspecifiedFilter(device.getOwner()),
+ "deviceType": unspecifiedFilter(device.getType()),
+ "vendor": unspecifiedFilter(propertiesList.get("vendor")),
+ "model": unspecifiedFilter(propertiesList.get("model")),
+ "osVersion": unspecifiedFilter(propertiesList.get("osVersion"))
});
}
return deviceList;
@@ -94,17 +102,17 @@ var viewDevice = function(type, deviceId){
var entry = iterator.next();
var key = entry.getKey();
var value = entry.getValue();
- properties[key]= value;
+ properties[key]= unspecifiedFilter(value);
}
return {
- "identifier": device.getDeviceIdentifier(),
- "name": device.getName(),
- "ownership": device.getOwnership(),
- "owner": device.getOwner(),
- "deviceType": device.getType(),
- "vendor": propertiesList.get("vendor"),
- "model": propertiesList.get("model"),
- "osVersion": propertiesList.get("osVersion"),
+ "identifier": unspecifiedFilter(device.getDeviceIdentifier()),
+ "name": unspecifiedFilter(device.getName()),
+ "ownership": unspecifiedFilter(device.getOwnership()),
+ "owner": unspecifiedFilter(device.getOwner()),
+ "deviceType": unspecifiedFilter(device.getType()),
+ "vendor": unspecifiedFilter(propertiesList.get("vendor")),
+ "model": unspecifiedFilter(propertiesList.get("model")),
+ "osVersion": unspecifiedFilter(propertiesList.get("osVersion")),
"properties": properties
};
}
\ No newline at end of file
diff --git a/product/modules/distribution/src/repository/modules/sso/module.xml b/product/modules/distribution/src/repository/modules/sso/module.xml
index 15682e728..b32a0fea8 100644
--- a/product/modules/distribution/src/repository/modules/sso/module.xml
+++ b/product/modules/distribution/src/repository/modules/sso/module.xml
@@ -1,7 +1,6 @@
-
-
- org.wso2.carbon.hostobjects.sso.SAMLSSORelyingPartyObject
- SSORelyingParty
-
-
+
+
\ No newline at end of file