From 4ec8894a3dc4b15b312fb04e81a80be8d8d78e9c Mon Sep 17 00:00:00 2001 From: Dileesha Rajapakse Date: Tue, 22 Aug 2017 10:47:00 +0530 Subject: [PATCH 1/2] 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 + '
' + From f6c93261a168bbbe84d41070fc464c094a293306 Mon Sep 17 00:00:00 2001 From: Dileesha Rajapakse Date: Tue, 22 Aug 2017 10:50:47 +0530 Subject: [PATCH 2/2] Refactored device-view.js --- .../app/units/cdmf.unit.device.view/public/js/device-view.js | 2 +- 1 file changed, 1 insertion(+), 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 488f9828fa..c1531a6d06 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 @@ -170,7 +170,7 @@ function loadOperationsLog(update) { responseMsg = activityStatus['0'].responses['0'].response; } - Object.entries(payload.activityStatus).forEach( + Object.entries(activityStatus).forEach( ([key, entry]) => { logStream += '
' + '
' +