Merge pull request #733 from rasika/improvement_getuser

Fixing typo and getCarbonUser() replaced with context.user
revert-70aa11f8
Amal Gunatilake 8 years ago committed by GitHub
commit a4072615af

@ -519,7 +519,7 @@
{{/zone}}
{{#zone "bottomJs"}}
<script id="device-listing" data-analitics-url="{{analiticsURL}}" data-current-user="{{@user.username}}" data-device-types="{{deviceTypes}}"
<script id="device-listing" data-analitics-url="{{analyticsURL}}" data-current-user="{{@user.username}}" data-device-types="{{deviceTypes}}"
type="text/x-handlebars-template"></script>
{{js "js/listing.js"}}
{{/zone}}

@ -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;
}

Loading…
Cancel
Save