From cc3c7722d98c831e918bd5563a7a991e317feef9 Mon Sep 17 00:00:00 2001 From: Carlos Morais Date: Thu, 8 Dec 2011 11:55:11 -0200 Subject: [PATCH] Showing error stack trace --- plugins/mezuro/views/content_viewer/show_project.rhtml | 92 +++++++++++--------------------------------------------------------------------------------- 1 file changed, 11 insertions(+), 81 deletions(-) diff --git a/plugins/mezuro/views/content_viewer/show_project.rhtml b/plugins/mezuro/views/content_viewer/show_project.rhtml index 257b387..2204cf2 100644 --- a/plugins/mezuro/views/content_viewer/show_project.rhtml +++ b/plugins/mezuro/views/content_viewer/show_project.rhtml @@ -1,6 +1,5 @@ <% @project = Kalibro::Client::ProjectClient.new.project(@page.name) %> -

<%= @project.name %>'s Info

@@ -15,99 +14,30 @@ - + - + - +
<%= _("Name") %><%= @project.description %>
<%= _("Repository type") %><%= _("Repository type") %> <%= @project.repository.type %>
<%= _("Repository address") %><%= _("Repository address") %> <%= @project.repository.address %>
<%= _("Configuration") %><%= _("Configuration") %> <%= @project.configuration_name %>

-<% if @project.state == 'ERROR' %> +<% if ! @project.error.nil? %>

ERROR

-
-
+ <% @error = @project.error %>

- <%= _("Possible causes:") %> -

+ <%= "State when error ocurred: #{@project.state}" %> +
+ <%= @error.message %> +

<% end %> - -<% if @project.state.end_with? 'ING' %> -
- <%= _("The server is calculating metric results.
Reload the page manually in a few moments.") %> -
-<% end %> - - -<% if @project.state == 'READY' %> - - <% if @project.configuration.nil? %> - <% metric_results = @client.last_module_result(@project.name).metric_results %> - -

<%= _("Total Metrics") %>

- - <% total_results = metric_results.each.select {|result| result.native_metric.scope == 'APPLICATION'} %> - <% total_results.each_with_index do |result, index| %> - - - - - <% end %> -
<%= result.native_metric.name %> <%= result.value %>
- -

<%= _("Statistical Metrics") %>

- <% statistical_results = metric_results.each.select {|result| result.native_metric.scope == 'CLASS'} %> - <% statistical_results.each do |result| %> -
- - - - - - - <% result.available_statistics.each_with_index do |statistic, index| %> - - - - - <% end %> -
- + - - <%= "#{result.native_metric.name}" %> - - <%= "#{result.average}"%> -
-
- <% end %> - - <% else %> - <% metric_results = @client.last_module_result(@project.name).compiled_metric_results %> - -

<%= _("Metrics") %>

- - <% metric_results.each do |result| %> - - - - - <% end %> -
<%= result.native_metric.name %> <%= result.value %>
- <% end %> -<% end %> -- libgit2 0.21.2