aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/debug.rhtml2
-rw-r--r--app/views/admin/index.rhtml2
-rw-r--r--app/views/admin/stats.rhtml29
-rw-r--r--app/views/layouts/admin.rhtml12
4 files changed, 39 insertions, 6 deletions
diff --git a/app/views/admin/debug.rhtml b/app/views/admin/debug.rhtml
index 8a3fcc895..918c28486 100644
--- a/app/views/admin/debug.rhtml
+++ b/app/views/admin/debug.rhtml
@@ -2,6 +2,8 @@
<h1><%=@title%></h1>
+<p>You are <%= h @http_auth_user %></p>
+
<h2>Environment variables</h2>
<pre>
<%= @request_env.to_yaml %>
diff --git a/app/views/admin/index.rhtml b/app/views/admin/index.rhtml
index c356b5994..6f1550d7b 100644
--- a/app/views/admin/index.rhtml
+++ b/app/views/admin/index.rhtml
@@ -1,4 +1,4 @@
-<% @title = "Overview" %>
+<% @title = "Summary" %>
<h1><%=@title%></h1>
diff --git a/app/views/admin/stats.rhtml b/app/views/admin/stats.rhtml
new file mode 100644
index 000000000..9bca62079
--- /dev/null
+++ b/app/views/admin/stats.rhtml
@@ -0,0 +1,29 @@
+<% @title = "Statistics" %>
+
+<h1>Statistics</h1>
+
+<h2>State of requests</h2>
+
+<table>
+<% for state, count in @request_by_state %>
+<tr> <td><%=state %></td><td><%= count %></td> </tr>
+<% end %>
+</table>
+
+<h2>Tracks by type</h2>
+
+<table>
+<% for state, count in @tracks_by_type %>
+<tr> <td><%=state %></td><td><%= count %></td> </tr>
+<% end %>
+</table>
+
+<h2>Tracks by medium</h2>
+
+<table>
+<% for state, count in @tracks_by_medium %>
+<tr> <td><%=state %></td><td><%= count %></td> </tr>
+<% end %>
+</table>
+
+
diff --git a/app/views/layouts/admin.rhtml b/app/views/layouts/admin.rhtml
index b9b362332..9184cbda7 100644
--- a/app/views/layouts/admin.rhtml
+++ b/app/views/layouts/admin.rhtml
@@ -10,14 +10,16 @@
</head>
<body>
- <p><strong><%= link_to 'WhatDoTheyKnow', main_url('/') %> admin interface:</strong>
- <%= link_to 'Overview', admin_url('') %>
+ <p>
+ <strong><%= link_to 'WhatDoTheyKnow', main_url('/') %> admin:</strong>
+ <%= link_to 'Summary', admin_url('') %>
| <%= link_to 'Timeline', admin_url('timeline') %>
- | <%= link_to 'Public authorities', admin_url('body/list') %>
+ | <%= link_to 'Stats', admin_url('stats') %>
+ | <%= link_to 'Debug', admin_url('debug') %>
+ <strong>View:</strong>
+ <%= link_to 'Authorities', admin_url('body/list') %>
| <%= link_to 'Requests', admin_url('request/list') %>
| <%= link_to 'Users', admin_url('user/list') %>
- | <%= link_to 'Debug', admin_url('debug') %>
- - you are <%= h @http_auth_user %>
</p>
<% if flash[:notice] %>