From 026bc7cf6cb062254054c70a46bbf4169cf60be0 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Sun, 7 Sep 2014 21:11:31 +0200 Subject: Add an error log that captures parsing problems of project files. --- web/lib/ui/taginfo.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'web/lib') 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 -- cgit v1.2.3