Bug #223 ยป 0001-Fixes-223.patch
app/controllers/hosts_controller.rb | ||
---|---|---|
def edit
|
||
@host = Host.find(params[:id])
|
||
@environment = @host.environment
|
||
@architecture = @host.architecture
|
||
@operatingsystem = @host.operatingsystem
|
||
end
|
||
def update
|
app/views/hosts/_architecture.html.erb | ||
---|---|---|
<%= label :host, :operatingsystem, "Operating system" %>
|
||
<%= collection_select :host, :operatingsystem_id, @architecture.operatingsystems, :id, :to_label, :include_blank => true %>
|
||
<%= collection_select :host, :operatingsystem_id, @host.architecture.operatingsystems, :id, :to_label, :include_blank => true %>
|
||
<span id=os_sub_select>
|
||
<% if @operatingsystem -%>
|
||
<% if @host.operatingsystem -%>
|
||
<%= render :partial => 'operatingsystem' %>
|
||
<% end -%>
|
||
</span>
|
app/views/hosts/_form.html.erb | ||
---|---|---|
<%= link_to_function "Additional Classes", toggle_div(:classlist) %>
|
||
<div id="classlist", style=display:none;>
|
||
<% if @environment -%>
|
||
<% if @host.environment -%>
|
||
<%= render 'puppetclasses/class_selection', :obj => @host %>
|
||
<% else -%>
|
||
<b>Please select an Environment first</b>
|
app/views/hosts/_operatingsystem.html.erb | ||
---|---|---|
<%= label :host, :media %>
|
||
<%= collection_select :host, :media_id, @operatingsystem.medias, :id, :to_label %>
|
||
<%= collection_select :host, :media_id, @host.operatingsystem.medias, :id, :to_label %>
|
||
<%= label :host, :ptable, "Partition Table" %>
|
||
<%= collection_select :host, :ptable_id, @operatingsystem.ptables, :id, :to_label %>
|
||
<%= collection_select :host, :ptable_id, @host.operatingsystem.ptables, :id, :to_label %>
|
app/views/hosts/_unattended.html.erb | ||
---|---|---|
<%= f.label :architecture %>
|
||
<%= f.collection_select :architecture_id, Architecture.all, :id, :to_label, :include_blank => true %>
|
||
<span id="host_os">
|
||
<% if @architecture -%>
|
||
<% if @host.architecture -%>
|
||
<%= render "architecture" -%>
|
||
<% end -%>
|
||
</span>
|
app/views/puppetclasses/_class_selection.html.erb | ||
---|---|---|
</td>
|
||
<%= render :partial => "puppetclasses/classes", :locals =>
|
||
{:puppetclasses => (obj.is_a?(Host) ? @environment.puppetclasses : Puppetclass.all) - obj.all_puppetclasses, :type => obj.class.to_s.downcase } %>
|
||
{:puppetclasses => (obj.is_a?(Host) ? @host.environment.puppetclasses : Puppetclass.all) - obj.all_puppetclasses, :type => obj.class.to_s.downcase } %>
|
||
</tr>
|
||
</table>
|
||
<% end -%>
|