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.
On Mon, 4 May 2009 16:27:50 +0200, "Vreman, Peter - Acision" peter.vreman@acision.com 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
I have a couple of problems with this:
1. You're using get_field_info() in item_system.py, I'd like to see that changed to get_fields() (as I'm using in distros/profiles for the generic edit stuff), as well as having the data there be restructured to match what I have done. The remote.py/api.py code should be updated accordingly.
2. The code for the genlist() view is way too system specific. That needs to be generalized more.
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
I have a couple of problems with this:
- You're using get_field_info() in item_system.py, I'd like to see that
changed to get_fields() (as I'm using in distros/profiles for the generic edit stuff), as well as having the data there be restructured to match what I have done. The remote.py/api.py code should be updated accordingly.
- The code for the genlist() view is way too system specific. That needs
to be generalized more.
I'm working the prototype code to use the get_fields() and remove the last bits of hardcoded "system" values.
I have already most of the item_system.get_fields() conversion done (base on the code from item_profile)
Hope to have this finished in the next hours.
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.
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
cobbler-devel@lists.fedorahosted.org