revert-dabc3590
inosh-perera 10 years ago
commit 88cd9826df

@ -17,7 +17,7 @@
*/
function identifierFormatter(value, row, index) {
return [
'<a class="like" href="/cdm/devices/' + row["deviceType"] + '/' + value + '" title="Like">',
'<a class="like" href="/cdm/devices/' + row["deviceType"] + '/' + escape(value) + '" title="Like">',
value,
'</a>'
].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');

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