Vreman, Peter - Acision wrote:
> How about a method on each object that returns a list:
>
> def get_web_elements_format
>
> return
>
> [
> fieldname,
> fieldtype (text, select, etc)
> fieldwidth,
> tooltip,
> ],
> [],
> [..]
>
> We'd also need to do something clever to populate the fields... though
> that would make dual maintaince of the CLI and templates mostly go away.
>
> For 2.0 (i.e. not now) we could also add a method that adds the CLI
> options for any command, moving the code out of the CLI modules just a
> bit... though I think folks have much less
> problem adding things to those so it's less important.
>
> Right now CobblerWeb is just kind of weird.
>
I think we can make it better common with the CLI reporting feature.
Def get_field_info()
[fieldname]
[fieldheader]
[fieldtype]
[width] { in characters }
[tooltip]
Score.
Add "default value" too.
What's "field header"?
I think the web app could just list them in order and the CLI would sort
the keys.
Technically, just to make sure we are on the same page:
get_field_info()
return {
"kernel_options" : {
"field_type" : "dict",
"width" : 255,
"tooltip" : "kernel options, space delimited"
}
"foo" : ...
}
I think that would be just about perfect.
--Michael
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.
_______________________________________________
cobbler-devel mailing list
cobbler-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler-devel