aboutsummaryrefslogtreecommitdiff
path: root/web/lib
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2014-09-07 21:11:31 +0200
committerJochen Topf <jochen@topf.org>2014-09-07 21:11:31 +0200
commit026bc7cf6cb062254054c70a46bbf4169cf60be0 (patch)
tree63a2bcbba52e90fc9b8b9e43cb8401f2e61558e2 /web/lib
parent6c223d609bb05d1f889f08b0a7031bf62845d1e4 (diff)
downloadtaginfo-026bc7cf6cb062254054c70a46bbf4169cf60be0.tar
taginfo-026bc7cf6cb062254054c70a46bbf4169cf60be0.tar.gz
Add an error log that captures parsing problems of project files.
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/ui/taginfo.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/web/lib/ui/taginfo.rb b/web/lib/ui/taginfo.rb
index 2f7451b..702f6e7 100644
--- a/web/lib/ui/taginfo.rb
+++ b/web/lib/ui/taginfo.rb
@@ -111,9 +111,21 @@ class Taginfo < Sinatra::Base
@section = 'taginfo'
@section_title = t.taginfo.meta
- @projects = @db.select("SELECT * FROM projects.projects ORDER BY name").execute();
+ @projects = @db.select("SELECT * FROM projects.projects ORDER BY name").execute()
erb :'taginfo/projects'
end
+ get %r{/taginfo/projects/([a-z_]+)/error_log} do |id|
+ @title = "Error log for project #{h(id)}"
+ @section = 'taginfo'
+ @section_title = t.taginfo.meta
+
+ @data = @db.select("SELECT name, error_log FROM projects.projects").
+ condition("id = ?", id).
+ execute()[0]
+
+ erb :'taginfo/project_error_log'
+ end
+
end