All of lore.kernel.org
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci cluster/index_html cluster/resource ...
Date: 30 Oct 2006 20:42:05 -0000	[thread overview]
Message-ID: <20061030204205.9243.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2006-10-30 20:42:04

Modified files:
	luci/cluster   : index_html resource-form-macros 
	luci/homebase  : form-macros index_html 
	luci/site/luci/Extensions: homebase_adapters.py 

Log message:
	- explicitly delete objects homebase uses from the zope session
	- 'repeat' -> 'tal:repeat' bug fix in index_html

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/index_html.diff?cvsroot=cluster&r1=1.21&r2=1.22
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource-form-macros.diff?cvsroot=cluster&r1=1.21&r2=1.22
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/form-macros.diff?cvsroot=cluster&r1=1.44&r2=1.45
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/index_html.diff?cvsroot=cluster&r1=1.18&r2=1.19
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/homebase_adapters.py.diff?cvsroot=cluster&r1=1.36&r2=1.37

--- conga/luci/cluster/index_html	2006/10/25 23:38:08	1.21
+++ conga/luci/cluster/index_html	2006/10/30 20:42:03	1.22
@@ -214,16 +214,14 @@
              <metal:main-form-content use-macro="here/form-chooser/macros/main-form">
              </metal:main-form-content>
 
-		<span tal:omit-tag=""
-			tal:define="global ret python: request.SESSION.get('checkRet')"
-		/>
-
+	<tal:block tal:condition="python: request.SESSION.has_key('checkRet')"
+		tal:define="ret python: request.SESSION.get('checkRet')">
 		<div class="retmsgs" id="retmsgsdiv" tal:condition="python:(ret and 'messages' in ret and len(ret['messages']))">
 			<div class="hbclosebox">
 				<a href="javascript:hide_element('retmsgsdiv');"><img src="../homebase/x.png"></a>
 			</div>
 			<ul class="retmsgs">
-				<tal:block repeat="e python:ret['messages']">
+				<tal:block tal:repeat="e python:ret['messages']">
 					<li class="retmsgs" tal:content="python:e" />
 				</tal:block>
 			</ul>
@@ -235,11 +233,12 @@
 			</div>
 			<p class="errmsgs">The following errors occurred:</p>
 			<ul class="errmsgs">
-				<tal:block repeat="e python:ret['errors']">
+				<tal:block tal:repeat="e python:ret['errors']">
 					<li class="errmsgs" tal:content="python:e" />
 				</tal:block>
 			</ul>
 		</div>
+	</tal:block>
                   </div>
 
                 </div>
--- conga/luci/cluster/resource-form-macros	2006/10/16 04:26:19	1.21
+++ conga/luci/cluster/resource-form-macros	2006/10/30 20:42:03	1.22
@@ -199,9 +199,8 @@
 		src="/luci/cluster/resource_form_handlers.js">
 	</script>
 
-	<tal:block
-		tal:define="
-			global res python: here.getResourceInfo(modelb, request);" />
+	<tal:block tal:define="
+		global res python: here.getResourceInfo(modelb, request);" />
 
 	<h2>Add a Resource</h2>
 
--- conga/luci/homebase/form-macros	2006/10/16 20:46:46	1.44
+++ conga/luci/homebase/form-macros	2006/10/30 20:42:03	1.45
@@ -1,7 +1,7 @@
 <html>
 
 <tal:comment tal:replace="nothing">
-	$Id: form-macros,v 1.44 2006/10/16 20:46:46 rmccabe Exp $
+	$Id: form-macros,v 1.45 2006/10/30 20:42:03 rmccabe Exp $
 </tal:comment>
 
 <head>
@@ -554,8 +554,13 @@
 		set_page_title('Luci ??? homebase ??? Add a running cluster to be managed by Luci');
 	</script>
 
+	<tal:block tal:condition="python: request.SESSION.has_key('checkRet')"
+		tal:define="global sessionObj python:request.SESSION.get('checkRet')" />
+
+	<tal:block tal:condition="python: not request.SESSION.has_key('checkRet')"
+		tal:define="global sessionObj python:{}" />
+
 	<tal:block tal:define="
