Commit 66b2df1b7b99ca35ff81e5d6dba94b3fbf2e6789

Authored by Alessandro Palmeira + João M. M. da Silva
Committed by João M. M. da Silva
1 parent 9eed1ed3

[Mezuro] Added choose_base_tool view

plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb
@@ -27,8 +27,12 @@ class MezuroPluginProfileController < ProfileController @@ -27,8 +27,12 @@ class MezuroPluginProfileController < ProfileController
27 render :partial => 'content_viewer/module_result', :locals => { :module_result => module_result} 27 render :partial => 'content_viewer/module_result', :locals => { :module_result => module_result}
28 end 28 end
29 29
30 - def teste 30 + def choose_base_tool
31 @configuration_name = params[:configuration_name] 31 @configuration_name = params[:configuration_name]
  32 + @tool_names = Kalibro::Client::BaseToolClient.new
  33 + end
  34 +
  35 + def add_metric
32 end 36 end
33 37
34 end 38 end
plugins/mezuro/views/content_viewer/show_configuration.rhtml
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 </tr> 18 </tr>
19 </table> 19 </table>
20 20
21 -<%= link_to "Add Metric", :controller => "mezuro_plugin_profile", :action => "add_metric", :params => 21 +<%= link_to "Add Metric", :controller => "mezuro_plugin_profile", :action => "choose_base_tool", :params =>
22 {:configuration_name => @configuration.name} %><br/> 22 {:configuration_name => @configuration.name} %><br/>
23 23
24 <table> 24 <table>
plugins/mezuro/views/mezuro_plugin_profile/choose_base_tool.html.erb 0 → 100644
@@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
  1 +<h2><%= @configuration_name%> Configuration</h2>
  2 +
  3 +<h5>Base Tools:</h5>
  4 +<table id="project_info">
  5 + <% @tool_names.base_tool_names.each do |collector_name| %>
  6 + <tr>
  7 + <td>
  8 + <%= link_to collector_name, :controller => "mezuro_plugin_profile", :action => "add_metric", :params =>
  9 + {:configuration_name => @configuration_name} %>
  10 + </td>
  11 + </tr>
  12 + <% end %>
  13 +</table>