diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/analytics/analytics.js b/modules/distribution/src/repository/jaggeryapps/iotserver/units/analytics/analytics.js index 353852b2..89a2a78e 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/analytics/analytics.js +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/analytics/analytics.js @@ -1,13 +1,18 @@ function onRequest(context){ - context.sketchPath = "api/device/sketch"; var groupId = request.getParameter("groupId"); + var title; if (groupId){ context.groupId = groupId; - context.title = "Group Analytics"; + title = request.getParameter("name"); }else{ context.groupId = 0; - context.title = "Device Analytics"; + var deviceModule = require("/modules/device.js").deviceModule; + var deviceId = request.getParameter("deviceId"); + var deviceType = request.getParameter("deviceType"); + + title = deviceModule.getDevice(deviceType, deviceId).name; } + context.title = title + " Analytics"; return context; } diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/group-detail/group-detail.hbs b/modules/distribution/src/repository/jaggeryapps/iotserver/units/group-detail/group-detail.hbs index ac63547d..0a0af0b6 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/group-detail/group-detail.hbs +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/group-detail/group-detail.hbs @@ -69,7 +69,7 @@
diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/group-listing/public/templates/group-listing.hbs b/modules/distribution/src/repository/jaggeryapps/iotserver/units/group-listing/public/templates/group-listing.hbs index 48cc3556..47853be0 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/group-listing/public/templates/group-listing.hbs +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/group-listing/public/templates/group-listing.hbs @@ -42,7 +42,7 @@ Devices - +