* Fixed issue in escape

* Added unspecified filter
* Reverting back to old sso module
merge-requests/1/head
Dulitha Wijewantha 10 years ago
parent b6f7998db7
commit e76608187b

@ -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');

@ -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
};
}

@ -1,7 +1,6 @@
<module name="sso" expose="true" xmlns="http://wso2.org/projects/jaggery/module.xml">
<hostObject>
<className>org.wso2.carbon.hostobjects.sso.SAMLSSORelyingPartyObject</className>
<name>SSORelyingParty</name>
</hostObject>
<module name="sso" xmlns="http://wso2.org/projects/jaggery/module.xml">
<script>
<name>client</name>
<path>scripts/sso.client.js</path>
</script>
</module>
Loading…
Cancel
Save