Commit a7ae4154642eca8137d3b7feafc45c24f641db13
Committed by
Rafael Manzo
1 parent
54afda38
Exists in
master
and in
8 other branches
[Mezuro] History chart fixed.
Showing
3 changed files
with
3 additions
and
3 deletions
Show diff stats
plugins/mezuro/lib/kalibro/metric_result.rb
... | ... | @@ -30,7 +30,7 @@ class Kalibro::MetricResult < Kalibro::Model |
30 | 30 | end |
31 | 31 | |
32 | 32 | def self.history_of(metric_name, module_result_id) |
33 | - response = self.request(:history_of, {:metric_name => metric_name, :module_result_id => module_result_id})[:date_metric_result] | |
33 | + response = self.request(:history_of_metric, {:metric_name => metric_name, :module_result_id => module_result_id})[:date_metric_result] | |
34 | 34 | response = [] if response.nil? |
35 | 35 | response = [response] if response.is_a?(Hash) |
36 | 36 | response.map {|date_metric_result| Kalibro::DateMetricResult.new date_metric_result} | ... | ... |
plugins/mezuro/public/javascripts/processing.js
... | ... | @@ -26,7 +26,7 @@ function display_metric_history() { |
26 | 26 | |
27 | 27 | //TODO review for project history |
28 | 28 | function display_grade_history() { |
29 | - var module_name = jQuery(this).attr('data-module-id'); | |
29 | + var module_result_id = jQuery(this).attr('data-module-id'); | |
30 | 30 | toggle_mezuro("#historical-grade"); |
31 | 31 | callAction('module_result', 'module_result_history', {module_result_id: module_result_id}, show_grades); |
32 | 32 | return false; | ... | ... |
plugins/mezuro/views/mezuro_plugin_module_result/_metric_results.rhtml
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | <% formatted_name = MezuroPlugin::Helpers::ContentViewerHelper.format_name(metric_configuration_snapshot) %> |
14 | 14 | <% if !range_snapshots.nil? %> |
15 | 15 | <tr> |
16 | - <td style="width: 74%"><a href="#" show-metric-history="<%= formatted_name %>" data-module-id="<%= @module_result_id %>"><%= metric_configuration_snapshot.metric.name %></a></td> | |
16 | + <td style="width: 74%"><a href="#" show-metric-history="<%= formatted_name %>" data-module-id="<%= @module_result.id %>"><%= metric_configuration_snapshot.metric.name %></a></td> | |
17 | 17 | <td><%= MezuroPlugin::Helpers::ContentViewerHelper.format_grade(metric_result.value) %></td> |
18 | 18 | <td><%= metric_configuration_snapshot.weight %></td> |
19 | 19 | <% range_snapshots.each do |range_snapshot| %> | ... | ... |