-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 1d8e837.
- Loading branch information
1 parent
1d8e837
commit b307168
Showing
11 changed files
with
117 additions
and
217 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
backend/src/main/java/gov/cdc/usds/simplereport/api/AuditDebuggingEndpoint.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package gov.cdc.usds.simplereport.api; | ||
|
||
import gov.cdc.usds.simplereport.config.BeanProfiles; | ||
import gov.cdc.usds.simplereport.db.model.ApiAuditEvent; | ||
import gov.cdc.usds.simplereport.service.AuditService; | ||
import java.util.List; | ||
import org.hibernate.validator.constraints.Range; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.actuate.endpoint.annotation.Endpoint; | ||
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; | ||
import org.springframework.context.annotation.Profile; | ||
import org.springframework.lang.Nullable; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.validation.annotation.Validated; | ||
|
||
@Endpoint(id = "auditlog") | ||
@Component | ||
@Profile(BeanProfiles.SERVER_DEBUG) | ||
@Validated | ||
public class AuditDebuggingEndpoint { | ||
|
||
@Autowired private AuditService _service; | ||
|
||
@ReadOperation(produces = "application/json") | ||
public List<ApiAuditEvent> getLatest( | ||
@Nullable @Range(min = 1, max = AuditService.MAX_EVENT_FETCH) Integer count) { | ||
if (count == null) { | ||
count = 1; | ||
} | ||
return _service.getLastEvents(count); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 0 additions & 80 deletions
80
backend/src/main/java/gov/cdc/usds/simplereport/db/model/ConsoleApiAuditEvent.java
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
backend/src/main/java/gov/cdc/usds/simplereport/service/AuditLoggerService.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.