new_metric_configuration.html.erb 1.63 KB
<script src="/plugins/mezuro/javascripts/validations.js" type="text/javascript"></script>

<h2><%= @configuration_content.name %> Configuration</h2>

<% form_for :metric_configuration, :url => {:action =>"create_metric_configuration", :controller => "mezuro_plugin_myprofile"},  :method => :get do |f| %>
  <%= hidden_field_tag :id, @configuration_content.id %>
  <%= f.hidden_field :configuration_name, :value => @configuration_content.name %>
  
  <% f.fields_for :metric do |m| %>
  
    <% @metric.language.each do |language| %>
      <%= m.hidden_field :language, :multiple => true, :value => language %>
    <% end %>
    
    <%= m.hidden_field "scope", :value => @metric.scope %>
    <p>
      <%= m.label :origin, "Collector Name:" %>
      <%= @metric.origin %>
      <%= m.hidden_field "origin", :value => @metric.origin %>
    </p>
    <p>
      <%= m.label :name, "Metric Name:" %>
      <%= @metric.name %>
      <%= m.hidden_field "name", :value => @metric.name %>
    </p>
    <!--<p>-->
      <% m.label :description, "Description:" %>
      <% @metric.description %>
      <% m.hidden_field "description", :value => @metric.description %>
    <!--</p>-->
  <% end %>
  <p>
    <%= f.label :code, "Code:" %>
    <%= f.text_field :code %>
  </p>
  <p>
    <%= f.label :aggregation_form, "Aggregation Form:" %>
    <%= f.select :aggregation_form, [["Average","AVERAGE"], ["Median", "MEDIAN"], ["Maximum", "MAXIMUM"], ["Minimum", "MINIMUM"], 
    ["Count", "COUNT"], ["Standard Deviation", "STANDARD_DEVIATION"]] %>
  </p>
  <p>
    <%= f.label :weight, "Weight:" %>
    <%= f.text_field :weight %>
  </p>

  <p>
    <%= f.submit "Add" %>
  </p>

<% end %>