Skip to content

Commit 719bae2

Browse files
portertechLennart Koopmann
authored and
Lennart Koopmann
committed
use select to add host to hostgroup
1 parent 1314db1 commit 719bae2

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

app/views/hostgroups/show.html.erb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@
66

77
<% form_for :new_host, :url => { :controller => "hostgrouphosts", :action => 'create' } do |f| -%>
88
<%= label_tag 'hostname' %>:
9-
<%= f.text_field :hostname %>
9+
<%= f.select :hostname, Host.all.collect {|host| [h(host.host)]} %>
1010
<%= hidden_field_tag 'new_host[hostgroup_id]', @hostgroup.id %>
1111
<%= submit_tag "Add host to group" %>
1212
<% end %>
1313
<br />
1414

15-
<script type="text/javascript">
16-
var data = "<%= @hosts.map { |h| h.is_a?(Hostgroup) ? h(h.name) : h(h.host) }.join ',' %> ".split(",");
17-
$("#new_host_hostname").autocomplete(data);
18-
</script>
19-
2015
<% if @last_message.blank? %>
2116
No messages or hosts in this hostgroup.
2217
<% else %>

0 commit comments

Comments
 (0)