Feature #360
listing the hosts with a specific class
| Status: | New | Start: | 07/28/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | % Done: | 100% |
||
| Category: | Web Interface | |||
| Target version: | 0.1-6 | |||
| Branch: |
Description
In the edit page of a specific puppetclass it would be nice to see which hosts are using it.
The implementation of this is in my github's foreman fork repository.
http://github.com/gustavosoares/foreman/commit/8524b064fbe7cd10cc45112f7fcc055fca04ad02
A printscreen of the result has been attached.
History
Updated by Ohad Levy about 1 month ago
- Category set to Web Interface
- Assigned to set to Gustavo Soares
- Target version set to 0.1-6
thats nice :) can you refactor it so it uses the normal host list? (instead of copy paste almost the same code?)
Updated by Gustavo Soares about 1 month ago
Ohad Levy wrote:
thats nice :) can you refactor it so it uses the normal host list? (instead of copy paste almost the same code?)
I have tried, but I am getting the following error:
ActionView::TemplateError (undefined method `hosts_controller?' for #<ActionView::Base:0x2b81609bcfc8>) on line #17 of app/views/hosts/_minilist.html.erb:
14: <% hosts.each do |host| -%>
15: <tr class="<%= cycle("even", "odd") -%>">
16: <td>
17: <%= check_box_tag "host_ids[]", host.id, selected?(host), :class => 'host_select_boxes', :onClick => 'insertHostVal(this)' if hosts_controller? -%>
18: <%=name_column(host) >
19: </td>
20: <td><=h host.try(:os) %></td>
Updated by Gustavo Soares about 1 month ago
Gustavo Soares wrote:
Ohad Levy wrote:
thats nice :) can you refactor it so it uses the normal host list? (instead of copy paste almost the same code?)
I have tried, but I am getting the following error:
ActionView::TemplateError (undefined method `hosts_controller?' for #<ActionView::Base:0x2b81609bcfc8>) on line #17 of app/views/hosts/_minilist.html.erb: 14: <% hosts.each do |host| -%> 15: <tr class="<%= cycle("even", "odd") -%>"> 16: <td> 17: <%= check_box_tag "host_ids[]", host.id, selected?(host), :class => 'host_select_boxes', :onClick => 'insertHostVal(this)' if hosts_controller? -%> 18: <%=name_column(host) %> 19: </td> 20: <td><%=h host.try(:os) %></td>
sorry about that... the hosts_helper was missing :))
Updated by Gustavo Soares about 1 month ago
- % Done changed from 0 to 60
see if it is ok now...
http://github.com/gustavosoares/foreman/commit/0659c728886341b737c2bc52aa85a64d8356c7c8
Updated by Gustavo Soares about 1 month ago
- % Done changed from 60 to 100
done.
Ohad, if you think it is ok now, please you may close this issue.
Thanks in advance,
Gus
Updated by Ohad Levy about 1 month ago
Gustavo Soares wrote:
done.
Ohad, if you think it is ok now, please you may close this issue.
Thanks in advance, Gus
Hi Gus, Sorry for the late response.. moving a country.
can you please squash it? (so it would appear as one commit against the current develop branch).
thanks,
Ohad
