From 967582d0c32ef6999be792f4a783e61e35ca5a03 Mon Sep 17 00:00:00 2001 From: kamidu Date: Mon, 26 Feb 2018 15:45:12 +0530 Subject: [PATCH 1/2] changing the java scrip to support IE The current or each funtion is not supported my IE and EGDE browsers so we replace that logic with JQuery each to suport IE and EDGE browsers --- .../public/js/device-view.js | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) 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 cedfb8bdc9c..b0ff74bb25d 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 @@ -178,19 +178,17 @@ function loadOperationsLog(update) { responseMsg = activityStatus['0'].responses['0'].response; } - Object.entries(activityStatus).forEach( - ([key, entry]) => { - logStream += '
' + - '
' + - '
' + - '' + ((responseMsg == null) ? entry.status : responseMsg) + '
' + - '
' + - '
' + - '
' + entry.updatedTimestamp + '
' + - '
' + - '
'; - } - ); + $. each (payload.activityStatus, function (key, entry) { + logStream += '
' + + '
' + + '
' + + '' + entry.status + '
' + + '
' + + '
' + + '
' + entry.updatedTimestamp + '
' + + '
' + + '
'; + }); logStream += ''; return logStream; From 8bab4601f476f2725a7533d72fab894ecff68655 Mon Sep 17 00:00:00 2001 From: kamidu Date: Mon, 26 Feb 2018 23:17:29 +0530 Subject: [PATCH 2/2] Removing unsupported js operations To enable IE support removed the => operation frommthe logic --- .../units/cdmf.unit.device.view/public/js/device-view.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 b0ff74bb25d..5875a247fac 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 @@ -145,7 +145,9 @@ function loadOperationsLog(update) { $(row.child()).removeClass('log-data-row'); tr.removeClass('shown'); } else { - invokerUtil.get(uri,(payload) => { + invokerUtil.get(uri, function (payload) { + + } { //update the parent status var payloadObject = JSON.parse(payload); if ( payloadObject["activityStatus"][0]["status"] != rowData["status"] ) { @@ -157,7 +159,7 @@ function loadOperationsLog(update) { tr.find('i.fw-down').removeClass('fw-down').addClass('fw-up'); $(row.child()).addClass('log-data-row'); tr.addClass('shown'); - },(error) => { + },function(error) { },contentType); }