diff options
author | Andrei_Barcovschi <andrei.barcovschi@ericsson.com> | 2019-03-06 12:45:45 +0000 |
---|---|---|
committer | Andrei Barcovschi <andrei.barcovschi@ericsson.com> | 2019-03-06 15:27:47 +0000 |
commit | 42dd47e5c8431cafee7b949122672d422e100ae3 (patch) | |
tree | 39a01be9fbe9b25838d803970162e0ff867703f3 /so-monitoring/so-monitoring-handler | |
parent | 91426ec9f221e288ea3f54fa62030e6f17420b90 (diff) |
Fix for So Mon UI search result
Change-Id: Ifa65f415e47fd3ef95a48c5299b04f1038148421
Issue-ID: SO-1507
Signed-off-by: Andrei_Barcovschi <andrei.barcovschi@ericsson.com>
Diffstat (limited to 'so-monitoring/so-monitoring-handler')
2 files changed, 3 insertions, 8 deletions
diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/monitoring/configuration/rest/CorsConfigurer.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/monitoring/configuration/rest/CorsConfigurer.java index 557e2a63b7..0bcf24dbd8 100644 --- a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/monitoring/configuration/rest/CorsConfigurer.java +++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/monitoring/configuration/rest/CorsConfigurer.java @@ -20,16 +20,12 @@ package org.onap.so.monitoring.configuration.rest; -import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.core.Ordered; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; import org.springframework.web.filter.CorsFilter; -import java.util.concurrent.TimeUnit; - /** * @author waqas.ikram@ericsson, eoin.hanan@ericsson.com */ @@ -38,8 +34,8 @@ public class CorsConfigurer { @Bean public CorsFilter corsFilter() { - UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); - CorsConfiguration config = new CorsConfiguration(); + final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + final CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); config.addAllowedOrigin("*"); config.addAllowedHeader("*"); diff --git a/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/db/api/DatabaseServiceProviderTest.java b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/db/api/DatabaseServiceProviderTest.java index 31ef747939..58666671a7 100644 --- a/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/db/api/DatabaseServiceProviderTest.java +++ b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/db/api/DatabaseServiceProviderTest.java @@ -79,7 +79,6 @@ public class DatabaseServiceProviderTest { assertTrue(objUnderTest.getSoInfraRequest(Collections.emptyMap(), 0, 0, null).isEmpty()); } - @Test public void test_GetSoInfraRequest_WithFilters_InfraActiveRequestsList() { final String searchUrl = URL_PROVIDER.getSearchUrl(0, 0, null); @@ -87,7 +86,7 @@ public class DatabaseServiceProviderTest { final Map<String, String[]> filters = new HashMap<>(); filters.put("requestId", new String[] {"EQ", requestID}); - SoActiveInfraRequests soActiveInfraRequests = new SoActiveInfraRequests(); + final SoActiveInfraRequests soActiveInfraRequests = new SoActiveInfraRequests(); soActiveInfraRequests.setRequestId(requestID); final Optional<SoActiveInfraRequests[]> response = |