Revision b597e59e
Added by Michael Moll about 10 years ago
app/models/concerns/hostext/search.rb | ||
---|---|---|
|
||
if SETTINGS[:unattended]
|
||
scoped_search :in => :subnet, :on => :network, :complete_value => true, :rename => :subnet
|
||
scoped_search :in => :subnet, :on => :name, :complete_value => true, :rename => 'subnet.name'
|
||
scoped_search :in => :subnet, :on => :name, :complete_value => true, :rename => 'subnet.name'
|
||
scoped_search :on => :mac, :complete_value => true
|
||
scoped_search :on => :uuid, :complete_value => true
|
||
scoped_search :on => :build, :complete_value => {:true => true, :false => false}
|
||
... | ... | |
scoped_search :in => :operatingsystem, :on => :description, :complete_value => true, :rename => :os_description
|
||
scoped_search :in => :operatingsystem, :on => :major, :complete_value => true, :rename => :os_major
|
||
scoped_search :in => :operatingsystem, :on => :minor, :complete_value => true, :rename => :os_minor
|
||
scoped_search :in => :operatingsystem, :on => :id, :complete_value => false,:rename => :os_id, :complete_enabled => false
|
||
end
|
||
|
||
if SETTINGS[:login]
|
app/views/operatingsystems/index.html.erb | ||
---|---|---|
<% for operatingsystem in @operatingsystems %>
|
||
<tr>
|
||
<td><%= link_to_if_authorized(os_name(operatingsystem), hash_for_edit_operatingsystem_path(:id => operatingsystem.id).merge(:auth_object => operatingsystem, :authorizer => authorizer)) %></td>
|
||
<td class="ra"><%= link_to operatingsystem.hosts_count, hosts_path(:search => "os = #{operatingsystem.name}") %></td>
|
||
<td class="ra"><%= link_to operatingsystem.hosts_count, hosts_path(:search => "os_id = #{operatingsystem.id}") %></td>
|
||
<td class="ra">
|
||
<%= display_delete_if_authorized hash_for_operatingsystem_path(:id => operatingsystem).merge(:auth_object => operatingsystem, :authorizer => authorizer),
|
||
:confirm => _("Delete %s?") % operatingsystem.fullname %>
|
Also available in: Unified diff
fixes #4670: switch search to id on OS page