RANGER-4656: Filtering the resources in the search filter options on the policy listing page based on policy type.

Signed-off-by: Mehul Parikh <mehul@apache.org>
diff --git a/security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/PolicyListing.jsx b/security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/PolicyListing.jsx
index e7e38d3..5a0eeb6 100644
--- a/security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/PolicyListing.jsx
+++ b/security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/PolicyListing.jsx
@@ -645,7 +645,10 @@
     let currentServiceDef = serviceDef;
 
     if (currentServiceDef !== undefined) {
-      let serviceDefResource = currentServiceDef.resources;
+      let serviceDefResource = getResourcesDefVal(
+        currentServiceDef,
+        policyType
+      );
 
       let serviceDefResourceOption = serviceDefResource?.map((obj) => ({
         category: "resource:" + obj.name,