[Cluster-devel] conga/luci cluster/form-macros cluster/index_h ...

rmccabe at sourceware.org rmccabe at sourceware.org
Wed Jul 19 20:20:55 UTC 2006


CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2006-07-19 20:20:53

Modified files:
	luci/cluster   : form-macros index_html 
	luci/homebase  : form-macros index_html 

Log message:
	cluster create, and cluster remove (stop managing) bits

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/index_html.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/form-macros.diff?cvsroot=cluster&r1=1.28&r2=1.29
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/index_html.diff?cvsroot=cluster&r1=1.12&r2=1.13

--- conga/luci/cluster/form-macros	2006/07/14 16:09:39	1.4
+++ conga/luci/cluster/form-macros	2006/07/19 20:20:53	1.5
@@ -68,17 +68,25 @@
   <div metal:define-macro="cluster-form">
    <h2>Cluster Form</h2>
   </div>
-  <div metal:define-macro="clusteradd-form">
+
+
+
+  <div metal:define-macro="clusteradd-form" style="margin-left: 1em">
 	<script type="text/javascript" src="/luci/homebase/homebase_common.js">
 	</script>
 	<script type="text/javascript" src="/luci/homebase/validate_cluster_add.js">
 	</script>
 
+	<tal:block tal:omit-tag=""
+		tal:define="global sessionObj python:request.SESSION.get('checkRet')" />
+
 	<form name="adminform" action="" method="post">
-		<input name="numStorage" id="numStorage" type="hidden" value="3" />
+		<input name="pagetype" id="pagetype" type="hidden" value="6" />
 
 		<h2>Add a Cluster</h2>
 
+		<tal:block tal:condition="python: not sessionObj or not 'requestResults' in sessionObj or not 'nodeList' in sessionObj['requestResults']">
+		<input name="numStorage" type="hidden" value="3" />
 		<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
 			<thead class="systemsTable">
 				<tr class="systemsTable"><td class="systemsTable" colspan="2">
@@ -136,6 +144,78 @@
 				</tr>
 			</tbody>
 		</table>
+		</tal:block>
+
+		<tal:block tal:condition="python: sessionObj and 'requestResults' in sessionObj and 'nodeList' in sessionObj['requestResults']">
+
+		<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+			<thead class="systemsTable">
+				<tr class="systemsTable"><td class="systemsTable" colspan="2">
+					<div class="systemsTableTop">
+						<strong>Cluster Name:</strong>
+						<input type="text" id="clusterName" name="clusterName" tal:attributes="value python: sessionObj['requestResults']['clusterName']" />
+					</div>
+				</td></tr>
+				<tr class="systemsTable">
+					<th class="systemsTable">Node Hostname</th>
+					<th class="systemsTable">Root Password</th>
+				</tr>
+			</thead>
+
+			<tfoot class="systemsTable">
+				<tr class="systemsTable"><td colspan="2" class="systemsTable">
+					<div>
+						<input type="checkbox" name="allSameCheckBox" id="allSameCheckBox" onClick="allPasswdsSame(adminform);"/> Check if cluster node passwords are identical.
+					</div>
+				</td></tr>
+				<tr class="systemsTable"><td class="systemsTable" colspan="2">
+					<div class="systemsTableEnd">
+						<input type="button" class="hbSubmit" value="Add Another Row" onClick="addSystem(adminform);" />
+					</div>
+				</td></tr>
+			</tfoot>
+
+			<span tal:omit-tag=""
+				tal:define="global sysNum python: 0"
+			/>
+
+			<tbody class="systemsTable">
+			<tal:block tal:repeat="node python: sessionObj['requestResults']['nodeList']">
+				<span tal:omit-tag=""
+					tal:define="global nodeAuth python: node['cur_auth']" />
+
+				<tr class="systemsTable">
+					<td class="systemsTable">
+						<input type="text"
+							tal:attributes="
+								id python: '__SYSTEM' + str(sysNum) + ':Addr';
+								name python: '__SYSTEM' + str(sysNum) + ':Addr';
+								value python: node['ricci_host'];
+								class python: 'hbInputSys' + ('errors' in node and ' error' or '')"
+						 />
+					</td>
+					<td class="systemsTable">
+						<input
+							onChange="pwd0Change(adminform);"
+							tal:attributes="
+								type python: nodeAuth and 'text' or 'password';
+								value python: nodeAuth and '[authenticated]' or '';
+								class python: 'hbInputPass' + ('errors' in node and ' error' or '');
+								id python: '__SYSTEM' + str(sysNum) + ':Passwd';
+								name python: '__SYSTEM' + str(sysNum) + ':Passwd';
+						/>
+					</td>
+				</tr>
+				<span tal:omit-tag=""
+					tal:define="global sysNum python: sysNum + 1"
+				/>
+			</tal:block>
+			</tbody>
+		</table>
+
+		<input type="hidden" name="numStorage"
+			tal:attributes="value python: sysNum" />
+		</tal:block>
 
 		<div class="hbSubmit" id="hbSubmit">
 			<input type="button" class="hbSubmit" name="Submit" value="Submit" onClick="validateForm(document.adminform);" />
