diff --git a/src/main/java/com/loafle/overflow/module/noauthprobe/service/NoAuthProbeService.java b/src/main/java/com/loafle/overflow/module/noauthprobe/service/NoAuthProbeService.java index 4f8d0db..f8b391a 100644 --- a/src/main/java/com/loafle/overflow/module/noauthprobe/service/NoAuthProbeService.java +++ b/src/main/java/com/loafle/overflow/module/noauthprobe/service/NoAuthProbeService.java @@ -55,6 +55,7 @@ public class NoAuthProbeService { probe.setTargetCount(0); probe.setSensorCount(0); probe.setEncryptionKey("111"); + probe.setDisplayName(noAuth.getHostName()+"'s probe"); // resprobe.add(probe); this.probeService.regist(probe); diff --git a/src/main/java/com/loafle/overflow/module/probe/dao/ProbeDAO.java b/src/main/java/com/loafle/overflow/module/probe/dao/ProbeDAO.java index 0badb67..36af79f 100644 --- a/src/main/java/com/loafle/overflow/module/probe/dao/ProbeDAO.java +++ b/src/main/java/com/loafle/overflow/module/probe/dao/ProbeDAO.java @@ -17,5 +17,5 @@ public interface ProbeDAO extends JpaRepository { Probe findByProbeKey(String probeKey); - List findAllByDomain(Domain domain); + List findAllByDomainOrderByIdDesc(Domain domain); } \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/module/probe/service/ProbeService.java b/src/main/java/com/loafle/overflow/module/probe/service/ProbeService.java index 1aca277..96ca37c 100644 --- a/src/main/java/com/loafle/overflow/module/probe/service/ProbeService.java +++ b/src/main/java/com/loafle/overflow/module/probe/service/ProbeService.java @@ -23,7 +23,7 @@ public class ProbeService { public List readAllByDomain(Domain domain) { - return this.probeDAO.findAllByDomain(domain); + return this.probeDAO.findAllByDomainOrderByIdDesc(domain); } public Probe read(long id) { @@ -35,4 +35,7 @@ public class ProbeService { return this.probeDAO.findByProbeKey(probeKey); } + public Probe modify(Probe probe) { + return this.probeDAO.save(probe); + } }