diff options
author | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-09-12 19:08:35 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-09-12 19:08:35 -0400 |
commit | ca35374f0faa564514c937430ee7deb1a3ffc01a (patch) | |
tree | 1b8582b064234a447352290e20a03feba2fc392e | |
parent | dc9bdafbb989b2eedf5f62e933ba163ed614739f (diff) | |
download | third_party-cobbler-ca35374f0faa564514c937430ee7deb1a3ffc01a.tar.gz third_party-cobbler-ca35374f0faa564514c937430ee7deb1a3ffc01a.tar.xz third_party-cobbler-ca35374f0faa564514c937430ee7deb1a3ffc01a.zip |
Checking in other modifications to templates, setup files, etc.
-rw-r--r-- | cobbler/webui/CobblerWeb.py | 35 | ||||
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | webui_templates/distro_edit.tmpl | 3 | ||||
-rw-r--r-- | webui_templates/distro_list.tmpl | 2 | ||||
-rw-r--r-- | webui_templates/index.tmpl | 7 | ||||
-rw-r--r-- | webui_templates/master.tmpl | 11 |
6 files changed, 50 insertions, 10 deletions
diff --git a/cobbler/webui/CobblerWeb.py b/cobbler/webui/CobblerWeb.py index d6a38b2..6bbb47b 100644 --- a/cobbler/webui/CobblerWeb.py +++ b/cobbler/webui/CobblerWeb.py @@ -129,12 +129,25 @@ class CobblerWeb(object): return self.__render( 'distro_list.tmpl', { 'distros': self.remote.get_distros() } ) + + + def distro_edit(self, name): + self.__xmlrpc_setup() + return self.__render( 'distro_edit.tmpl', { + 'distro': self.remote.get_distro(name,True), + } ) + + # FIXME: implement distro_save + def distro_save(self): + pass + # ------------------------------------------------------------------------ # # Systems # ------------------------------------------------------------------------ # # if the system list is huge, this will probably need to use an # iterator so the list doesn't get copied around + def system_list(self): self.__xmlrpc_setup() return self.__render( 'system_list.tmpl', { @@ -236,7 +249,7 @@ class CobblerWeb(object): 'ksfiles': self.__ksfiles() } ) - + # FIXME: implement this function def profile_save(self): pass @@ -254,6 +267,8 @@ class CobblerWeb(object): 'ksfile': ksfile } ) + # FIXME: modify to detect per-system kickstart files (seldom used feature) also + def __ksfiles(self): self.__xmlrpc_setup() ksfiles = [] @@ -263,12 +278,15 @@ class CobblerWeb(object): ksfiles.append( ksfile ) return ksfiles + # FIXME: implement backend feature for modifying kickstart files in text box + def __ksfile_data(self, ksfile): pass # ------------------------------------------------------------------------ # # Miscellaneous # ------------------------------------------------------------------------ # + def error_page(self, message): return self.__render( 'error_page.tmpl', { 'message': message @@ -277,22 +295,31 @@ class CobblerWeb(object): # make CherryPy and related frameworks able to use this module easily # by borrowing the 'exposed' function attritbute standard and using # it for the modes() method + modes.exposed = False error_page.exposed = False + index.exposed = True + + distro_edit.exposed = True distro_list.exposed = True + distro_save.exposed = True #distro_view.exposed = True - index.exposed = True + profile_edit.exposed = True profile_list.exposed = True profile_save.exposed = True - #settings_view.exposed = True - system_add.exposed = True + #profile_view.exposed = True + system_edit.exposed = True system_list.exposed = True system_save.exposed = True #system_view.exposed = True + + settings_view.exposed = True ksfile_view.exposed = True ksfile_list.exposed = True class CobblerWebAuthException(exceptions.Exception): pass + + @@ -118,7 +118,9 @@ if __name__ == "__main__": # Web UI templates for object viewing & modification # FIXME: other templates to add as they are created. # slurp in whole directory? + (wwwtmpl, ['webui_templates/distro_list.tmpl']), + (wwwtmpl, ['webui_templates/distro_edit.tmpl']), (wwwtmpl, ['webui_templates/profile_list.tmpl']), (wwwtmpl, ['webui_templates/profile_edit.tmpl']), (wwwtmpl, ['webui_templates/system_list.tmpl']), diff --git a/webui_templates/distro_edit.tmpl b/webui_templates/distro_edit.tmpl index 6957157..2c32e3e 100644 --- a/webui_templates/distro_edit.tmpl +++ b/webui_templates/distro_edit.tmpl @@ -32,7 +32,7 @@ <label for="kopts">Kernel Options</label> <input type="text" size="32" style="width: 150px;" name="kopts" id="kopts" #if $distro - value="$distro.kopts" + value="$distro.kernel_options" #end if /> <br/> @@ -51,6 +51,7 @@ value="$distro.breed" #end if /> + <br/> <input type="submit" name="submit" value="Save"/> <input type="reset" name="reset" value="Reset"/> diff --git a/webui_templates/distro_list.tmpl b/webui_templates/distro_list.tmpl index 4654972..d408202 100644 --- a/webui_templates/distro_list.tmpl +++ b/webui_templates/distro_list.tmpl @@ -23,7 +23,7 @@ <tr class="$tr_class"> <td> - <a href="$base_url/distro_view?distribution=$distro.name">$distro.name</a> + <a href="$base_url/distro_edit?name=$distro.name">$distro.name</a> </td> <td>$distro.breed</td> <td>$distro.arch</td> diff --git a/webui_templates/index.tmpl b/webui_templates/index.tmpl index b249f32..ec471ed 100644 --- a/webui_templates/index.tmpl +++ b/webui_templates/index.tmpl @@ -2,7 +2,12 @@ #block body -This is my empty index page. +Welcome to <A HREF="http://cobbler.et.redhat.com">Cobbler</A>. + +<br/> +<br/> + +Main screen turn on. #end block body diff --git a/webui_templates/master.tmpl b/webui_templates/master.tmpl index 5517d9c..84197e3 100644 --- a/webui_templates/master.tmpl +++ b/webui_templates/master.tmpl @@ -35,10 +35,15 @@ <li><a href="$base_url/profile_list" class="menu">List Profiles</a></li> <li><a href="$base_url/distro_list" class="menu">List Distros</a></li> <li><a href="$base_url/system_list" class="menu">List Systems</a></li> - <li><a href="$base_url/ksfile_list" class="menu">List KS Files</a></li> + <li><a href="$base_url/ksfile_list" class="menu">List Kickstarts</a></li> + <li>List Repos</li> <li><hr/></li> - <li><a href="$base_url/system_add" class="menu">Add System</a></li> - <li><a href="$base_url/profile_add" class="menu">Add Profile</a></li> + <li><a href="$base_url/distro_edit" class="menu">Add Distro</a></li> + <li><a href="$base_url/profile_edit" class="menu">Add Profile</a></li> + <li><a href="$base_url/system_edit" class="menu">Add System</a></li> + <li>Add Repo</li> + <li><hr/></li> + <li>Sync</li> </ul> </div> |