Feature #168
Autocomplete URL Filter on New Auto-Discovery Rule Form
Start date:
07/10/2010
Due date:
% Done:
100%
Description
Auto-completion should be added to the new rule form in order to populate the URL filter for the user.
History
#1 Updated by Luke Murphey over 14 years ago
- Status changed from New to In Progress
#2 Updated by Luke Murphey over 14 years ago
Below is code to set the URL filter. Needs to be modified to:
- Not throw an exception when the URL is invalid
- Do not replace the domain filter if it is not empty
- Set a filter of * if multiple domains exist
function getDomain (thestring) { //simple function that matches the beginning of a URL //in a string and then returns the domain. var urlpattern = new RegExp("(http|ftp|https)://(.*?)(/.*)?$"); var parsedurl = thestring.match(urlpattern); if( parsedurl && parsedurl.length >= 2){ return parsedurl[2]; } else{ return null; } } $("input[name=Domain]").focus( function() { urls = cp1.getCode(); url = urls.split("\n")[0]; url = getDomain(url); $("input[name=Domain]").val("*" + url + "*"); });
#3 Updated by Luke Murphey over 14 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
Implemented in r530.