From 3bf3dfd2e70a6e34e4bfb09e987abdb3e3a73c4a Mon Sep 17 00:00:00 2001 From: Jayasanka Weerasinghe Date: Wed, 29 Jan 2020 14:56:39 +0530 Subject: [PATCH] Load both active & inactive devices in APPM device installation --- .../src/components/apps/release/install/DeviceInstall.js | 5 ++--- .../src/components/apps/release/install/DeviceUninstall.js | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/install/DeviceInstall.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/install/DeviceInstall.js index 3bd25828e4..dcb4b2b30c 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/install/DeviceInstall.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/install/DeviceInstall.js @@ -138,7 +138,6 @@ class DeviceInstall extends React.Component { const extraParams = { offset: 10 * (currentPage - 1), // calculate the offset limit: 10, - status: 'ACTIVE', requireDeviceInfo: true, }; @@ -146,11 +145,11 @@ class DeviceInstall extends React.Component { extraParams.type = deviceType; } - // note: encode with '%26' not '&' - const encodedExtraParams = Object.keys(extraParams) + let encodedExtraParams = Object.keys(extraParams) .map(key => key + '=' + extraParams[key]) .join('&'); + encodedExtraParams += '&status=ACTIVE&status=INACTIVE'; // fetch only active and inactive devices // send request to the invoker axios .get( diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/install/DeviceUninstall.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/install/DeviceUninstall.js index 6b6c55772c..f48fad0d80 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/install/DeviceUninstall.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/install/DeviceUninstall.js @@ -136,18 +136,18 @@ class DeviceUninstall extends React.Component { const extraParams = { offset: 10 * (currentPage - 1), // calculate the offset limit: 10, - status: 'ACTIVE', }; if (deviceType !== 'ANY') { extraParams.type = deviceType; } - // note: encode with '%26' not '&' - const encodedExtraParams = Object.keys(extraParams) + let encodedExtraParams = Object.keys(extraParams) .map(key => key + '=' + extraParams[key]) .join('&'); + encodedExtraParams += '&status=ACTIVE&status=INACTIVE'; // fetch only active and inactive devices + const uuid = this.props.uuid; axios .get(