Vreman, Peter - Acision wrote:
> Thanks for all the patches, Peter. I have applied all I could
except the
> filter one, which I explained why below. I'm definitely interested in
> search upgrades, but am not sure we want a "filter" object.
> I'm not saying that's final, it's just that I first would have to see
> what some email/text demo of what a filter object would look like and
> how some one would use it. Most likely I would like to see simpler
> ways of implementing saved search, even if it's something that simply
> saves them in a datastructure and not using the cobbler object system,
> that would be ok... perhaps even Bookmarklets?
>
> All of these are applied to the devel branch when I say "Applied". If
> there are any fixes to the 1.6.2 search (i.e for bugs, those go against
> master).
>
Thanks for applying the patches.
The commit 4e155e67b6cc5c8b756f0df59b21c9e14c400b67 (>
0009-rename-with-same-name-does-nothing-instead-of-deleti.patch) is a bug fix that should
also be in master.
Cherry-picked, thanks for the heads up!
> 0004-filter-objects-added.patch.gz
>
> Not applied. In my previous email, I indicated we strongly didn't want
> to introduce the concept of a new cobbler "noun" for something like
> saved search results. A better way to do this would be to just have a
> way to save search parameters in the settings file and let them show up
> on the search page, perhaps as hyperlinks. We want to reserve cobbler
> "nouns" for data that cobbler is trying to model. The main reason for
> all this is that new object types require a tremendous amount of code
> (that we eventually want to clean up), and we want to keep things as
> simple as possible.
>
To show you what my goal was to create I have attached two screenshots of the patch. The
saved filters will allow quick filtering using a dropdown box on the list screen.
The filter object is a hash with the following keys:
- name
- what (distro/system/profile/...)
- keys hash
- (not implemented yet) matching type ALL or ANY
I still used the cobbler "noun" in this patch because that part was already
finished and working. Refactoring of the "noun" to a custom array of hashes can
be done. But how shall the serialization to disk be implemented if the "noun"
part can't be reused?
Peter
I see and very much like where you are going from a user perspective.
I guess I was hesistant to have to explain what a "filter" object was
and maintain the code involved. Perhaps I'm wrong though.
What we could do is have something in settings:
search_filters:
- "labA" : { "what" : "systems" }, { "keys"
: "..." }
- "labB" : { ... }
Though this would require adding them to settings yourself, rather than
making them editable in the web application. Perhaps my reasoning is
not correct and it is worth it to have these, I don't know.
What would the command line invocation look like?
cobbler filter add --name=LabA --what=system --keys="network=LabA"
??
If we had the following, I could see it being useful:
cobbler report --what=systems --matches-filter=LabA
--fields=name,mac_address,ip_address
(Keep in mind there is some weirdness about "cobbler report" being
implemented differently than "cobbler system report" ... cleaning this
up would also be desirable).
You are correct in that coming up with a seperate system of saving
things is extra work. I guess what I'm trying to avoid is maintaining a
lot of seperate pages in the web app for editing different things, CLI
options, and everything else that comes with a new noun.
I like the concept of having the object model having very few
primatives, but I'm not neccessarily stuck on it.
Thoughts?
It seems like the "Quick Filter" thing is really the same as a saved
search, right? (Or does this allow filtering search results further?
If so, very cool!)
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.
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________
cobbler-devel mailing list
cobbler-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler-devel