Revision b09b4515
Added by Ohad Levy about 14 years ago
- ID b09b451583194c3bae7cafc2b5331f1319c4681a
Fixes #193 - move hosts controller away from AS
- Remove active scaffold from hosts controller.
- changed default host graphs from one day for up to one week
- added dynamic dropdown boxes for host creation / edit page (e.g. for puppet classes, operating systems etc).
- converted puppet class selection to a template, using it in hostgroups and hosts edit page.
- Renamed puppetgroups to hostgroups for consistency
- Added search option to list, this include search by facts as well
app/models/hostgroup.rb | ||
---|---|---|
accepts_nested_attributes_for :group_parameters, :reject_if => lambda { |a| a[:value].blank? }, :allow_destroy => true
|
||
has_many :hosts
|
||
before_destroy Ensure_not_used_by.new(:hosts)
|
||
default_scope :order => 'name'
|
||
|
||
acts_as_audited
|
||
|
||
... | ... | |
def to_s
|
||
name
|
||
end
|
||
|
||
def all_puppetclasses
|
||
puppetclasses
|
||
end
|
||
|
||
def hostgroup
|
||
self
|
||
end
|
||
|
||
end
|
Also available in: Unified diff