Commit de625053d25f94e86d3be2711d29d90f89799f21
1 parent
78c92542
Exists in
master
and in
29 other branches
[Mezuro] project_result back into his own partial
Showing
3 changed files
with
32 additions
and
31 deletions
Show diff stats
plugins/mezuro/public/javascripts/results.js
| ... | ... | @@ -3,8 +3,8 @@ function results($) { |
| 3 | 3 | } |
| 4 | 4 | |
| 5 | 5 | function show_module_result(){ |
| 6 | - var profile = jQuery('#module-result').attr('data-profile'); | |
| 7 | - var project = jQuery('#module-result').attr('data-content'); | |
| 6 | + var profile = jQuery('#ids').attr('data-profile'); | |
| 7 | + var project = jQuery('#ids').attr('data-content'); | |
| 8 | 8 | var module_name = jQuery(this).attr('data-module-name'); |
| 9 | 9 | var endpoint = '/profile/' + profile + '/plugins/mezuro/module_result/' + project; |
| 10 | 10 | show_loading_message(module_name); | ... | ... |
plugins/mezuro/views/content_viewer/_project_result.rhtml
0 → 100644
| ... | ... | @@ -0,0 +1,26 @@ |
| 1 | +<h3><%= _('LAST RESULT') %></h3> | |
| 2 | + | |
| 3 | +<table> | |
| 4 | + <tr> | |
| 5 | + <td><%= _('Date') %></td> | |
| 6 | + <td><%= project_result.date %></td> | |
| 7 | + </tr> | |
| 8 | + <tr> | |
| 9 | + <td><%= _('Load time') %></td> | |
| 10 | + <td><%= project_result.formatted_load_time %></td> | |
| 11 | + </tr> | |
| 12 | + <tr> | |
| 13 | + <td><%= _('Analysis time') %></td> | |
| 14 | + <td><%= project_result.formatted_analysis_time %></td> | |
| 15 | + </tr> | |
| 16 | +</table> | |
| 17 | + | |
| 18 | +<h4><%= _('Source tree') %></h4> | |
| 19 | +<%= render :partial => 'source_tree', :locals => { :source_tree => project_result.source_tree } %> | |
| 20 | + | |
| 21 | +<div id='module-result'> | |
| 22 | +</div> | |
| 23 | + | |
| 24 | +<script type="text/javascript"> | |
| 25 | + jQuery(results); | |
| 26 | +</script> | |
| 0 | 27 | \ No newline at end of file | ... | ... |
plugins/mezuro/views/content_viewer/show_project.rhtml
| ... | ... | @@ -45,33 +45,8 @@ |
| 45 | 45 | <% elsif @project.state.end_with?('ING') %> |
| 46 | 46 | <h3><%= _('Service is ') + @project.state.downcase + ' ' + @project.name + '...' %></h3> |
| 47 | 47 | <% elsif @project.state == 'READY' %> |
| 48 | - <% @project_result = @page.project_result %> | |
| 48 | + <%= render :partial => 'project_result', :locals => { :project_result => @page.project_result } %> | |
| 49 | +<% end %> | |
| 49 | 50 | |
| 50 | - <h3><%= _('LAST RESULT') %></h3> | |
| 51 | - | |
| 52 | - <table> | |
| 53 | - <tr> | |
| 54 | - <td><%= _('Date') %></td> | |
| 55 | - <td><%= @project_result.date %></td> | |
| 56 | - </tr> | |
| 57 | - <tr> | |
| 58 | - <td><%= _('Load time') %></td> | |
| 59 | - <td><%= @project_result.formatted_load_time %></td> | |
| 60 | - </tr> | |
| 61 | - <tr> | |
| 62 | - <td><%= _('Analysis time') %></td> | |
| 63 | - <td><%= @project_result.formatted_analysis_time %></td> | |
| 64 | - </tr> | |
| 65 | - </table> | |
| 66 | - | |
| 67 | - <h4><%= _('Source tree') %></h4> | |
| 68 | - <%= render :partial => 'source_tree', :locals => { :source_tree => @project_result.source_tree } %> | |
| 69 | - | |
| 70 | - <div id='module-result' data-profile="<%= @page.profile.identifier %>" data-content='<%= @page.id %>'> | |
| 71 | - <%= render :partial => 'module_result', :locals => { :module_result => @page.module_result(@project.name) } %> | |
| 72 | - </div> | |
| 73 | - | |
| 74 | - <script type="text/javascript"> | |
| 75 | - jQuery(results); | |
| 76 | - </script> | |
| 77 | -<% end %> | |
| 78 | 51 | \ No newline at end of file |
| 52 | +<div id="ids" data-profile="<%= @page.profile.identifier %>" data-content='<%= @page.id %>'> | |
| 53 | +</div> | ... | ... |