summaryrefslogtreecommitdiff
path: root/web/views/reports
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2010-11-13 21:31:39 +0100
committerJochen Topf <jochen@topf.org>2010-11-13 21:31:39 +0100
commit9db63dc2526bf0b2a94e7a6f37a0f7dabdb8f12d (patch)
tree0d2ae6de413c39c21d30aaf296a98ee37977ab45 /web/views/reports
parentc82bbe69572398d44187ca7b57b1ce572f435d65 (diff)
downloadtaginfo-9db63dc2526bf0b2a94e7a6f37a0f7dabdb8f12d.tar
taginfo-9db63dc2526bf0b2a94e7a6f37a0f7dabdb8f12d.tar.gz
Multiple changes
* Improved and cleaned up source import scripts * Improved some reports and report overview * New osmium version that uses a better hash function * Some experimental magic to include Javascipt in an easier way (tested in keys.erb)
Diffstat (limited to 'web/views/reports')
-rw-r--r--web/views/reports/characters_in_keys.erb8
-rw-r--r--web/views/reports/index.erb32
2 files changed, 24 insertions, 16 deletions
diff --git a/web/views/reports/characters_in_keys.erb b/web/views/reports/characters_in_keys.erb
index b54a0a4..8f0b578 100644
--- a/web/views/reports/characters_in_keys.erb
+++ b/web/views/reports/characters_in_keys.erb
@@ -51,6 +51,12 @@ case latin letters (a-z) and the underscore (_) are used. Sometimes the colon
<td><%= sprintf '%.2f', @db.stats('characters_in_keys_rest') * 100.0 / @db.stats('num_keys') %>%</td>
<td>Everything else.</td>
</tr>
+ <tr>
+ <td style="border-top: 1px solid #000000;"></td>
+ <td style="border-top: 1px solid #000000;"><%= @db.stats('num_keys') %></td>
+ <td style="border-top: 1px solid #000000;">100%</td>
+ <td style="border-top: 1px solid #000000;">Total</td>
+ </tr>
</table>
</div>
<div id="tabs-whitespace">
@@ -90,7 +96,7 @@ case latin letters (a-z) and the underscore (_) are used. Sometimes the colon
{ display: 'Characters in Key', name: 'characters', width: 810, sortable: true, align: 'left' }
],
width: 990,
- height: 170
+ height: 200
});
jQuery('#keys-whitespace').flexigrid({
url: '/api/2/db/keys?filters=characters_space',
diff --git a/web/views/reports/index.erb b/web/views/reports/index.erb
index b9642e8..d77a4d2 100644
--- a/web/views/reports/index.erb
+++ b/web/views/reports/index.erb
@@ -1,19 +1,21 @@
<h1>Reports</h1>
-<p>Reports show the data from different perspectives. They often bring
-together the data from several sources in interesting ways.</p>
+<p class="text">Reports show the data from different perspectives.
+They often bring together data from several sources in interesting ways. Some
+of the reports can help with finding certain kinds of errors, such as popular
+keys without wiki pages.</p>
-<table>
- <% Report.each do |report| %>
- <tr>
- <% %w(db wiki).each do |source| %>
- <td>
- <% if report.sources[source] %>
- <img src="/img/sources/<%= source %>.16.png" alt="<%= source.capitalize %>" title="<%= source.capitalize %>" width="16" height="16"/>
- <% end %>
- </td>
- <% end %>
- <td style="padding: 2px;"><a href="<%= report.url %>"><%= report.title %></a></td>
- </tr>
- <% end %>
+<table class="reports">
+ <tr><th class="source" colspan="<%= Source.size %>"/>Data<br/>Sources</th><th></th></tr>
+<% Report.each do |report| %>
+ <tr>
+<% Source.each do |source| %>
+ <td class="source"><%= source.link_img if report.uses_source? source.id %></td>
+<% end %>
+ <td><a href="<%= report.url %>"><%= report.title %></a></td>
+ </tr>
+<% end %>
+ <tr><th class="last" colspan="<%= Source.size %>"/></th><th></th></tr>
</table>
+
+