Commit 1d2b4e54b9890c50b7e48b8228356777caa149d3
Committed by
João M. M. da Silva
1 parent
5b1b4afc
Exists in
master
and in
28 other branches
trying to use baseTool but errors occuring
Showing
2 changed files
with
14 additions
and
11 deletions
Show diff stats
plugins/mezuro/lib/kalibro/client/base_tool_client.rb
| @@ -11,6 +11,7 @@ class Kalibro::Client::BaseToolClient | @@ -11,6 +11,7 @@ class Kalibro::Client::BaseToolClient | ||
| 11 | def base_tool(name) | 11 | def base_tool(name) |
| 12 | hash = @port.request(:get_base_tool, {:base_tool_name => name})[:base_tool] | 12 | hash = @port.request(:get_base_tool, {:base_tool_name => name})[:base_tool] |
| 13 | Kalibro::Entities::BaseTool.from_hash(hash) | 13 | Kalibro::Entities::BaseTool.from_hash(hash) |
| 14 | + #FIXME dando erro | ||
| 14 | end | 15 | end |
| 15 | 16 | ||
| 16 | -end | ||
| 17 | \ No newline at end of file | 17 | \ No newline at end of file |
| 18 | +end |
plugins/mezuro/views/cms/mezuro_plugin/_configuration_content.html.erb
| @@ -5,9 +5,8 @@ | @@ -5,9 +5,8 @@ | ||
| 5 | @configuration = @article.title.nil? ? nil : Kalibro::Client::ConfigurationClient.new.configuration(@article.title) | 5 | @configuration = @article.title.nil? ? nil : Kalibro::Client::ConfigurationClient.new.configuration(@article.title) |
| 6 | rescue | 6 | rescue |
| 7 | @configuration = nil | 7 | @configuration = nil |
| 8 | - end | ||
| 9 | - @metrics = Kalibro::Client::MetricsClient.all_metrics | ||
| 10 | -%> | 8 | + end |
| 9 | + %> | ||
| 11 | 10 | ||
| 12 | <%= error_messages_for 'kalibro_configuration' %> | 11 | <%= error_messages_for 'kalibro_configuration' %> |
| 13 | 12 | ||
| @@ -21,10 +20,13 @@ | @@ -21,10 +20,13 @@ | ||
| 21 | <%= f.text_field :description %><br/> | 20 | <%= f.text_field :description %><br/> |
| 22 | 21 | ||
| 23 | <h3> Metrics </h3> | 22 | <h3> Metrics </h3> |
| 24 | -<% @metrics.each do |metric| %> | ||
| 25 | - <div class="metric"> | ||
| 26 | - <%= check_box_tag "article[metric_ids][]", metric.id, true, :id => "article_metric_ids_#{metric.id}" %> | ||
| 27 | - <%= label_tag "article_metric_ids_#{metric.id}", metric.name %> | ||
| 28 | - <%= metric.description %> | ||
| 29 | - </div> | ||
| 30 | -<% end %> | 23 | +<% @tool_names = Kalibro::Client::BaseToolClient.new |
| 24 | +@tool_names.base_tool_names.each do |collector_name| | ||
| 25 | + @collector = @tool_names.base_tool(collector_name) | ||
| 26 | + #FIXME dando erro | ||
| 27 | + @collector.supported_metrics.each do |metric| %> | ||
| 28 | + <div class="metric"> | ||
| 29 | + <%= label_tag "#{metric.origin}" %> | ||
| 30 | + </div> | ||
| 31 | + <% end | ||
| 32 | +end %> |