diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2008-05-09 13:11:07 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2008-05-09 13:11:07 -0400 |
commit | 34fc9d39389ed2a949b0efbeea246f30a10c0265 (patch) | |
tree | 0f2a8226077c9c34b68e873dff984976003c52b4 | |
parent | f4a1f5f2f62b5b75a0a327056ea9f34e72e7a50f (diff) | |
download | third_party-cobbler-34fc9d39389ed2a949b0efbeea246f30a10c0265.tar.gz third_party-cobbler-34fc9d39389ed2a949b0efbeea246f30a10c0265.tar.xz third_party-cobbler-34fc9d39389ed2a949b0efbeea246f30a10c0265.zip |
Added some additional links for kickstart viewing/editing to the profile/system web pages
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | cobbler/action_reposync.py | 2 | ||||
-rw-r--r-- | cobbler/item_profile.py | 2 | ||||
-rw-r--r-- | cobbler/kickgen.py | 5 | ||||
-rw-r--r-- | webui_templates/profile_list.tmpl | 19 | ||||
-rw-r--r-- | webui_templates/system_list.tmpl | 24 |
6 files changed, 46 insertions, 7 deletions
@@ -40,6 +40,7 @@ Cobbler CHANGELOG - cobbler replicate command - added cobbler repo option --mirror-locally to reference external repos without mirroring - all virt parameters on profiles can now be overriden on cobbler profile objects +- added some additional links for kickstart viewing/editing to the web page - ??? - 0.8.3 - Make createrepo get run for local cobbler reposync invocations as needed diff --git a/cobbler/action_reposync.py b/cobbler/action_reposync.py index 33bfe30..d6b30bc 100644 --- a/cobbler/action_reposync.py +++ b/cobbler/action_reposync.py @@ -254,7 +254,7 @@ class RepoSync: if repo.mirror_locally: line = "baseurl=http://${server}/cobbler/repo_mirror/%s\n" % (repo.name) else: - line = "baseurl=%s" % (repo.mirror) + line = "baseurl=%s\n" % (repo.mirror) config_file.write(line) # user may have options specific to certain yum plugins diff --git a/cobbler/item_profile.py b/cobbler/item_profile.py index 019f01a..c5c9bdb 100644 --- a/cobbler/item_profile.py +++ b/cobbler/item_profile.py @@ -162,7 +162,7 @@ class Profile(item.Item): return utils.set_virt_ram(self,num) def set_virt_type(self,vtype): - return utils.set_virt_Type(self,vtype) + return utils.set_virt_type(self,vtype) def set_virt_bridge(self,vbridge): self.virt_bridge = vbridge diff --git a/cobbler/kickgen.py b/cobbler/kickgen.py index a9bc095..ba8bfd2 100644 --- a/cobbler/kickgen.py +++ b/cobbler/kickgen.py @@ -170,7 +170,10 @@ class KickGen: if line.find("ks_mirror") != -1: ret = True if line.find("baseurl") != -1: - first, baseurl = line.split("=") + try: + first, baseurl = line.split("=",1) + except: + raise CX(_("error scanning repo: %s" % filename)) fd.close() return (ret, baseurl) diff --git a/webui_templates/profile_list.tmpl b/webui_templates/profile_list.tmpl index f213775..fefe753 100644 --- a/webui_templates/profile_list.tmpl +++ b/webui_templates/profile_list.tmpl @@ -38,7 +38,24 @@ <a href="$base_url?mode=profile_edit&name=$profile.parent">$profile.parent</A> #end if </td> - <td>$profile.kickstart</td> + <td> + #if $profile.kickstart and $profile.kickstart !="" + #set $kick = $profile.kickstart + #if $kick.startswith("http://") or $kick.startswith("ftp://") or $kick.startswith("nfs://") + #if not $kick.startswith("nfs://") + <A HREF="$kick">$kick</A> + #else + $kick + #end if + #else + #set $name = $profile.name + <A HREF="/cblr/svc/op/ks/profile/$name">(view rendered)</A> + #if $kick != "" and $kick != "<<inherit>>": + <A HREF="$base_url?mode=ksfile_edit&name=$kick">(edit template)</A> + #end if + #end if + #end if + </td> </tr> #end for </tbody> diff --git a/webui_templates/system_list.tmpl b/webui_templates/system_list.tmpl index 5c70ffc..6ab5fac 100644 --- a/webui_templates/system_list.tmpl +++ b/webui_templates/system_list.tmpl @@ -14,9 +14,7 @@ <tr> <th class="text">Name</th> <th class="text">Profile</th> - ## FIXME: how to handle for multiple interface listing? <th class="text">MAC</th> - ## <th class="text">IP</th> - ## <th class="text">Hostname</th> + <th class="text">Kickstart</th> </tr> </thead> <tbody> @@ -39,7 +37,27 @@ ## <td> ${system.mac_address} </td> ## <td> ${system.ip_address} </td> ## <td> ${system.hostname} </td> + + <td> + #set $kick = $system.kickstart + #if $kick.startswith("http://") or $kick.startswith("ftp://") or $kick.startswith("nfs://") + #if not $kick.startswith("nfs://") + <A HREF="$kick">$kick</A> + #else + $kick + #end if + #else + #set $name = $system.name + #set $pname = $system.profile + <A HREF="/cblr/svc/op/ks/system/$name">(view rendered)</A> + #if $kick != "<<inherit>>" and $kick != "" + <A HREF="$base_url?mode=ksfile_edit&name=$kick">(edit template)</A> + #end if + #end if + </td> </tr> + + #end for </tbody> </table> |