@@ -259,7 +339,7 @@
 	</script>
 
 	<form name="adminform" action="" method="post">
-		<input name="numStorage" id="numStorage" type="hidden" value="1" />
+		<input name="numStorage" id="numStorage" type="hidden" value="0" />
 
 		<h2>Add a Node to a Cluster</h2>
 
--- conga/luci/cluster/index_html	2006/07/05 20:26:00	1.3
+++ conga/luci/cluster/index_html	2006/07/19 20:20:53	1.4
@@ -195,6 +195,33 @@
              <metal:main-form-content use-macro="here/form-chooser/macros/main-form">
                 <h1>Future Site of Forms</h1>
              </metal:main-form-content>
+
+		<span tal:omit-tag=""
+			tal:define="global 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']">
+					<li class="retmsgs" tal:content="python:e" />
+				</tal:block>
+			</ul>
+		</div>
+
+		<div id="errmsgsdiv" class="errmsgs" tal:condition="python:(ret and 'errors' in ret and len(ret['errors']))">
+			<div class="hbclosebox">
+				<a class="hbclosebox" href="javascript:hide_element('errmsgsdiv');"><img src="../homebase/x.png"></a>
+			</div>
+			<p class="errmsgs">The following errors occurred:</p>
+			<ul class="errmsgs">
+				<tal:block repeat="e python:ret['errors']">
+					<li class="errmsgs" tal:content="python:e" />
+				</tal:block>
+			</ul>
+		</div>
             </td>
             <tal:comment replace="nothing"> End of main content block </tal:comment>
 
--- conga/luci/homebase/form-macros	2006/07/18 19:25:20	1.28
+++ conga/luci/homebase/form-macros	2006/07/19 20:20:53	1.29
@@ -1,7 +1,7 @@
 <html>
 
 <tal:comment replace="nothing">
-	$Id: form-macros,v 1.28 2006/07/18 19:25:20 rmccabe Exp $
+	$Id: form-macros,v 1.29 2006/07/19 20:20:53 rmccabe Exp $
 </tal:comment>
 
 <head>
@@ -71,8 +71,6 @@
 
 		<input name="absoluteURL" type="hidden"
 			tal:attributes="value python:data['children'][data['curIndex']]['absolute_url']" />
-		<input name="baseURL" type="hidden"
-			tal:attributes="value python:data['children'][data['curIndex']]['base_url']" />
 
 		<div class="hbSubmit" tal:condition="python:userList" id="hbSubmit">
 			<input class="hbSubmit" name="Submit" type="button" value="Submit" onClick="validateForm(document.adminform);" />
@@ -135,8 +133,6 @@
 
 		<input name="absoluteURL" type="hidden"
 			tal:attributes="value python:data['children'][data['curIndex']]['absolute_url']" />
