Commit ebc7e44ad5597ef30f2312457a94ba125bf353c2
Committed by
Paulo Meireles
1 parent
c0610875
Exists in
master
and in
8 other branches
fix profile on ajax results
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
plugins/mezuro/public/javascripts/results.js
1 | 1 | function results($) { |
2 | 2 | $('.mezuro-display-metrics').click(function() { |
3 | - var profile = 'qt-calculator'; // FIXME | |
3 | + var profile = $('#module-result').attr('data-profile'); | |
4 | 4 | var project = $('#module-result').attr('data-project-id'); |
5 | 5 | var module_name = $(this).attr('data-module-name'); |
6 | 6 | var endpoint = '/profile/' + profile + '/plugins/mezuro/metrics/' + project; | ... | ... |
plugins/mezuro/views/content_viewer/show_project.rhtml
... | ... | @@ -68,7 +68,7 @@ |
68 | 68 | </table> |
69 | 69 | <h5><%= _('Source tree') %></h5> |
70 | 70 | <%= render :partial => 'source_tree', :locals => { :source_tree => @project_result.source_tree } %> |
71 | - <div id='module-result' data-project-id='<%= @page.id %>'> | |
71 | + <div id='module-result' data-profile="<%= @page.profile.name.downcase %>" data-project-id='<%= @page.id %>'> | |
72 | 72 | <%= render :partial => 'module_result', :locals => { :module_result => @page.module_result(@project.name) } %> |
73 | 73 | </div> |
74 | 74 | <div id="loading-message"> | ... | ... |