Vreman, Peter - Acision wrote:
The attached patch adds the basic framework for a generic list in the webui.
The generic list also supports fields (e.g. ip_address) of the interfaces in the list.
As a prototype of only the systems listing is supported at cobbler_web/system/genlist
Todo’s:
Load the columns to list from the settings file
Merge the get_field_info with the get_fields from the generic
editing James is working on
- Replace the original list with the new genlist to make
sorting/filtering work
Comments are welcome if this is in the right direction,
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.
cobbler-devel mailing list cobbler-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler-devel
So far this looks great ... some comments.
As we talked about on IRC, I think we need to rename "example" to "tooltip", or better "description" to make it go along more with what that field is. I also want to extend this to work with the CLI and will take a crack at that later. Imagine not having to add fields to either the webapp or CLI ever again ... wow. (For the CLI, this probably means adding a new field for the name of the setter, or at least a function like remote_methods called local_methods that returns the same... probably that ... I'll do that part and that should allow for getting rid of a fair amount of code right there).
I would prefix fields that only work for the web application and not CLI with "web_" so it's clear, and also in item.py document the structure and also make that return exceptions.NotImplementedError.
General personal perference, if the templates can not be all run together on one line, that would make them easier to read too -- it's less important to me that the resultant HTML is easier to read.
Good stuff!
--Michael