Hi Mike, I will fix the trackback.
I had originally written this for v1.0.3 and in that version if the system is not found it will open a page to add the new system. This was main reason for writing this, as I did not want to duplicate systems. As you mentioned, this is not a true search. May work on that as well. --joe Joseph Boyer Jr. Liquidnet Holdings, Inc. E [email protected] T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Michael DeHaan Sent: Monday, January 26, 2009 2:42 PM To: cobbler mailing list Subject: Re: PATCH: paginate.tmpl Joseph Boyer Jr. wrote: > > Folks, > > > > I have a many systems in my cobbler environment, over 500 as of now, > and it became a real pain to sift through the dozen pages of so > looking for a particular machine. Thus, I have added a search field > and number of items to display field to the default paginate.tmpl > file. I find it useful and though other that use the webUI may as well. > > > > Cheers, > > joe > > > > Joseph Boyer Jr.* * > *Liquidnet Holdings, Inc. * > > *E** *[email protected] <mailto:[email protected]> > *T* +1 646.660.8352 > > *C* +1 646.284.8394 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > cobbler mailing list > [email protected] > https://fedorahosted.org/mailman/listinfo/cobbler > I applied this to devel to try it out as a "search", I'm seeing a traceback .... MOD_PYTHON ERROR ProcessId: 23323 Interpreter: 'localhost.localdomain' ServerName: 'localhost.localdomain' DocumentRoot: '/var/www/html' URI: '/cobbler/web/' Location: None Directory: '/var/www/cobbler/web/' Filename: '/var/www/cobbler/web/' PathInfo: '' Phase: 'PythonHandler' Handler: 'index' Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent) File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg) File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg) File "/var/www/cobbler/web/index.py", line 130, in handler content = func( **form ) File "/usr/lib/python2.5/site-packages/cobbler/webui/CobblerWeb.py", line 463, in system_edit 'profiles': self.remote.get_profiles() File "/usr/lib/python2.5/site-packages/cobbler/webui/CobblerWeb.py", line 102, in __render return str(tmpl) File "/usr/lib/python2.5/site-packages/Cheetah/Template.py", line 982, in __str__ def __str__(self): return getattr(self, mainMethName)() File "/usr/lib/python2.5/site-packages/cobbler/webui/master.py", line 247, in respond self.body(trans=trans) File "_usr_share_cobbler_webui_templates_system_edit_tmpl.py", line 550, in body NotFound: cannot find 'name' while searching for 'system.name' MODULE CACHE DETAILS Accessed: Mon Jan 26 14:35:21 2009 Generation: 0 _mp_43be29589f5d909275df7d4c30cbcdd3 { FileName: '/var/www/cobbler/web/index.py' Instance: 1 [IMPORT] Generation: 1 Modified: Mon Jan 26 14:32:46 2009 Imported: Mon Jan 26 14:35:21 2009 } I had 1000 systems in the list, named autotest-0 through autotest-1000 (generated by tests/performance.py). What I typed in was "10", not "autotest-10". From the code I see, I take it what you want to do is not really "search", but rather a "open the page specifically for this system named ____", in which case it's not a search, is it? I can see both being valuable. This is still good. If you can add some error handling that detects the page not found error a little better and perhaps rename "Search" to something like "System Name:" (I can't think of anything better but there HAS to be a word for it), I'll apply this. Ideally we'd also get search going in the XMLRPC and make it a lot smarter, at which point we can come up with a new search page on top of this and still leave this in. Thanks! --Michael _______________________________________________ cobbler mailing list [email protected] https://fedorahosted.org/mailman/listinfo/cobbler _______________________________________________ cobbler mailing list [email protected] https://fedorahosted.org/mailman/listinfo/cobbler
