Skip to contentSkip to conversation

conga/luci cluster/form-macros homebase/luci_h ...

Cluster-devel [email protected] 1 participant 1 message Aug 15, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-08-15 22:27:05

Modified files:
luci/cluster : form-macros
luci/homebase : luci_homebase.css

Log message:
more cluster properties config stuff

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.43&r2=1.44
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/luci_homebase.css.diff?cvsroot=cluster&r1=1.13&r2=1.14

luci/cluster/form-macros +138 -44
@@ -314,7 +314,7 @@
 			<a tal:attributes="
 				href python: request['URL'] + '?pagetype=' + request['pagetype'] + '&clustername=' + request['clustername'] + '&tab=4';
 				class python: 'configTab' + (configTabNum == 4 and ' configTabActive' or '');
-			">Qurorum Partition</a>
+			">Quorum Partition</a>
 		</li>
 	</ul>
 
@@ -411,18 +411,32 @@
 			<tbody class="systemsTable">
 				<tr class="systemsTable">
 					<td class="systemsTable">
-						<input type="radio" name="mcast" value="False" checked="" tal:attributes="checked python:clusterinfo['is_mcast'] == 'False'"/><strong>Let cluster choose the multicast address</strong>
+						<input type="radio" name="mcast" value="False"
+							onchecked="javascript:document.getElementById('mcast_address').disabled=true;"
+							tal:attributes="checked python:clusterinfo['is_mcast'] != 'True'"
+						/>
+						Let cluster choose the multicast address
 					</td>
 				</tr>
+
 				<tr class="systemsTable">
 					<td class="systemsTable">
-						<input type="radio" name="mcast" value="True"/><strong>I prefer to choose the multicast address</strong>
+						<input type="radio" name="mcast" value="True"
+							onchecked="javascript:document.getElementById('mcast_address').disabled=false;"
+							tal:attributes="checked python:clusterinfo['is_mcast'] == 'True'"
+						
+						/>
+						Specify the multicast address manually
 					</td>
 				</tr>
 
 				<tr class="systemsTable">
 					<td class="systemsTable" colspan="2">
-						<input type="text" name="mcast_address" value="" tal:attributes="value clusterinfo/mcast_addr"/>
+						<input type="text" name="mcast_address" id="mcast_address"
+							tal:attributes="
+								disabled python: clusterinfo['is_mcast'] != 'True' and '1' or '0';
+								value clusterinfo/mcast_addr"
+						/>
 					</td>
 				</tr>
 			</tbody>
@@ -440,6 +454,7 @@
 
 	<div id="configTabContent" tal:condition="python: configTabNum == 4">
 		<form name="quorum_partition" action="" method="get" tal:attributes="action clusterinfo/quorumd_url">
+		<div class="configTabContent">
 		<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
 			<thead class="systemsTable"> 
 				<tr class="systemsTable"><td class="systemsTable" colspan="1">
@@ -451,48 +466,82 @@
 
 			<tbody class="systemsTable">
 				<tr class="systemsTable"><td class="systemsTable">
-					<input type="radio" name="quorumd" value="False" checked="" tal:attributes="checked python:clusterinfo['is_quorumd'] == 'False'"/>
-					<strong>Do not use a Quorum Partition</strong>
+					<input type="radio" name="quorumd" value="False" checked="" tal:attributes="checked python:clusterinfo['is_quorumd'] != 'True'"/>
+					Do not use a Quorum Partition
 				</td></tr>
 
 				<tr class="systemsTable"><td class="systemsTable">
 					<input type="radio" name="quorumd" value="True"/>
-						<strong>I prefer to use a Quorum Partition</strong>
-				</td></tr>
-
-				<tr class="systemsTable"><td class="systemsTable" colspan="2">
-					Interval: <input type="text" name="interval" value="" tal:attributes="value clusterinfo/interval"/>
-				</td></tr>
-
-				<tr class="systemsTable"><td class="systemsTable" colspan="2">
-					Votes: <input type="text" name="votes" value="" tal:attributes="value clusterinfo/votes"/>
-				</td></tr>
-
-				<tr class="systemsTable"><td class="systemsTable" colspan="2">
-					TKO: <input type="text" name="tko" value="" tal:attributes="value clusterinfo/tko"/>
-				</td></tr>
-
-				<tr class="systemsTable"><td class="systemsTable" colspan="2">
-					Minimum Score: <input type="text" name="min_score" value="" tal:attributes="value clusterinfo/min_score"/>
+						Use a Quorum Partition
 				</td></tr>
+			</tbody>
+		</table>
+		</div>
 
-				<tr class="systemsTable"><td class="systemsTable" colspan="2">
-					Device: <input type="text" name="device" value="" tal:attributes="value clusterinfo/device"/>
-				</td></tr>
+		<div class="spacing configTabContent"></div>
 
