|
|
@ -22,7 +22,6 @@ function onRequest(context) {
|
|
|
|
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
|
|
|
|
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
|
|
|
|
|
|
|
|
|
|
|
|
var groupName = request.getParameter("groupName");
|
|
|
|
var groupName = request.getParameter("groupName");
|
|
|
|
var groupOwner = request.getParameter("groupOwner");
|
|
|
|
|
|
|
|
var groupId = request.getParameter("groupId");
|
|
|
|
var groupId = request.getParameter("groupId");
|
|
|
|
|
|
|
|
|
|
|
|
var viewModel = {};
|
|
|
|
var viewModel = {};
|
|
|
@ -42,9 +41,9 @@ function onRequest(context) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
viewModel.currentUser = currentUser;
|
|
|
|
viewModel.currentUser = currentUser;
|
|
|
|
var deviceCount = 0;
|
|
|
|
var deviceCount = 0;
|
|
|
|
if (groupId && groupOwner) {
|
|
|
|
if (groupId) {
|
|
|
|
var groupModule = require("/app/modules/business-controllers/group.js")["groupModule"];
|
|
|
|
var groupModule = require("/app/modules/business-controllers/group.js")["groupModule"];
|
|
|
|
deviceCount = groupModule.getGroupDeviceCount(groupId, groupOwner);
|
|
|
|
deviceCount = groupModule.getGroupDeviceCount(groupId);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
deviceCount = deviceModule.getDevicesCount();
|
|
|
|
deviceCount = deviceModule.getDevicesCount();
|
|
|
|
}
|
|
|
|
}
|
|
|
|