From 204a0ed94393b7d8cefd555b300dcd9904cbd9a2 Mon Sep 17 00:00:00 2001 From: sameera910409 Date: Wed, 26 Oct 2016 15:14:53 +0530 Subject: [PATCH] fixes for the comments of the PR#404 --- .../mgt/jaxrs/service/api/DeviceManagementService.java | 2 +- .../devicemgt/app/modules/business-controllers/group.js | 2 +- .../devicemgt/app/pages/cdmf.page.devices/devices.js | 5 ++--- .../app/pages/cdmf.page.groups/public/js/listing.js | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java index a89117c8e3..62036c2778 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java @@ -130,7 +130,7 @@ public interface DeviceManagementService { String status, @ApiParam( name = "groupId", - value = "The group name of the device included", + value = "Id of the group which device belongs", required = false) @QueryParam("groupId") int groupId, diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/group.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/group.js index 0b1a0a1d63..1bc1d80e17 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/group.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/group.js @@ -53,7 +53,7 @@ var groupModule = {}; ); }; - groupModule.getGroupDeviceCount = function (groupId, owner) { + groupModule.getGroupDeviceCount = function (groupId) { endPoint = deviceServiceEndpoint + "/groups/id/" + groupId + "/devices/count"; return serviceInvokers.XMLHttp.get( endPoint, function (responsePayload) { 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 6a83330895..40d7ee1d6b 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 @@ -22,7 +22,6 @@ function onRequest(context) { var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"]; var groupName = request.getParameter("groupName"); - var groupOwner = request.getParameter("groupOwner"); var groupId = request.getParameter("groupId"); var viewModel = {}; @@ -42,9 +41,9 @@ function onRequest(context) { } viewModel.currentUser = currentUser; var deviceCount = 0; - if (groupId && groupOwner) { + if (groupId) { var groupModule = require("/app/modules/business-controllers/group.js")["groupModule"]; - deviceCount = groupModule.getGroupDeviceCount(groupId, groupOwner); + deviceCount = groupModule.getGroupDeviceCount(groupId); } else { deviceCount = deviceModule.getDevicesCount(); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js index 140ba33559..6a5ca16914 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js @@ -352,7 +352,6 @@ function attachEvents() { */ $("a.remove-group-link").click(function () { var groupId = $(this).data("group-id"); - var groupOwner = $(this).data("group-owner"); $(modalPopupContent).html($('#remove-group-modal-content').html()); showPopup();