From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 30 Aug 2006 22:59:02 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions cluster_adapte ... Message-ID: <20060830225902.7542.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Changes by: rmccabe at 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)