aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/onap/vid/controller/ProbeController.java
diff options
context:
space:
mode:
authormichal.banka <michal.banka@nokia.com>2019-06-26 11:05:13 +0200
committermichal.banka <michal.banka@nokia.com>2019-07-04 13:37:28 +0200
commitb5bfe9c92e75f80fcad25ea0ce65ef9e45d13a8c (patch)
tree6913d03a472ed1a5b0c7cfd517fd9eb59d85cd29 /vid-app-common/src/main/java/org/onap/vid/controller/ProbeController.java
parentb460da47f0aebe67bed1234711b8bbf4889d1354 (diff)
Add controller which create error reports
Change-Id: Icfba59e90420c0d849c9ba5fae3d0cb1b40ed265 Issue-ID: VID-488 Signed-off-by: michal.banka <michal.banka@nokia.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/controller/ProbeController.java')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/controller/ProbeController.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/ProbeController.java b/vid-app-common/src/main/java/org/onap/vid/controller/ProbeController.java
index c181c6f30..26a8add6a 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controller/ProbeController.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controller/ProbeController.java
@@ -22,27 +22,27 @@ package org.onap.vid.controller;
import org.onap.portalsdk.core.controller.RestrictedBaseController;
import org.onap.vid.model.probes.ExternalComponentStatus;
+import org.onap.vid.services.ProbeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
-import java.util.stream.Collectors;
@RestController
@RequestMapping("probe")
public class ProbeController extends RestrictedBaseController {
- private final List<ProbeInterface> probes;
+ final private ProbeService probeService;
@Autowired
- public ProbeController(List<ProbeInterface> probes) {
- this.probes = probes;
+ public ProbeController(ProbeService probeService) {
+ this.probeService = probeService;
}
@GetMapping
public List<ExternalComponentStatus> getProbe() {
- return probes.stream().map(ProbeInterface::probeComponent).collect(Collectors.toList());
+ return probeService.getProbe();
}
}