[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cobbler
Subject:    [PATCH] to fix ticket #349
From:       mdehaan () redhat ! com (Michael DeHaan)
Date:       2009-01-26 23:13:03
Message-ID: 497E437F.1010100 () redhat ! com
[Download RAW message or body]

Dylan Swift wrote:
> Hello All,
>
> Thanks to all for providing us with Cobbler - I have only been using
> it a few days and I have managed to save myself several hours work by
> using it to perform bios updates to IBM blades. So in order to do my
> bit, here is a patch that I believe will fix a ticket I have raised on
> trac:
>
>
> When editing images the page always reports 'image type' iso,
> regardless of the type specified in the image definition in
> /var/lib/cobbler/config/images.d/<image_definition_file>
>
> I'm not familiar with Python or Cheetah, so I may be undoing something
> that serves a genuine purpose, but it appears that two additional
> lines have been added to the template file
> /usr/share/cobbler/webui_templates/image_edit.tmpl in an if statement
> where the image_type is checked (around line #337). It looks like it
> has been added for a reason, but I can't quite work out why! It may be
> obvious to someone, but as I say I'm new to cobbler and
> python/cheetah.
>
> So, I propose the following patch to fix this behaviour
>
>
> --- /usr/share/cobbler/webui_templates/image_edit.tmpl.orig
> 2009-01-26 21:01:01.000000000 +0000
> +++ /usr/share/cobbler/webui_templates/image_edit.tmpl  2009-01-26
> 21:01:27.000000000 +0000
> @@ -329,22 +329,20 @@
>      <td>
>      <label for="imagetype">Image Type</label>
>      </td>
>      <td>
>
>      <select name="imagetype" id="imagetype">
>      #for $it in [ "direct", "iso", "memdisk", "virt-clone" ]:
>            <option value="$it"
>                 #if $image and $image.image_type == $it
>                      selected="1"
> -               #else if $it == "iso"
> -                    selected="1"
>                 #end if
>            >$it</option>
>      #end for
>      </select>
>
>      <p class="context-tip">What type of OS?</p>
>      </td>
>      </tr>
>
>
> Regards
>
> Dylan
> _______________________________________________
> cobbler mailing list
> cobbler at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/cobbler
>   

This looks like (busted) code to make sure one type is always selected 
if none is selected. (Sometimes the web app doesn't get as much love as 
the CLI, so it takes a while for new things to be perfect with it). 
Anyway, your patch is fine, as it forces someone to choose a type rather 
than accept the default.

Applied to both master and devel branches, thanks!

--Michael


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic