Commit 230c1aa57be2e16b3bc9bcdad6534bff13dfb04d
Committed by
Paulo Meireles
1 parent
18bdf609
Exists in
master
and in
29 other branches
[Mezuro] Call to metric_history partial(not working because partial was not in repository)
Showing
1 changed file
with
5 additions
and
6 deletions
Show diff stats
plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb
... | ... | @@ -125,15 +125,14 @@ class MezuroPluginProfileController < ProfileController |
125 | 125 | end |
126 | 126 | |
127 | 127 | def module_metrics_history |
128 | - | |
129 | 128 | metric_name = params[:metric_name] |
130 | 129 | for i in 1..50 do |
131 | - puts metric_name | |
132 | - end | |
130 | + puts metric_name | |
131 | + end | |
133 | 132 | content = profile.articles.find(params[:id]) |
134 | - module_history = content.result_history(content.project.name, params[:module_name]) | |
135 | - metric_history = module_history.select { |x| x.metric_result.metric.name == metric_name} | |
136 | -#precisamos que uma variável receba um array com os valores da métrica passada a partir do result history | |
133 | + module_history = content.result_history(params[:module_name]) | |
134 | + metric_history = module_history.collect { |x| (x.metric_results.select { |y| y.metric.name == metric_name })[0] } | |
135 | + #precisamos que uma variável receba um array com os valores da métrica passada a partir do result history | |
137 | 136 | render :partial => 'content_viewer/metric_history', :locals => {:metric_history => metric_history } |
138 | 137 | end |
139 | 138 | ... | ... |