diff options
author | Jochen Topf <jochen@topf.org> | 2014-09-07 21:11:31 +0200 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2014-09-07 21:11:31 +0200 |
commit | 026bc7cf6cb062254054c70a46bbf4169cf60be0 (patch) | |
tree | 63a2bcbba52e90fc9b8b9e43cb8401f2e61558e2 /web/lib | |
parent | 6c223d609bb05d1f889f08b0a7031bf62845d1e4 (diff) | |
download | taginfo-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.rb | 14 |
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 |