-		global sessionObj python:request.SESSION.get('checkRet')" />
 
 	<h2 class="homebase">Add Cluster</h2>
 
--- conga/luci/homebase/index_html	2006/10/09 16:16:11	1.18
+++ conga/luci/homebase/index_html	2006/10/30 20:42:03	1.19
@@ -15,7 +15,7 @@
 					xml:lang language">
 
 <tal:comment replace="nothing">
-	$Id: index_html,v 1.18 2006/10/09 16:16:11 rmccabe Exp $
+	$Id: index_html,v 1.19 2006/10/30 20:42:03 rmccabe Exp $
 </tal:comment>
 
 <head metal:use-macro="here/header/macros/html_header">
@@ -133,16 +133,15 @@
 				Homebase
 			</metal:main_form>
 
-		<span tal:omit-tag=""
-			tal:define="global ret python: request.SESSION.get('checkRet')"
-		/>
+	<tal:block tal:condition="python: request.SESSION.has_key('checkRet')"
+		tal:define="ret python: request.SESSION.get('checkRet')">
 
 		<div class="retmsgs" id="retmsgsdiv" tal:condition="python:(ret and 'messages' in ret and len(ret['messages']))">
 			<div class="hbclosebox">
 				<a href="javascript:hide_element('retmsgsdiv');"><img src="x.png"></a>
 			</div>
 			<ul class="retmsgs">
-				<tal:block repeat="e python:ret['messages']">
+				<tal:block tal:repeat="e python:ret['messages']">
 					<li class="retmsgs" tal:content="python:e" />
 				</tal:block>
 			</ul>
@@ -154,11 +153,12 @@
 			</div>
 			<p class="errmsgs">The following errors occurred:</p>
 			<ul class="errmsgs">
-				<tal:block repeat="e python:ret['errors']">
+				<tal:block tal:repeat="e python:ret['errors']">
 					<li class="errmsgs" tal:content="python:e" />
 				</tal:block>
 			</ul>
 		</div>
+	</tal:block>
 
 
 				  </div>
--- conga/luci/site/luci/Extensions/homebase_adapters.py	2006/10/26 16:57:12	1.36
+++ conga/luci/site/luci/Extensions/homebase_adapters.py	2006/10/30 20:42:03	1.37
@@ -14,9 +14,6 @@
 from clusterOS import resolveOSType
 from conga_constants import *
 
-class InCluster(Exception):
-	pass
-
 def siteIsSetup(self):
 	try:
 		if os.path.isfile(CERTS_DIR_PATH + 'privkey.pem') and os.path.isfile(CERTS_DIR_PATH + 'cacert.pem'):
@@ -661,23 +658,20 @@
 	except:
 		sessionData = None
 
+	try:
+		request.SESSION.delete('checkRet')
+	except:
+		pass
+
 	if 'ACTUAL_URL' in request:
 		url = request['ACTUAL_URL']
 	else:
 		url = '.'
 
-	if 'pagetype' in request.form:
-		pagetype = int(request.form['pagetype'])
-	else:
-		try: request.SESSION.set('checkRet', {})
-		except: pass
-		return homebasePortal(self, request, '.', '0')
-
 	try:
+		pagetype = int(request.form['pagetype'])
 		validatorFn = formValidators[pagetype - 1]
 	except:
-		try: request.SESSION.set('checkRet', {})
-		except: pass
 		return homebasePortal(self, request, '.', '0')
 
 	if validatorFn == validateAddClusterInitial or validatorFn == validateAddCluster:
@@ -705,7 +699,7 @@
 		return homebaseControlPost(self, request)
 
 	try:
-		request.SESSION.set('checkRet', {})
+		request.SESSION.delete('checkRet')
 	except:
 		pass
 



                 reply	other threads:[~2006-10-30 20:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061030204205.9243.qmail@sourceware.org \
    --to=rmccabe@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.