Skip to contentSkip to conversation

conga/luci homebase/form-macros site/luci/Exte ...

Cluster-devel [email protected] 1 participant 1 message Oct 13, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-10-13 17:04:11

Modified files:
luci/homebase : form-macros luci/site/luci/Extensions: homebase_adapters.py ricci_bridge.py

Log message:

	fix for bz #209997

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/form-macros.diff?cvsroot=cluster&r1=1.39&r2=1.40
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/homebase_adapters.py.diff?cvsroot=cluster&r1=1.29&r2=1.30
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_bridge.py.diff?cvsroot=cluster&r1=1.26&r2=1.27

luci/homebase/form-macros +18 -10
@@ -1,7 +1,7 @@
 <html>
 
 <tal:comment replace="nothing">
-	$Id: form-macros,v 1.39 2006/10/09 16:16:11 rmccabe Exp $
+	$Id: form-macros,v 1.40 2006/10/13 17:04:09 rmccabe Exp $
 </tal:comment>
 
 <head>
@@ -482,19 +482,19 @@
 		set_page_title('Luci ??? homebase ??? Add a running cluster to be managed by Luci');
 	</script>
 
-	<tal:block tal:omit-tag=""
-		tal:define="global sessionObj python:request.SESSION.get('checkRet')" />
+	<tal:block tal:define="
+		global sessionObj python:request.SESSION.get('checkRet')" />
 
-	<form name="adminform" action="" method="post">
+	<h2 class="homebase">Add Cluster</h2>
+
+	<form name="adminform" action="" method="post"
+		tal:condition="python: sessionObj and len(sessionObj)">
 		<input name="pagetype" type="hidden"
 			tal:attributes="value request/form/pagetype | request/pagetype | nothing" />
 
-
 		<input name="absoluteURL" type="hidden"
 			tal:attributes="value python:data['children'][data['curIndex']]['absolute_url']" />
 
-		<h2 class="homebase">Add Cluster</h2>
-
 		<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
 			<thead class="systemsTable">
 				<tr class="systemsTable"><td class="systemsTable" colspan="2">
@@ -511,10 +511,11 @@
 
 			<tfoot class="systemsTable">
 				<tr class="systemsTable"><td colspan="2" class="systemsTable">
-					<div tal:condition="python: not sessionObj['requestResults']['isComplete']">
+					<div tal:condition="python: not 'isComplete' in sessionObj['requestResults'] or not sessionObj['requestResults']['isComplete']">
 						<input type="checkbox" name="allSameCheckBox" id="allSameCheckBox" onClick="allPasswdsSame(adminform);"/> Check if storage system passwords are identical.
 					</div>
-					<div class="systemsTable" tal:condition="python: sessionObj['requestResults']['isComplete']">&nbsp;</div>
+					<div class="systemsTable"
+						tal:condition="python: 'isComplete' in sessionObj['requestResults'] and sessionObj['requestResults']['isComplete']">&nbsp;</div>
 				</td></tr>
 			</tfoot>
 
@@ -522,7 +523,7 @@
 				tal:define="global sysNum python: 0"
 			/>
 
-			<tbody class="systemsTable">
+			<tbody class="systemsTable" tal:condition="python: 'nodeList' in sessionObj['requestResults']">
 			<tal:block tal:repeat="node python: sessionObj['requestResults']['nodeList']">
 				<span tal:omit-tag=""
 					tal:define="global nodeAuth python: node['cur_auth']" />
@@ -564,6 +565,13 @@
 			<input type="button" name="Submit" value="Add This Cluster" onClick="validateForm(document.adminform);" />
 		</div>
 	</form>
+
+	<div tal:condition="python: not sessionObj or not len(sessionObj)">
+		<span class="error">
+			A data integrity error has occurred. Please attempt to add this cluster to the Luci management interface again.
+		</span>
+		<tal:block tal:define="nop python:here.abortManageCluster(request)" />
+	</div>
 </div>
 
 
luci/site/luci/Extensions/homebase_adapters.py +39 -11

83 lines not on this page · raw message

luci/site/luci/Extensions/ricci_bridge.py +0 -1
@@ -13,7 +13,6 @@
   def __init__(self, hostname, port=11111):
     self.__hostname = hostname
     self.__port = port
-    return
     
     
   def process(self, xml_out):