Skip to contentSkip to conversation

conga/luci/site/luci/Extensions cluster_adapte ...

Cluster-devel [email protected] 1 participant 1 message Aug 10, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: jparsons at sourceware.org 2006-08-10 16:50:41

Modified files:
luci/site/luci/Extensions: cluster_adapters.py

Log message:
Added parent hash field for form urls

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.37&r2=1.38

luci/site/luci/Extensions/cluster_adapters.py +4 -2
@@ -971,12 +971,14 @@
 
   return map
 
-def recurse_resources(child, resource_list, indent_ctr):
+def recurse_resources(child, resource_list, indent_ctr, parent=None):
   #First, add the incoming child as a resource
   #Next, check for children of it
   #Call yourself on every children
   #then return
   rc_map = {}
+  if parent != None:
+    rc_map['parent'] = parent
   rc_map['resource_name'] = child.getName()
   if child.isRefObject() == True:
     rc_map['ref_object'] = True
@@ -995,7 +997,7 @@
   resource_list.append(rc_map)
   kids = child.getChildren()
   for kid in kids:
-    recurse_resources(kid, resource_list, new_indent_ctr)
+    recurse_resources(kid, resource_list, new_indent_ctr, child)
 
   return