[Date Prev] [Date Next] | [Thread Prev] [Thread Next] | [Date Index] [Thread Index] |
Re: [snips-users] snipsweb filter function
|
> is there some docs on the filter function?? and what should i be using in > the file pattern section, i have tried *mis* , mis* , mis-* , but to no > avail, ( the machines are called mis-<hostname> ) > > am i also right in assuming that this is also a client-side action and > doesn't affect the views of other users?? Steve, The documentation on genweb-filter.cgi is lacking for me as well. I turned to the source. Genweb-filter will really only do the job of creating a suitable URL for genweb.cgi. If you can craft a suitable parameter list by hand, you will have a mechanism to create a coarse 'view' of SNIPs. The filepat parameter refers to the monitor (nsmon,hostmon, xxmon). I believe that you need the namepat parameter. Example: Info view: http://snipshost/genweb-cgi?view=Info Info view of all BGP sessions http://snipshost/genweb-cgi?view=Info&filepat=bgpmon Info view of all hosts named mis-<hostname> or <xxx>-server http://snipshost/genweb-cgi?view=Info&namepat=mis|server I would edit the cgi where a text field is created named 'filepat' around line 110, changing the 'file pattern' to 'monitor name pattern'. I would also add in the device name selector as well above or below. print "<p>device name pattern? \n", $query->textfield(-name=>'namepat', -default=>'', -size=>15, -maxlength=>20 ), "\n"; print "<p>monitor name pattern? \n", $query->textfield(-name=>'filepat', -default=>'', -size=>15, -maxlength=>20 ), "\n"; Now for anyone else in the list, I would like to turn this around and ask my own question. How does one create a menu that lists a view that requires multiple selectors.. e.g., select both a monitor and a device name spec? my %watchpat = ( 'namepat=otr|qtr|gtr|gigapop' => 'Northern Lights GigaPOP', 'filepat=nsmon|radiusmon' => 'Nameservice/Authentication', 'namepat=vpn' => 'VPN Service', 'namepat=ntc-ww|ATM\.' => 'WireWall Aggregators', 'filepat=hostmon' => 'Generic Host Monitoring' ); my @watchfields = keys %watchpat; in print_form(): print "<p>Canned filters \n", $query->popup_menu( -name=>'genpat', -values=> \ at watchfields , -labels=>\%watchpat, -size=>25, -default=>'' ), "\n"; I expect that I need to modify make_url() but don't know how to print the selector group properly. I suspect that a line that looks like &genpat=&namepat=this|that|theotherthing would work. Any suggestions for me? Tim Peiffer peiffer at umn edu |