diff --git a/portals/publisher/src/main/webapp/source/src/app/components/GlobalPolicies/Listing/Listing.tsx b/portals/publisher/src/main/webapp/source/src/app/components/GlobalPolicies/Listing/Listing.tsx index 8a31bfe8bff..cbe73f1a1b3 100644 --- a/portals/publisher/src/main/webapp/source/src/app/components/GlobalPolicies/Listing/Listing.tsx +++ b/portals/publisher/src/main/webapp/source/src/app/components/GlobalPolicies/Listing/Listing.tsx @@ -159,7 +159,7 @@ const Listing: React.FC = () => { const fetchGlobalPolicies = () => { setLoading(true); // Due to a bug in current backend, we pass 0, 10 as a workaround for now - const promisedPolicies = API.getAllGatewayPolicies(0, 10); + const promisedPolicies = API.getAllGatewayPolicies(0, 30); promisedPolicies .then((response: any) => { setPolicies(response.body.list); @@ -323,8 +323,8 @@ const Listing: React.FC = () => { APIMAlert.error(response.body.message); } }) - .catch((/* error */) => { - // console.error(error); + .catch((error) => { + console.error(error); if (deploying) { APIMAlert.error('Error occurred while deploying the policy'); } else { diff --git a/portals/publisher/src/main/webapp/source/src/app/components/GlobalPolicies/Policies/GlobalSpecificComponents/DraggablePolicyCard.tsx b/portals/publisher/src/main/webapp/source/src/app/components/GlobalPolicies/Policies/GlobalSpecificComponents/DraggablePolicyCard.tsx index e62d8d372e2..5c280580f59 100644 --- a/portals/publisher/src/main/webapp/source/src/app/components/GlobalPolicies/Policies/GlobalSpecificComponents/DraggablePolicyCard.tsx +++ b/portals/publisher/src/main/webapp/source/src/app/components/GlobalPolicies/Policies/GlobalSpecificComponents/DraggablePolicyCard.tsx @@ -76,6 +76,10 @@ const DraggablePolicyCard: React.FC = ({ }) => { const [hovered, setHovered] = useState(false); const classes = useStyles(); + /** + * React DnD Library has been used here. + * React DnD hook to make the policy card draggable. + */ const [{ isDragging }, drag] = useDrag( () => ({ type: `policyCard-${policyObj.id}`, diff --git a/portals/publisher/src/main/webapp/source/src/app/components/GlobalPolicies/Policies/SharedComponents/PolicyDropzone.tsx b/portals/publisher/src/main/webapp/source/src/app/components/GlobalPolicies/Policies/SharedComponents/PolicyDropzone.tsx index 05fddc08421..cb80631d8b7 100644 --- a/portals/publisher/src/main/webapp/source/src/app/components/GlobalPolicies/Policies/SharedComponents/PolicyDropzone.tsx +++ b/portals/publisher/src/main/webapp/source/src/app/components/GlobalPolicies/Policies/SharedComponents/PolicyDropzone.tsx @@ -56,6 +56,7 @@ const PolicyDropzone: FC = ({ const [droppedPolicy, setDroppedPolicy] = useState(null); /** + * React DnD Library has been used here. * Drop handler for the dropzone. * This will set the dropped policy to the state. * This data will be sent to the lower level components. diff --git a/portals/publisher/src/main/webapp/source/src/app/data/api.js b/portals/publisher/src/main/webapp/source/src/app/data/api.js index 6903e240d0f..79aefa5a871 100644 --- a/portals/publisher/src/main/webapp/source/src/app/data/api.js +++ b/portals/publisher/src/main/webapp/source/src/app/data/api.js @@ -3142,7 +3142,6 @@ class API extends Resource { const requestBody = { requestBody: body, }; - console.log(body); return restApiClient.then(client => { return client.apis['Gateway Policies'].engageGlobalPolicy( {gatewayPolicyMappingId},