Thanks for the patch, a few questions first off...
Do you mean it "doesn't work", or just that it doesn't page the output
(I agree, the search results could get /very/ long, which is not useful)?
I agree with the latter.
I always the get following exception:
File "_usr_share_cobbler_webui_templates_distro_list_tmpl.py", line 92, in
body
File "/usr/lib64/python2.3/site-packages/Cheetah/Template.py", line 1530, in
_handleCheetahInclude
self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
File "_usr_share_cobbler_webui_templates_paginate_tmpl.py", line 86, in
respond
NotFound: cannot find 'pages'
> Attached is a prototype that adds also paging to the webui
search for
> the distro's.
>
> What it does:
>
> - All paging is done in remote API
>
> - Remote API Find method will include paging functionality.
>
> - WebUI list also uses the remote API find function with empty criteria
>
> - WebUI search will only show the criteria builder, the search will be
> done by the list page
>
> - Add a $pageinfo$ item to the find results list. This contains the
> paging information about the returned list. This item needs to be
> stripped by the WUI/TUI
>
> Possible improvements:
>
> - For securitie save search criteria dictionary in a cache instead of
> passing them as string on the http request. Benefit is that saving
> search criteria to disk can also be implemented
>
Can you explain why you think this is a a security issue, are you
worried about the search criteria being logged? If so, they could be
passed as POST data. I'm also a bit unclear
about what you might have in mind for saved searches. (the URLs would
definitely allow that).
Anyway, if you can submit your patches using "git-format-patch" I can be
sure I can apply them. Yours were generated with diff and can't be
applied, for instance, there is some noise:
Etc...
If you can resubmit those I can look at testing this later this week.
I have thought a little more about saving the searches. When you create a search an text
box can be added to store the key=value pairs in a collection with a name. Later this name
can be retrieved to get the key=value pairs from the collection e.g. from a dropdown box
in the distro list. This dropdown box allows quick filtering based on the saved searches.
Also the CLI can use the save filter by adding a --filter option to the find action:
cobbler distro find --filter=AllRH
cobbler system find --filter=LabA
The security issue is that you have to encode/decode the criteria in the URL, e.g. to
escape the & in the criteria value
Hope this explains what I had in mind with the save searches.
I'll improve my patch a resubmit it.
Regards,
Peter
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It
may contain proprietary material, confidential information and/or be subject to legal
privilege. It should not be copied, disclosed to, retained or used by, any other party. If
you are not an intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.