fixes for the comments of the PR#404

4.x.x
sameera910409 8 years ago
parent fef7c07cb2
commit 204a0ed943

@ -130,7 +130,7 @@ public interface DeviceManagementService {
String status, String status,
@ApiParam( @ApiParam(
name = "groupId", name = "groupId",
value = "The group name of the device included", value = "Id of the group which device belongs",
required = false) required = false)
@QueryParam("groupId") @QueryParam("groupId")
int groupId, int groupId,

@ -53,7 +53,7 @@ var groupModule = {};
); );
}; };
groupModule.getGroupDeviceCount = function (groupId, owner) { groupModule.getGroupDeviceCount = function (groupId) {
endPoint = deviceServiceEndpoint + "/groups/id/" + groupId + "/devices/count"; endPoint = deviceServiceEndpoint + "/groups/id/" + groupId + "/devices/count";
return serviceInvokers.XMLHttp.get( return serviceInvokers.XMLHttp.get(
endPoint, function (responsePayload) { endPoint, function (responsePayload) {

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

@ -352,7 +352,6 @@ function attachEvents() {
*/ */
$("a.remove-group-link").click(function () { $("a.remove-group-link").click(function () {
var groupId = $(this).data("group-id"); var groupId = $(this).data("group-id");
var groupOwner = $(this).data("group-owner");
$(modalPopupContent).html($('#remove-group-modal-content').html()); $(modalPopupContent).html($('#remove-group-modal-content').html());
showPopup(); showPopup();

Loading…
Cancel
Save