-				<tr class="systemsTable"><td class="systemsTable" colspan="2">
-					Label: <input type="text" name="label" value="" tal:attributes="value clusterinfo/label"/>
-				</td></tr>
-			</tbody>
+		<div id="quorumdisk" class="configTabContent">
+		<div class="configTabContent">
+		<table name="qdiskprefs" class="systemsTable">
+			<tr class="systemsTable">
+				<td class="systemsTable">Interval</td>
+				<td class="systemsTable">
+					<input type="text" name="interval" value=""
+						tal:attributes="value clusterinfo/interval"/>
+				</td>
+			</tr>
+
+			<tr class="systemsTable">
+				<td class="systemsTable">Votes</td>
+				<td class="systemsTable">
+					<input type="text" name="votes" value=""
+						tal:attributes="value clusterinfo/votes"/>
+				</td>
+			</tr>
+
+			<tr class="systemsTable">
+				<td class="systemsTable">TKO</td>
+				<td class="systemsTable">
+					<input type="text" name="tko" value=""
+						tal:attributes="value clusterinfo/tko"/>
+				</td>
+			</tr>
+
+			<tr class="systemsTable">
+				<td class="systemsTable">Minimum Score</td>
+				<td class="systemsTable">
+					<input type="text" name="min_score" value=""
+						tal:attributes="value clusterinfo/min_score"/>
+				</td>
+			</tr>
+
+			<tr class="systemsTable">
+				<td class="systemsTable">Device</td>
+				<td class="systemsTable">
+					<input type="text" name="device" value=""
+						tal:attributes="value clusterinfo/device"/>
+				</td>
+			</tr>
+
+			<tr class="systemsTable">
+				<td class="systemsTable">Label</td>
+				<td class="systemsTable">
+					<input type="text" name="label" value=""
+						tal:attributes="value clusterinfo/label"/>
+				</td>
+			</tr>
 		</table>
+		</div>
 
-		<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+		<div class="configTabContent">
+		<table name="qdiskheur" class="systemsTable">
 			<thead class="systemsTable"> 
 				<tr class="systemsTable"><td class="systemsTable" colspan="1">
 					<div class="systemsTableTop">
 						<strong>Heuristics</strong>
 					</div>
 				</td></tr>
+
 				<tr class="systemsTable">
 					<th class="systemsTable">
 						<div class="systemsTableTop">Name</div>
@@ -511,31 +560,76 @@
 
 			<tbody class="systemsTable"
 				tal:define="global heuristics clusterinfo/hlist">
-	
-				<tr class="systemsTable" tal:repeat="heuristic heuristics">
+
+				<tal:block tal:condition="python: not len(heuristics)">
+				<input type="hidden" name="num_heuristics" id="num_heuristics" value="0">
+				<tr class="systemsTable">
 					<td class="systemsTable">
-						<input type="text" name="hname" value="" tal:attributes="value heuristic/hname"/>
+						<input class="qdname qdisk" type="text" name="heuristic0:hname" value="">
 					</td>
 					<td class="systemsTable">
-						<input type="text" name="hinterval" value="" tal:attributes="value heuristic/hinterval"/>
+						<input class="qdpath qdisk" type="text" name="heuristic0:hprog" value="">
 					</td>
-					<td class="systemsTable" colspan="2">
-						<input type="text" name="hprog" value="" tal:attributes="value heuristic/hprog"/>
+					<td class="systemsTable">
+						<input class="qdint qdisk" type="text" name="heuristic0:hinterval" value="">
 					</td>
 					<td class="systemsTable">
-						<input type="text" name="hscore" value="" tal:attributes="value heuristic/hscore"/>
+						<input class="qdscore qdisk" type="text" name="heuristic0:hscore" value="">
 					</td>
 				</tr>
-			</tbody>
+				</tal:block>
 
-			<tfoot class="systemsTable">
-				<tr class="systemsTable"><td class="systemsTable" colspan="2">
-					<div class="systemsTableEnd">
-						<input type="submit" value="Apply"/>
-					</div>
+				<tal:block
+					tal:condition="python: len(heuristics)"
+					tal:define="global curHeur python: -1">
+
+				<input type="hidden" name="num_heuristics" id="num_heuristics"
+					tal:attributes="value python: len(heuristics)" />
+
+				<tr class="systemsTable"
+					tal:repeat="heuristic heuristics"
+					tal:define="global curHeur python: curHeur + 1">
+
+					<td class="systemsTable">
+						<input class="qdname qdisk" type="text"
+							tal:attributes="
+								value heuristic/hname;
+								name python: 'heuristic' + str(curHeur) + ':hname';"/>
+					</td>
+					<td class="systemsTable">
+						<input class="qdpath qdisk" type="text"
+							tal:attributes="
+								value heuristic/hprog;
+								name python: 'heuristic' + str(curHeur) + ':hprog';"/>
+					</td>
+					<td class="systemsTable">
+						<input class="qdint qdisk" type="text"
+							tal:attributes="
+								value heuristic/hinterval;
+								name python: 'heuristic' + str(curHeur) + ':hinterval';"/>
+					</td>
+					<td class="systemsTable">
+						<input class="qdscore qdisk" type="text"
+							tal:attributes="
+								value heuristic/hscore;
+								name python: 'heuristic' + str(curHeur) + ':hscore';"/>
+					</td>
+				</tr>
+				</tal:block>
+			</tbody>
+			<tfoot>
+				<tr class="systemsTable"><td class="systemsTable">
+					<input class="addrow" type="button" value="Add another heuristic">
 				</td></tr>
 			</tfoot>
 		</table>
+		</div>
+		</div>
+
+		<div class="spacing configTabContent"></div>
+		<div class="hbSubmit spacing configTabContent">
+			<input class="hbSubmit" type="submit" value="Apply">
+		</div>
 		</form>
 	</div>
 </div>
luci/homebase/luci_homebase.css +42 -19

86 lines not on this page · raw message