summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cobbler/webui/CobblerWeb.py54
-rw-r--r--setup.py2
-rw-r--r--webui_templates/profile_edit.tmpl (renamed from webui_templates/profile_add.tmpl)0
-rw-r--r--webui_templates/profile_list.tmpl8
-rw-r--r--webui_templates/system_list.tmpl2
5 files changed, 38 insertions, 28 deletions
diff --git a/cobbler/webui/CobblerWeb.py b/cobbler/webui/CobblerWeb.py
index 236ebcf..d6a38b2 100644
--- a/cobbler/webui/CobblerWeb.py
+++ b/cobbler/webui/CobblerWeb.py
@@ -98,12 +98,14 @@ class CobblerWeb(object):
# ------------------------------------------------------------------------ #
# Index
# ------------------------------------------------------------------------ #
+
def index(self):
return self.__render( 'index.tmpl', dict() )
# ------------------------------------------------------------------------ #
# Settings
# ------------------------------------------------------------------------ #
+
def settings_view(self):
self.__xmlrpc_setup()
return self.__render( 'item.tmpl', {
@@ -114,12 +116,13 @@ class CobblerWeb(object):
# ------------------------------------------------------------------------ #
# Distributions
# ------------------------------------------------------------------------ #
- def distro_view(self, distribution):
- self.__xmlrpc_setup()
- return self.__render( 'item.tmpl', {
- 'item_data': self.remote.get_distro(distribution,True),
- 'caption': "Distribution \"%s\" Details" % distribution
- } )
+
+ #def distro_view(self, distribution):
+ # self.__xmlrpc_setup()
+ # return self.__render( 'item.tmpl', {
+ # 'item_data': self.remote.get_distro(distribution,True),
+ # 'caption': "Distribution \"%s\" Details" % distribution
+ # } )
def distro_list(self):
self.__xmlrpc_setup()
@@ -145,12 +148,13 @@ class CobblerWeb(object):
'profiles': self.remote.get_profiles()
} )
- def system_view(self, name):
- self.__xmlrpc_setup()
- return self.__render( 'item.tmpl', {
- 'item_data': self.remote.get_system(name,True),
- 'caption': "Profile %s Settings" % name
- } )
+ # FIXME: this should use the same template as system_edit
+ #def system_view(self, name):
+ # self.__xmlrpc_setup()
+ # return self.__render( 'item.tmpl', {
+ # 'item_data': self.remote.get_system(name,True),
+ # 'caption': "Profile %s Settings" % name
+ # } )
def system_save(self, name=None, profile=None, new_or_edit=None, mac=None, ip=None, hostname=None, kopts=None, ksmeta=None, netboot='n', dhcp_tag=None, **args):
self.__xmlrpc_setup()
@@ -199,12 +203,7 @@ class CobblerWeb(object):
# FIXME: get the exact error message and display to the user.
log_exc()
return self.error_page("Error while saving system: %s" % str(e))
- return self.system_view( name=name )
-
-
- #def tb2str(self,tb):
- # print " ".join(traceback.format_list(traceback.extract_tb(tb)))
- # return ""
+ return self.system_edit( name=name )
def system_edit(self, name):
self.__xmlrpc_setup()
@@ -224,11 +223,20 @@ class CobblerWeb(object):
def profile_add(self):
self.__xmlrpc_setup()
- return self.__render( 'profile_add.tmpl', {
+ return self.__render( 'profile_edit.tmpl', {
+ 'distros': self.remote.get_distros(),
+ 'ksfiles': self.__ksfiles()
+ } )
+
+ def profile_edit(self, name):
+ self.__xmlrpc_setup()
+ return self.__render( 'profile_edit.tmpl', {
+ 'profile': self.remote.get_profile(name,True),
'distros': self.remote.get_distros(),
'ksfiles': self.__ksfiles()
} )
+
def profile_save(self):
pass
@@ -272,17 +280,17 @@ class CobblerWeb(object):
modes.exposed = False
error_page.exposed = False
distro_list.exposed = True
- distro_view.exposed = True
+ #distro_view.exposed = True
index.exposed = True
- profile_add.exposed = True
+ profile_edit.exposed = True
profile_list.exposed = True
profile_save.exposed = True
- settings_view.exposed = True
+ #settings_view.exposed = True
system_add.exposed = True
system_edit.exposed = True
system_list.exposed = True
system_save.exposed = True
- system_view.exposed = True
+ #system_view.exposed = True
ksfile_view.exposed = True
ksfile_list.exposed = True
diff --git a/setup.py b/setup.py
index 0e76cd8..814fb35 100644
--- a/setup.py
+++ b/setup.py
@@ -120,7 +120,7 @@ if __name__ == "__main__":
# slurp in whole directory?
(wwwtmpl, ['webui_templates/distro_list.tmpl']),
(wwwtmpl, ['webui_templates/profile_list.tmpl']),
- (wwwtmpl, ['webui_templates/profile_add.tmpl']),
+ (wwwtmpl, ['webui_templates/profile_edit.tmpl']),
(wwwtmpl, ['webui_templates/system_list.tmpl']),
(wwwtmpl, ['webui_templates/system_edit.tmpl']),
#(wwwtmpl, ['webui_templates/repo_list.tmpl']),
diff --git a/webui_templates/profile_add.tmpl b/webui_templates/profile_edit.tmpl
index 424e7d9..424e7d9 100644
--- a/webui_templates/profile_add.tmpl
+++ b/webui_templates/profile_edit.tmpl
diff --git a/webui_templates/profile_list.tmpl b/webui_templates/profile_list.tmpl
index 8699b40..09e3678 100644
--- a/webui_templates/profile_list.tmpl
+++ b/webui_templates/profile_list.tmpl
@@ -7,7 +7,7 @@
<tr>
<th class="text">Name</th>
<th class="text">Distribution</th>
- <th class="text">KS File</th>
+ <th class="text">Kickstart</th>
</tr>
</thead>
<tbody>
@@ -21,9 +21,11 @@
#set $evenodd += 1
<tr class="$tr_class">
- <td>$profile.name</td>
<td>
- <a href="$base_url/distro_view?distribution=$profile.distro">$profile.distro</a>
+ <a href="$base_url/profile_edit?name=$profile.name">$profile.name</a>
+ </td>
+ <td>
+ <a href="$base_url/distro_edit?name=$profile.distro">$profile.distro</a>
</td>
<td>$profile.kickstart</td>
</tr>
diff --git a/webui_templates/system_list.tmpl b/webui_templates/system_list.tmpl
index f637777..246ac6b 100644
--- a/webui_templates/system_list.tmpl
+++ b/webui_templates/system_list.tmpl
@@ -27,7 +27,7 @@
<a href="$base_url/system_edit?name=${system.name}">${system.name}</a>
</td>
<td>
- <a href="$base_url/profile_view?profile=${system.profile}">${system.profile}</a>
+ <a href="$base_url/profile_edit?name=${system.profile}">${system.profile}</a>
</td>
<td> ${system.mac_address} </td>
<td> ${system.ip_address} </td>