[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga/luci/site/luci/Extensions cluster_adapte ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe sourceware org	2006-08-30 22:59:02

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

Log message:
	add a max_depth field for resources to allow for proper nesting of tags for the ui

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

--- conga/luci/site/luci/Extensions/cluster_adapters.py	2006/08/22 17:46:04	1.61
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2006/08/30 22:59:01	1.62
@@ -989,12 +989,6 @@
     rc_map['type'] = child.getResourceType()
 
   rc_map['indent_ctr'] = indent_ctr
-  indent_str = '_'
-  i = indent_ctr
-  while i>0:
-    indent_str += '__'
-    i -= 1
-  rc_map['indent_str'] = indent_str
     
   #Note: Final version needs all resource attrs
   rc_map['attrs'] = child.getAttributes()
@@ -1003,10 +997,12 @@
 
   resource_list.append(rc_map)
   kids = child.getChildren()
+  child_depth = 0
   for kid in kids:
-    recurse_resources(kid, resource_list, new_indent_ctr, child)
+    child_depth = recurse_resources(kid, resource_list, new_indent_ctr, child)
 
-  return
+  rc_map['max_depth'] = child_depth
+  return child_depth + 1
     
 def serviceStart(self, ricci_agent, req):
   rb = ricci_bridge(ricci_agent)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]