summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-11-20 13:33:29 -0500
committerMichael DeHaan <mdehaan@redhat.com>2008-11-20 13:33:29 -0500
commit8d8e84201a07a197ff035f405d24940775e86153 (patch)
tree1295bf171fb805ba397ea734ba87610bb09f12d2
parentff1ceabf551e6bdf9b84bd1c8dcfd45d53456965 (diff)
downloadcobbler-8d8e84201a07a197ff035f405d24940775e86153.tar.gz
cobbler-8d8e84201a07a197ff035f405d24940775e86153.tar.xz
cobbler-8d8e84201a07a197ff035f405d24940775e86153.zip
Ongoing changes to make the webapp conform with network field changes
-rw-r--r--cobbler/collection.py2
-rw-r--r--cobbler/webui/CobblerWeb.py6
-rw-r--r--webui_content/style.css5
-rw-r--r--webui_templates/profile_edit.tmpl5
-rw-r--r--webui_templates/system_edit.tmpl17
5 files changed, 17 insertions, 18 deletions
diff --git a/cobbler/collection.py b/cobbler/collection.py
index 31a9e17a..224b6863 100644
--- a/cobbler/collection.py
+++ b/cobbler/collection.py
@@ -325,7 +325,7 @@ class Collection(serializable.Serializable):
# it's ok to conflict with your own net info.
if not self.api.settings().allow_duplicate_hostnames and input_dns is not None and input_dns != "":
- match_hosts = self.api.find_system(dns_name=input_host,return_list=True)
+ match_hosts = self.api.find_system(dns_name=input_dns,return_list=True)
for x in match_mac:
if x.name != ref.name:
diff --git a/cobbler/webui/CobblerWeb.py b/cobbler/webui/CobblerWeb.py
index 8bd929a3..82e50567 100644
--- a/cobbler/webui/CobblerWeb.py
+++ b/cobbler/webui/CobblerWeb.py
@@ -334,7 +334,7 @@ class CobblerWeb(object):
virtpath=None,virtram=None,virttype=None,virtcpus=None,virtfilesize=None,
name_servers=None,
power_type=None, power_user=None, power_pass=None, power_id=None, power_address=None,
- delete1=None, delete2=None, **args):
+ gateway=None,hostname=None,delete1=None, delete2=None, **args):
if not self.__xmlrpc_setup():
@@ -414,7 +414,9 @@ class CobblerWeb(object):
if name_servers:
self.remote.modify_system(system, 'name_servers', name_servers, self.token)
if gateway:
- self.remote.modify_systems(system, 'gateway', gateway, self.token)
+ self.remote.modify_system(system, 'gateway', gateway, self.token)
+ if hostname:
+ self.remote.modify_system(system, 'hostname', hostname, self.token)
interfaces = args.get("interface_list","")
interfaces = interfaces.split(",")
diff --git a/webui_content/style.css b/webui_content/style.css
index 33aba615..6d9f8cc4 100644
--- a/webui_content/style.css
+++ b/webui_content/style.css
@@ -67,11 +67,6 @@ ul#nav li a {
text-decoration: none;
}
-ul#nav li#active a, ul#nav li#active a:link, ul#nav li#active a:visited { */
- list-style-image: url('/cobbler/webui/current-page.png');
- color: white;
-}
-
ul#navaction {
margin-left: 1em;
padding-left: 0;
diff --git a/webui_templates/profile_edit.tmpl b/webui_templates/profile_edit.tmpl
index 1e614183..86194c8f 100644
--- a/webui_templates/profile_edit.tmpl
+++ b/webui_templates/profile_edit.tmpl
@@ -245,10 +245,11 @@ function disablename(value)
</td>
<td>
#if $profile
- <input type="text" name="name_servers" id="name_servers" value="$profile.name_servers">
+ #set joined = " ".join($profile.name_servers)
+ <input type="text" name="name_servers" id="name_servers" value="$joined">
#else
<input type="text" name="name_servers" id="name_servers" value="">
- #end
+ #end if
<p class="context-tip">Name servers, space delimited, if not provided by DHCP</p>
</td>
</tr>
diff --git a/webui_templates/system_edit.tmpl b/webui_templates/system_edit.tmpl
index 42eb3911..d79c9c04 100644
--- a/webui_templates/system_edit.tmpl
+++ b/webui_templates/system_edit.tmpl
@@ -46,10 +46,9 @@ function intf_update_visibility()
{
is_slave=document.getElementById("bonding_is_slave").checked
is_master=document.getElementById("bonding_is_master").checked
- is_static=document.getElementById("static_true").checked
intf_enable_field("static",!is_slave)
- intf_enable_field("ipaddress",(!is_slave) && is_static)
+ intf_enable_field("ipaddress",(!is_slave))
intf_enable_field("subnet",(!is_slave) && is_static)
intf_enable_field("dns_name",!is_slave)
intf_enable_field("static_routes",!is_slave)
@@ -270,7 +269,8 @@ function build_interface_table()
interface_table['$iname']["ipaddress"] = "$system.interfaces[$iname]['ip_address']"
interface_table['$iname']["subnet"] = "$system.interfaces[$iname]['subnet']"
interface_table['$iname']["dns_name"] = "$system.interfaces[$iname]['dns_name']"
- interface_table['$iname']["static_routes"] = "$system.interfaces[$iname]['static_routes']"
+ #set joined = " ".join($system.interfaces[$iname]['static_routes'])
+ interface_table['$iname']["static_routes"] = "$joined"
interface_table['$iname']["dhcptag"] = "$system.interfaces[$iname]['dhcp_tag']"
interface_table['$iname']["virtbridge"] = "$system.interfaces[$iname]['virt_bridge']"
interface_table['$iname']["present"] = "1"
@@ -547,7 +547,7 @@ function page_onload() {
<input type="text" size="64" style="width: 150px;" name="hostname" id="hostname" value="$system.hostname" />
#else
<input type="text" size="64" style="width: 150px;" name="hostname" id="hostname" />
- #end
+ #end if
<p class="context-tip">Ex: "vanhalen.example.org". Used for /etc/sysconfig/network.</p>
</td>
</tr>
@@ -561,7 +561,7 @@ function page_onload() {
<input type="text" size="64" style="width: 150px;" name="gateway" id="gateway" />
#else
<input type="text" size="64" style="width: 150px;" name="gateway" id="gateway" value="$system.gateway" />
- #end
+ #end if
<p class="context-tip">Ex: "192.168.1.11". For use with static IP configs.</p>
</td>
</tr>
@@ -573,10 +573,11 @@ function page_onload() {
</td>
<td class="netedit">
#if $system
- <input type="text" name="name_servers" id="name_servers" value="$system.name_servers">
+ #set joined = " ".join($profile.name_servers)
+ <input type="text" name="name_servers" id="name_servers" value="$joined">
#else
<input type="text" name="name_servers" id="name_servers" value="<<inherit>>">
- #end
+ #end if
<p class="context-tip">Name servers, space delimited, if not provided by DHCP</p>
</td>
</tr>
@@ -904,7 +905,7 @@ function page_onload() {
<td class="nicedit">
<label for="static_routes">Static Routes</label>
</td>
- <td class="static_routes">
+ <td class="nicedit">
<input type="text" size="128" style="width: 150px;" name="static_routes" id="static_routes" />
<p class="context-tip">optional list of ipaddress:netmask:gateway, space delimited</p>
</td>