From mboxrd@z Thu Jan 1 00:00:00 1970 From: jparsons@sourceware.org Date: 10 Aug 2006 16:50:41 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions cluster_adapte ... Message-ID: <20060810165041.20650.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: 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 --- conga/luci/site/luci/Extensions/cluster_adapters.py 2006/08/10 14:16:43 1.37 +++ conga/luci/site/luci/Extensions/cluster_adapters.py 2006/08/10 16:50:40 1.38 @@ -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