From 776bafcd7385961fed31092b8babe4320446f040 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Wed, 3 May 2017 23:22:25 +0530 Subject: [PATCH] Fixing typo and getCarbonUser() replaced with context.user --- .../devicemgt/app/pages/cdmf.page.devices/devices.hbs | 2 +- .../devicemgt/app/pages/cdmf.page.devices/devices.js | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs index 7b68b15449..059aa68899 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs @@ -519,7 +519,7 @@ {{/zone}} {{#zone "bottomJs"}} - {{js "js/listing.js"}} {{/zone}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js index 4956332e2b..5727b6f06d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js @@ -80,10 +80,9 @@ function onRequest(context) { } var mdmProps = require("/app/modules/conf-reader/main.js")["conf"]; - var cUser = userModule.getCarbonUser(); - var analiticsServer = mdmProps["dashboardServerURL"]; - var analiticsURL = analiticsServer + "/portal/t/" + cUser.userDomain + "/dashboards/android-iot/battery?owner=" + cUser.username + "&deviceId="; - viewModel.analiticsURL = analiticsURL; + var analyticsServer = mdmProps["dashboardServerURL"]; + var analyticsURL = analyticsServer + "/portal/t/" + context.user.userDomain + "/dashboards/android-iot/battery?owner=" + context.user.username + "&deviceId="; + viewModel.analyticsURL = analyticsURL; return viewModel; }