diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/landingPageStats.tag b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/landingPageStats.tag index e7c8cad4d..3e622b7e2 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/landingPageStats.tag +++ b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/landingPageStats.tag @@ -1,8 +1,44 @@

Current Statistics

-

There have been - ${statsSummary["userCount"]} user${statsSummary["userCount"] == 1 ? "" : "s"} - of this system who have logged in to - ${statsSummary["clientCount"]} total site${statsSummary["clientCount"] == 1 ? "" : "s"}, - for a total of - ${statsSummary["approvalCount"]} site approval${statsSummary["approvalCount"] == 1 ? "" : "s"}.

+

Loading statistics...

+ +

There have been + ? users + of this system who have authorized + ? total sites, + with a total of + ? site approvals.

+ + \ No newline at end of file diff --git a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ManagerController.java b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ManagerController.java index 78f1285f5..0192d3270 100644 --- a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ManagerController.java +++ b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ManagerController.java @@ -38,9 +38,9 @@ public class ManagerController { @RequestMapping({"", "home", "index"}) public String showHomePage(ModelMap m) { - Map summary = statsService.getSummaryStats(); + //Map summary = statsService.getSummaryStats(); - m.put("statsSummary", summary); + //m.put("statsSummary", summary); return "home"; } diff --git a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/StatsAPI.java b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/StatsAPI.java index 8de307ea8..9a7170807 100644 --- a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/StatsAPI.java +++ b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/StatsAPI.java @@ -27,7 +27,6 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; @Controller -@PreAuthorize("hasRole('ROLE_USER')") @RequestMapping("/api/stats") public class StatsAPI { @@ -45,6 +44,7 @@ public class StatsAPI { } + @PreAuthorize("hasRole('ROLE_USER')") @RequestMapping(value = "byclientid", produces = "application/json") public String statsByClient(ModelMap m) { Map e = statsService.getByClientId(); @@ -54,6 +54,7 @@ public class StatsAPI { return "jsonEntityView"; } + @PreAuthorize("hasRole('ROLE_USER')") @RequestMapping(value = "byclientid/{id}", produces = "application/json") public String statsByClientId(@PathVariable("id") Long id, ModelMap m) { Integer e = statsService.getCountForClientId(id);