From 3c5d9204a16a489c823712f278892592c75d97a6 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 11 Oct 2007 18:11:49 -0400 Subject: Work on making the NICs on the system page expandable/collapseable. Still need to write the onload function that sets things by default and wire up the links that do the expanding. Save code still also needs to be aware of the new variable names and also needs to know how to delete interfaces and not save "empty" interfaces. --- webui_templates/system_edit.tmpl | 205 +++++++++++++++++++++++++++++---------- webui_templates/system_list.tmpl | 12 +-- 2 files changed, 158 insertions(+), 59 deletions(-) (limited to 'webui_templates') diff --git a/webui_templates/system_edit.tmpl b/webui_templates/system_edit.tmpl index d3a763c..65310ae 100644 --- a/webui_templates/system_edit.tmpl +++ b/webui_templates/system_edit.tmpl @@ -3,7 +3,10 @@ #block body + +## +## determine a bit about what interfaces should be shown and which should not. +## + +#set $all_interfaces = [ "intf0", "intf1", "intf2", "intf3", "intf4", "intf5", "intf6", "intf7" ] +#if $system + #set $interfaces = $system.interfaces.keys() + #set $defined_interfaces = [] + #for $potential in $all_interfaces + #if $potential in $interfaces + #set $rc = $defined_interfaces.append($potential) + #end if + #end for +#else + #set $interfaces = [ "intf0", "intf1", "intf2", "intf3", "intf4", "intf5", "intf6", "intf7" ] + #set $defined_interfaces = [ "intf0" ] +#end if + +
@@ -95,50 +117,139 @@ function get_random_mac() - - - - - - - #if not $system - random - #end if -

Example: AA:BB:CC:DD:EE:FF

- - - - - - - - -

Optional. Example: 192.168.10.15

- - - - - - - - + +
diff --git a/webui_templates/system_list.tmpl b/webui_templates/system_list.tmpl index 246ac6b..e74f313 100644 --- a/webui_templates/system_list.tmpl +++ b/webui_templates/system_list.tmpl @@ -7,9 +7,9 @@ Name Profile - MAC - IP - Hostname + ## FIXME: how to handle for multiple interface listing? MAC + ## IP + ## Hostname @@ -29,9 +29,9 @@ ${system.profile} - ${system.mac_address} - ${system.ip_address} - ${system.hostname} + ## ${system.mac_address} + ## ${system.ip_address} + ## ${system.hostname} #end for -- cgit