Project

General

Profile

« Previous | Next » 

Revision 8bd4e480

Added by Ohad Levy over 11 years ago

  • ID 8bd4e4809065b6544e1872e2c818ece850eca238

add subnets to safemode rendering

View differences:

app/models/host.rb
class Jail < ::Safemode::Jail
allow :name, :diskLayout, :puppetmaster, :puppet_ca_server, :operatingsystem, :os, :environment, :ptable, :hostgroup, :url_for_boot,
:params, :info, :hostgroup, :compute_resource, :domain, :ip, :mac, :shortname, :architecture, :model, :certname, :capabilities,
:provider
:provider, :subnet
end
attr_reader :cached_host_params
app/models/subnet.rb
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
class Jail < ::Safemode::Jail
allow :name, :network, :mask, :cidr, :title, :to_label, :gateway, :dns_primary, :dns_secondary, :vlanid
end
# Subnets are displayed in the form of their network network/network mask
def to_label
"#{network}/#{cidr}"

Also available in: Unified diff