From 4ec8894a3dc4b15b312fb04e81a80be8d8d78e9c Mon Sep 17 00:00:00 2001 From: Dileesha Rajapakse Date: Tue, 22 Aug 2017 10:47:00 +0530 Subject: [PATCH] Fixing product-iots#1308 Fixed https://github.com/wso2/product-iots/issues/1308 --- .../units/cdmf.unit.device.view/public/js/device-view.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/public/js/device-view.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/public/js/device-view.js index 6ffda98459..488f9828fa 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/public/js/device-view.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/public/js/device-view.js @@ -163,13 +163,19 @@ function loadOperationsLog(update) { function renderLogDetails(obj,data) { var payload = JSON.parse(data); var logStream = '
'; + var activityStatus = payload.activityStatus; + var responseMsg = null; + + if (activityStatus['0'].status == "ERROR") { + responseMsg = activityStatus['0'].responses['0'].response; + } Object.entries(payload.activityStatus).forEach( ([key, entry]) => { logStream += '
' + '
' + '
' + - '' + entry.status + '
' + + '' + ((responseMsg == null) ? entry.status : responseMsg) + '
' + '
' + '
' + '
' + entry.updatedTimestamp + '
' +