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

[Cluster-devel] conga/luci cluster/index_html cluster/resource ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe 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
 


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