diff --git a/plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb b/plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb
index 54597d9..68fb686 100644
--- a/plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb
+++ b/plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb
@@ -126,9 +126,6 @@ class MezuroPluginProfileController < ProfileController
def module_metrics_history
metric_name = params[:metric_name]
- for i in 1..50 do
- puts metric_name
- end
content = profile.articles.find(params[:id])
module_history = content.result_history(params[:module_name])
metric_history = module_history.collect { |x| (x.metric_results.select { |y| y.metric.name == metric_name })[0] }
diff --git a/plugins/mezuro/public/javascripts/project_content.js b/plugins/mezuro/public/javascripts/project_content.js
index 9e4fd53..185053f 100644
--- a/plugins/mezuro/public/javascripts/project_content.js
+++ b/plugins/mezuro/public/javascripts/project_content.js
@@ -1,8 +1,8 @@
var processingTree = false;
+var metricName;
jQuery(function (){
jQuery('.source-tree-link').live("click", reloadModule);
jQuery('[data-show]').live("click", toggle_mezuro);
- //alert('AAAASDFAGSGDRSAFGHADFGSDFGSD');
jQuery('[show-metric-history]').live("click", display_metric_history);
showLoadingProcess(true);
showProjectContent();
@@ -15,14 +15,13 @@ function showProjectContent() {
function display_metric_history() {
var module_name = jQuery(this).attr('data-module-name');
var metric_name = jQuery(this).attr('data-metric-name');
- alert (metric_name);
- callAction('module_metrics_history', {module_name: module_name, metric_name: metric_name}, show_metrics)//metric_name, module_name}, show_metrics);
+ metricName = metric_name;
+ callAction('module_metrics_history', {module_name: module_name, metric_name: metric_name}, show_metrics);
+ return false;
}
function show_metrics(content) {
- alert('SSSSSSSSSSS');
- jQuery('#historical').html(content);
-
+ jQuery('#historical-' + metricName).html(content);
}
function toggle_mezuro(){
diff --git a/plugins/mezuro/views/content_viewer/_metric_history.rhtml b/plugins/mezuro/views/content_viewer/_metric_history.rhtml
new file mode 100644
index 0000000..2c5beb5
--- /dev/null
+++ b/plugins/mezuro/views/content_viewer/_metric_history.rhtml
@@ -0,0 +1,2 @@
+
+