Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #34 from tjikkun/develop

FIX suggestion of ip when subnet id is not the same as array index
  • Loading branch information...
commit dfcfbae1979f4874073d2e3db3486d7051d0fe3b 2 parents 96ede45 + ba30302
@ohadlevy ohadlevy authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 public/javascripts/host_edit.js
View
4 public/javascripts/host_edit.js
@@ -123,9 +123,9 @@ function subnet_selected(element){
if (subnet_id == '' || $('#host_ip').size() == 0) return false;
// We do not query the proxy if the host_ip field is filled in and contains an
// IP that is in the selected subnet
- var drop_text = $(element).text().split("\n")[subnet_id]
+ var drop_text = $(element).children(":selected").text();
if (drop_text.length !=0 && drop_text.search(/^.+ \([0-9\.\/]+\)/) != -1) {
- var details = $(element).text().split("\n")[subnet_id].replace(/^[^(]+\(/, "").replace(")","").split("/");
+ var details = drop_text.replace(/^[^(]+\(/, "").replace(")","").split("/");
if (subnet_contains(details[0], details[1], $('#host_ip').val()))
return false;
}
Please sign in to comment.
Something went wrong with that request. Please try again.