From 806155e19d70ed7db1d6924044eb0435e4b9be99 Mon Sep 17 00:00:00 2001 From: iadgovuser29 <33426478+iadgovuser29@users.noreply.github.com> Date: Fri, 21 Jun 2024 15:10:32 -0400 Subject: [PATCH] Don't show archived validation reports --- .../manager/SupplyChainValidationSummaryRepository.java | 5 +++++ .../page/controllers/ValidationReportsPageController.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SupplyChainValidationSummaryRepository.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SupplyChainValidationSummaryRepository.java index a8306057..1e7f94f5 100644 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SupplyChainValidationSummaryRepository.java +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SupplyChainValidationSummaryRepository.java @@ -2,12 +2,17 @@ package hirs.attestationca.persist.entity.manager; import hirs.attestationca.persist.entity.userdefined.Device; import hirs.attestationca.persist.entity.userdefined.SupplyChainValidationSummary; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.UUID; +import java.util.List; @Repository public interface SupplyChainValidationSummaryRepository extends JpaRepository { SupplyChainValidationSummary findByDevice(Device device); + List findByArchiveFlagFalse(); + Page findByArchiveFlagFalse(Pageable pageable); } diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ValidationReportsPageController.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ValidationReportsPageController.java index a2a1ccec..ce19f790 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ValidationReportsPageController.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ValidationReportsPageController.java @@ -122,7 +122,7 @@ public class ValidationReportsPageController extends PageController records = new FilteredRecordsList<>(); int currentPage = input.getStart() / input.getLength(); Pageable paging = PageRequest.of(currentPage, input.getLength(), Sort.by(orderColumnName)); - org.springframework.data.domain.Page pagedResult = supplyChainValidatorSummaryRepository.findAll(paging); + org.springframework.data.domain.Page pagedResult = supplyChainValidatorSummaryRepository.findByArchiveFlagFalse(paging); if (pagedResult.hasContent()) { records.addAll(pagedResult.getContent());