diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/operation.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/operation.js index e9c07ee0ba9..dd200cdfbe4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/operation.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/operation.js @@ -81,21 +81,11 @@ var operationModule = function () { publicMethods.getControlOperations = function (deviceType) { var operations = privateMethods.getOperationsFromFeatures(deviceType, "operation"); - var features = utility.getDeviceTypeConfig(deviceType).deviceType.features; for (var op in operations) { var iconIdentifier = operations[op].operation; - if (features && features[iconIdentifier]) { - var icon = features[iconIdentifier].icon; - if (icon) { - operations[op]["iconFont"] = icon; - } else if (iconPath) { - var iconPath = utility.getOperationIcon(deviceType, iconIdentifier); - operations[op]["icon"] = iconPath; - } - var formParams = features[iconIdentifier].formParams; - if (formParams) { - operations[op]["uiParams"] = formParams; - } + var icon = utility.getOperationIcon(deviceType, iconIdentifier); + if (icon) { + operations[op]["icon"] = icon; } } return operations; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.hbs index d40bb52ada0..b51e7f0eb87 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.hbs @@ -67,11 +67,11 @@

- - our {{deviceTypeLabel}} device + our {{deviceTypeLabel}} device

diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.js index 1e1cefcb83c..9b0cdacddbc 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.js @@ -21,6 +21,7 @@ function onRequest(context) { var DTYPE_CONF_DEVICE_TYPE_KEY = "deviceType"; var DTYPE_CONF_DEVICE_CATEGORY = "category"; var DTYPE_CONF_DEVICE_TYPE_LABEL_KEY = "label"; + var DTYPE_CONF_VIRTUAL_DEVICE_TYPE_LABEL_KEY = "virtualLabel"; var viewModel = {}; var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"]; @@ -54,6 +55,25 @@ function onRequest(context) { "deviceCategory": deviceCategory, "thumb": utility.getDeviceThumb(deviceType) }); + } else if (deviceCategory == 'hybrid') { + var virtualLabel = configs[DTYPE_CONF_DEVICE_TYPE_KEY][DTYPE_CONF_VIRTUAL_DEVICE_TYPE_LABEL_KEY]; + if (!virtualLabel) { + virtualLabel = deviceTypeLabel; + } + virtualDeviceTypesList.push({ + "hasCustTemplate": false, + "deviceTypeLabel": virtualLabel, + "deviceTypeName": deviceType, + "deviceCategory": deviceCategory, + "thumb": utility.getDeviceThumb(deviceType) + }); + deviceTypesList.push({ + "hasCustTemplate": false, + "deviceTypeLabel": deviceTypeLabel, + "deviceTypeName": deviceType, + "deviceCategory": deviceCategory, + "thumb": utility.getDeviceThumb(deviceType) + }); } else { deviceTypesList.push({ "hasCustTemplate": false,