new_metric_configuration.html.erb
1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<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 %>