Project

General

Profile

« Previous | Next » 

Revision fe3d8f82

Added by Ohad Levy over 12 years ago

  • ID fe3d8f828cf4e73dd51e4809a1400c020acd5db3

fixes #1469 - vlan field missing in subnets

View differences:

app/models/subnet.rb
before_destroy EnsureNotUsedBy.new(:hosts, :sps)
scoped_search :on => [:name, :network, :mask, :gateway, :dns_primary, :dns_secondary], :complete_value => true
scoped_search :on => [:name, :network, :mask, :gateway, :dns_primary, :dns_secondary, :vlanid], :complete_value => true
scoped_search :in => :domains, :on => :name, :rename => :domain, :complete_value => true
# Subnets are displayed in the form of their network network/network mask
app/views/subnets/_fields.html.erb
<%= text_f f, :dns_secondary, :help_inline => "Optional: Secondary DNS for this subnet", :label => "Secondary DNS" %>
<%= text_f f, :from, :help_inline => "Optional: Starting IP Address for IP auto suggestion", :label => "From IP" %>
<%= text_f f, :to, :help_inline => "Optional: Ending IP Address for IP auto suggestion", :label => "To IP" %>
<%= text_f f, :vlanid, :help_inline => "Optional: VLAN ID for this subnet", :label => "VLAN" %>
<%= multiple_checkboxes f, :domain, f.object, Domain, :help_inline => "Domains in which this subnet is part" %>
<%= select_f f, :dhcp_id, Feature.find_by_name("DHCP").smart_proxies, :id, :name, :include_blank => "None",
app/views/subnets/index.html.erb
<th><%= sort :name %></th>
<th><%= sort :network %></th>
<th><%= sort :domains %></th>
<th><%= sort :vlanid, :as => 'VLAN' %></th>
<th>DHCP Proxy</th>
<th></th>
</tr>
......
<td><%=link_to_if_authorized h(subnet.name), hash_for_edit_subnet_path(:id => subnet)%></td>
<td><%=subnet.to_label%></td>
<td><%=subnet.domains.to_sentence %></td>
<td><%=subnet.vlanid %></td>
<td><%=subnet.dhcp %></td>
<td align="right">
<%= display_link_if_authorized "Delete", hash_for_subnet_path(:id => subnet, :auth_action => :destroy), :confirm => "Delete #{subnet.name}?", :method => :delete %>

Also available in: Unified diff