From 8f41190ea335e83dc56f3a14bef150dc83ec03b6 Mon Sep 17 00:00:00 2001 From: Renan Teruo + Diego Araujo Date: Wed, 18 Apr 2012 14:02:29 -0300 Subject: [PATCH] [Mezuro] Partial is now rendered at the right place. Also, partial is in repository. --- plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb | 3 --- plugins/mezuro/public/javascripts/project_content.js | 11 +++++------ plugins/mezuro/views/content_viewer/_metric_history.rhtml | 2 ++ plugins/mezuro/views/content_viewer/_module_result.rhtml | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) create mode 100644 plugins/mezuro/views/content_viewer/_metric_history.rhtml 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 @@ +
+
TESTANDO
diff --git a/plugins/mezuro/views/content_viewer/_module_result.rhtml b/plugins/mezuro/views/content_viewer/_module_result.rhtml index 19559df..37f0473 100644 --- a/plugins/mezuro/views/content_viewer/_module_result.rhtml +++ b/plugins/mezuro/views/content_viewer/_module_result.rhtml @@ -32,7 +32,7 @@ <%= range.nil? or range.comments.nil? ? 'comment empty' : range.comments %> -
+ -- libgit2 0.21.2