-		<input name="baseURL" type="hidden"
-			tal:attributes="value python:data['children'][data['curIndex']]['base_url']" />
 
 		<div class="hbSubmit" id="hbSubmit">
 			<input class="hbSubmit" name="Submit" type="button" value="Submit" onClick="validateForm(document.adminform);" />
@@ -431,9 +427,6 @@
 
 		<input name="absoluteURL" type="hidden"
 			tal:attributes="value python:data['children'][data['curIndex']]['absolute_url']" />
-		<input name="baseURL" type="hidden"
-			tal:attributes="value python:data['children'][data['curIndex']]['base_url']" />
-
 
 		<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
 			<thead class="systemsTable">
@@ -507,9 +500,6 @@
 		<input name="absoluteURL" type="hidden"
 			tal:attributes="value python:data['children'][data['curIndex']]['absolute_url']" />
 
-		<input name="baseURL" type="hidden"
-			tal:attributes="value python:data['children'][data['curIndex']]['base_url']" />
-
 		<h2 class="homebase">Add Cluster</h2>
 
 		<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
@@ -541,14 +531,6 @@
 
 			<tbody class="systemsTable">
 			<tal:block tal:repeat="node python: sessionObj['requestResults']['nodeList']">
-			
-				<span tal:omit-tag="" tal-condition="python: 'errors' in node"
-					tal:define="global nodeClassExt python: ' error'" />
-
-				<span tal:omit-tag=""
-					tal-condition="python: not 'errors' in node"
-					tal:define="global nodeClassExt python: ''" />
-
 				<span tal:omit-tag=""
 					tal:define="global nodeAuth python: node['cur_auth']" />	
 
@@ -559,7 +541,7 @@
 								id python: '__SYSTEM' + str(sysNum) + ':Addr';
 								name python: '__SYSTEM' + str(sysNum) + ':Addr';
 								value python: node['ricci_host'];
-								class python: 'hbInputSys' + nodeClassExt;
+								class python: 'hbInputSys' + ('errors' in node and ' error' or '');
 								disabled python: nodeAuth and 1 or 0"
 						 />
 					</td>
@@ -568,7 +550,7 @@
 							tal:attributes="
 								type python: nodeAuth and 'text' or 'password';
 								value python: nodeAuth and '[authenticated]' or '';
-								class python: 'hbInputPass' + nodeClassExt;
+								class python: 'hbInputPass' + ('errors' in node and ' error' or '');
 								id python: '__SYSTEM' + str(sysNum) + ':Passwd';
 								name python: '__SYSTEM' + str(sysNum) + ':Passwd';
 								disabled python: nodeAuth and 1 or 0"
@@ -617,9 +599,6 @@
 
 		<input name="absoluteURL" type="hidden"
 			tal:attributes="value python:data['children'][data['curIndex']]['absolute_url']" />
-		<input name="baseURL" type="hidden"
-			tal:attributes="value python:data['children'][data['curIndex']]['base_url']" />
-
 		<h2 class="homebase">Manage an Existing Cluster</h2>
 
 		<p class="hbText">Enter one node from the cluster you wish to add to the Luci management interface.</p>
--- conga/luci/homebase/index_html	2006/07/18 19:25:20	1.12
+++ conga/luci/homebase/index_html	2006/07/19 20:20:53	1.13
@@ -15,7 +15,7 @@
 					xml:lang language">
 
 <tal:comment replace="nothing">
-	$Id: index_html,v 1.12 2006/07/18 19:25:20 rmccabe Exp $
+	$Id: index_html,v 1.13 2006/07/19 20:20:53 rmccabe Exp $
 </tal:comment>
 
 <head metal:use-macro="here/header/macros/html_header">
@@ -64,7 +64,6 @@
 </head>
 
 
-
 <body tal:attributes="class here/getSectionFromURL;
 						dir python:test(isRTL, 'rtl', 'ltr')">
 	<div id="visual-portal-wrapper">




More information about the Cluster-devel mailing list