cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] conga/luci/cluster fence_device.js form-macros
@ 2007-01-05 23:26 rmccabe
  0 siblings, 0 replies; 4+ messages in thread
From: rmccabe @ 2007-01-05 23:26 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2007-01-05 23:26:11

Modified files:
	luci/cluster   : fence_device.js form-macros 

Log message:
	per-node fencing updates (related to bz212021)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence_device.js.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.140&r2=1.141

--- conga/luci/cluster/fence_device.js	2006/12/01 14:56:53	1.2
+++ conga/luci/cluster/fence_device.js	2007/01/05 23:26:11	1.3
@@ -1,3 +1,14 @@
+function del_fence_instance(fi_div_id) {
+	delete_element_id(fi_div_id);
+}
+
+function del_fence(fence_id) {
+	delete_element_id(fence_id);
+}
+
+function add_fence_instance(fi_cont_id) {
+}
+
 function swap_fence_div(container_id, element_id) {
 	var container_element = document.getElementById(container_id);
 	if (!container_element) {
@@ -25,14 +36,12 @@
 
 	var fence_id = fence_opt.value;
 	var child_element = document.getElementById(fence_id);
-	if (container_element.firstChild)
-		container_element.removeChild(container_element.firstChild);
-
 	if (!child_element)
 		return (-1);
+	if (container_element.firstChild)
+		container_element.removeChild(container_element.firstChild);
 
 	var target = child_element.cloneNode(1);
-	target.id = null;
 
 	var fence_type = fence_id;
 	if (fence_opt.className.match(/shared_fencedev/)) {
@@ -46,10 +55,40 @@
 		}	
 	}
 
+	var target_form = document.createElement('form');
+	target_form.name = container_element.id;
+	target_form.appendChild(target);
+	container_element.appendChild(target_form);
+
 	var fi_form = document.getElementById(fence_type + '_instance');
-	if (fi_form)
-		target.appendChild(fi_form.cloneNode(1));
-	container_element.appendChild(target);
+	if (fi_form) {
+		var idiv = document.createElement('div');
+		idiv.id = container_id + '_instances';
+		idiv.name = idiv.id;
+
+		var cloned_iform = fi_form.cloneNode(1);
+		cloned_iform.id = container_id + '_0';
+		cloned_iform.name = cloned_iform.id;
+		cloned_iform.className = '';
+
+		var form_elem = document.createElement('form');
+		form_elem.name = cloned_iform.id;
+		form_elem.appendChild(cloned_iform);
+
+		idiv.appendChild(form_elem);
+		container_element.appendChild(idiv);
+	}
+
+	var remove_div = document.createElement('div');
+	remove_div.className = 'hbSubmit';
+	var remove_button = document.createElement('input');
+	remove_button.setAttribute('type', 'button');
+	remove_button.setAttribute('value', 'Remove this fence device');
+	remove_button.setAttribute('onclick', "del_fence('" + container_element.id + "');");
+	var remove_form = document.createElement('form');
+	remove_form.appendChild(remove_button);
+	remove_div.appendChild(remove_form);
+	container_element.appendChild(remove_div);
 }
 
 var num_fences_level = Array(0, 0)
@@ -67,7 +106,7 @@
 	var div_elem = document.createElement('div');
 	if (!div_elem)
 		return (-1);
-	var level_num_fences = num_fences_level[fence_level];
+	var level_num_fences = num_fences_level[fence_level - 1];
 
 	div_elem.id = 'fence' + fence_level + '_' + level_num_fences;
 	chooser_elem = chooser_elem.cloneNode(1);
@@ -91,5 +130,45 @@
 
 	div_elem.appendChild(chooser_elem);
 	container.appendChild(div_elem);
-	num_fences_level[fence_level]++;
+	num_fences_level[fence_level - 1]++;
+}
+
+function validate_fence(master_form, container_id) {
+	var errors = new Array();
+	var div_elem = document.getElementById(container_id);
+	if (!div_elem)
+		return (-1);
+	var form_xml = '';
+
+	var form = div_elem.getElementsByTagName('form');
+	for (var i = 0 ; i < form.length ; i++) {
+		var input_elem = form[i].getElementsByTagName('input');
+		var temp = '';
+		for (var j = 0 ; j < input_elem.length ; j++) {
+			var res_type = input_elem[j].type;
+			if (res_type == 'hidden' || res_type == 'text' ||
+				res_type == 'password')
+			{
+				temp += '<input type="' + res_type + '" name="' + input_elem[j].name + '" value="' + input_elem[j].value + '" />';
+			} else if (res_type == 'checkbox' || res_type == 'radio') {
+				if (input_elem[j].checked)
+					temp += '<input type="' + res_type + '" name="' + input_elem[j].name + '" checked="checked"';
+				if (res_type == 'radio')
+					temp += ' value="' + input_elem[j].value + '"';
+				temp += ' />';
+			}
+		}
+		var select_elem = form[i].getElementsByTagName('select');
+		for (var j = 0 ; j < select_elem.length ; j++) {
+			temp += '<input type="text" name="' + select_elem[j].name + '" value="' + select_elem[j].options[select_elem[j].options.selectedIndex].value + '" />';
+		}
+
+		form_xml += '<form id="' + form[i].getAttribute('name') + '">' + temp + '</form>';
+	}
+
+	master_form.fence_xml.value = '<formlist>' + form_xml + '</formlist>';
+
+	if (confirm('Submit: ' + master_form.fence_xml.value))
+		return;
+		//form.submit();
 }
--- conga/luci/cluster/form-macros	2007/01/04 00:19:48	1.140
+++ conga/luci/cluster/form-macros	2007/01/05 23:26:11	1.141
@@ -1166,6 +1166,7 @@
 </div>
 
 <div metal:define-macro="shared-fence-option-list">
+	<option>Select a shared fence device</option>
 	<option name="fence_apc" value="fence_apc">APC Power Switch</option>
 	<option name="fence_wti" value="fence_wti">WTI Power Switch</option>
 	<option name="fence_brocade" value="fence_brocade">Brocade Fabric Switch</option>
@@ -1182,6 +1183,7 @@
 </div>
 
 <div metal:define-macro="fence-option-list">
+	<option>Select a fence device</option>
 	<option name="fence_apc" value="fence_apc">APC Power Switch</option>
 	<option name="fence_wti" value="fence_wti">WTI Power Switch</option>
 	<option name="fence_brocade" value="fence_brocade">Brocade Fabric Switch</option>
@@ -1249,15 +1251,6 @@
 			</tr>
 		</table>
 
-		<div name="instances">
-			<tal:block tal:condition="exists: cur_fence_instances">
-				<tal:block tal:repeat="cur_instance cur_fence_instances">
-					<tal:block
-						metal:use-macro="here/form-macros/macros/fence-instance-form-apc" />
-				</tal:block>
-			</tal:block>
-		</div>
-
 		<tal:block tal:condition="exists: cur_fencedev">
 			<input type="hidden" name="existing_device" value="1" />
 			<input type="hidden" name="old_name"
@@ -1316,15 +1309,6 @@
 			</tr>
 		</table>
 
-		<div name="instances">
-			<tal:block tal:condition="exists: cur_fence_instances">
-				<tal:block tal:repeat="cur_instance cur_fence_instances">
-					<tal:block
-						metal:use-macro="here/form-macros/macros/fence-instance-form-mcdata" />
-				</tal:block>
-			</tal:block>
-		</div>
-
 		<tal:block tal:condition="exists: cur_fencedev">
 			<input type="hidden" name="existing_device" value="1" />
 			<input type="hidden" name="old_name"
@@ -1374,15 +1358,6 @@
 			</tr>
 		</table>
 
-		<div name="instances">
-			<tal:block tal:condition="exists: cur_fence_instances">
-				<tal:block tal:repeat="cur_instance cur_fence_instances">
-					<tal:block
-						metal:use-macro="here/form-macros/macros/fence-instance-form-wti" />
-				</tal:block>
-			</tal:block>
-		</div>
-
 		<tal:block tal:condition="exists: cur_fencedev">
 			<input type="hidden" name="existing_device" value="1" />
 			<input type="hidden" name="old_name"
@@ -1587,15 +1562,6 @@
 			</tr>
 		</table>
 
-		<div name="instances">
-			<tal:block tal:condition="exists: cur_fence_instances">
-				<tal:block tal:repeat="cur_instance cur_fence_instances">
-					<tal:block
-						metal:use-macro="here/form-macros/macros/fence-instance-form-brocade" />
-				</tal:block>
-			</tal:block>
-		</div>
-
 		<tal:block tal:condition="exists: cur_fencedev">
 			<input type="hidden" name="existing_device" value="1" />
 			<input type="hidden" name="old_name"
@@ -1649,15 +1615,6 @@
 			</tr>
 		</table>
 
-		<div name="instances">
-			<tal:block tal:condition="exists: cur_fence_instances">
-				<tal:block tal:repeat="cur_instance cur_fence_instances">
-					<tal:block
-						metal:use-macro="here/form-macros/macros/fence-instance-form-sanbox2" />
-				</tal:block>
-			</tal:block>
-		</div>
-
 		<tal:block tal:condition="exists: cur_fencedev">
 			<input type="hidden" name="existing_device" value="1" />
 			<input type="hidden" name="old_name"
@@ -1707,15 +1664,6 @@
 			</tr>
 		</table>
 
-		<div name="instances">
-			<tal:block tal:condition="exists: cur_fence_instances">
-				<tal:block tal:repeat="cur_instance cur_fence_instances">
-					<tal:block
-						metal:use-macro="here/form-macros/macros/fence-instance-form-brocade" />
-				</tal:block>
-			</tal:block>
-		</div>
-
 		<tal:block tal:condition="exists: cur_fencedev">
 			<input type="hidden" name="existing_device" value="1" />
 			<input type="hidden" name="old_name"
@@ -1756,15 +1704,6 @@
 			</tr>
 		</table>
 
-		<div name="instances">
-			<tal:block tal:condition="exists: cur_fence_instances">
-				<tal:block tal:repeat="cur_instance cur_fence_instances">
-					<tal:block
-						metal:use-macro="here/form-macros/macros/fence-instance-form-gnbd" />
-				</tal:block>
-			</tal:block>
-		</div>
-
 		<tal:block tal:condition="exists: cur_fencedev">
 			<input type="hidden" name="existing_device" value="1" />
 			<input type="hidden" name="old_name"
@@ -1814,15 +1753,6 @@
 			</tr>
 		</table>
 
-		<div name="instances">
-			<tal:block tal:condition="exists: cur_fence_instances">
-				<tal:block tal:repeat="cur_instance cur_fence_instances">
-					<tal:block
-						metal:use-macro="here/form-macros/macros/fence-instance-form-egenera" />
-				</tal:block>
-			</tal:block>
-		</div>
-
 		<tal:block tal:condition="exists: cur_fencedev">
 			<input type="hidden" name="existing_device" value="1" />
 			<input type="hidden" name="old_name"
@@ -1879,6 +1809,7 @@
 				tal:attributes="value cur_fencedev/name | nothing" />
 		</tal:block>
 
+		<input type="hidden" name="sharable" value="1" />
 		<input type="hidden" name="fence_type" value="fence_bladecenter" />
 	</div>
 </div>
@@ -1930,15 +1861,6 @@
 			</tr>
 		</table>
 
-		<div name="instances">
-			<tal:block tal:condition="exists: cur_fence_instances">
-				<tal:block tal:repeat="cur_instance cur_fence_instances">
-					<tal:block
-						metal:use-macro="here/form-macros/macros/fence-instance-form-bullpap" />
-				</tal:block>
-			</tal:block>
-		</div>
-
 		<tal:block tal:condition="exists: cur_fencedev">
 			<input type="hidden" name="existing_device" value="1" />
 			<input type="hidden" name="old_name"
@@ -2012,15 +1934,6 @@
 			</tr>
 		</table>	
 
-		<div name="instances">
-			<tal:block tal:condition="exists: cur_fence_instances">
-				<tal:block tal:repeat="cur_instance cur_fence_instances">
-					<tal:block
-						metal:use-macro="here/form-macros/macros/fence-instance-form-xvm" />
-				</tal:block>
-			</tal:block>
-		</div>
-
 		<tal:block tal:condition="exists: cur_fencedev">
 			<input type="hidden" name="existing_device" value="1" />
 			<input type="hidden" name="old_name"
@@ -2236,10 +2149,25 @@
 						tal:attributes="value cur_instance/switch | nothing" />
 				</td>
 			</tr>
-			<input tal:condition="exists: cur_instance"
-				type="hidden" name="existing_instance" value="1" />
-			<input type="hidden" name="parent_fencedev" value="" />
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
 		</table>
+
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
 	</div>
 </div>
 
@@ -2260,10 +2188,25 @@
 						tal:attributes="value cur_instance/pserver | nothing" />
 				</td>
 			</tr>
-			<input tal:condition="exists: cur_instance"
-				type="hidden" name="existing_instance" value="1" />
-			<input type="hidden" name="parent_fencedev" value="" />
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
 		</table>
+
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
 	</div>
 </div>
 
@@ -2277,10 +2220,25 @@
 						tal:attributes="value cur_instance/port | nothing" />
 				</td>
 			</tr>
-			<input tal:condition="exists: cur_instance"
-				type="hidden" name="existing_instance" value="1" />
-			<input type="hidden" name="parent_fencedev" value="" />
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
 		</table>
+
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
 	</div>
 </div>
 
@@ -2294,10 +2252,25 @@
 						tal:attributes="value cur_instance/port | nothing" />
 				</td>
 			</tr>
-			<input tal:condition="exists: cur_instance"
-				type="hidden" name="existing_instance" value="1" />
-			<input type="hidden" name="parent_fencedev" value="" />
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
 		</table>
+
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
 	</div>
 </div>
 
@@ -2311,10 +2284,25 @@
 						tal:attributes="value cur_instance/port | nothing" />
 				</td>
 			</tr>
-			<input tal:condition="exists: cur_instance"
-				type="hidden" name="existing_instance" value="1" />
-			<input type="hidden" name="parent_fencedev" value="" />
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
 		</table>
+
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
 	</div>
 </div>
 
@@ -2328,10 +2316,25 @@
 						tal:attributes="value cur_instance/port | nothing" />
 				</td>
 			</tr>
-			<input tal:condition="exists: cur_instance"
-				type="hidden" name="existing_instance" value="1" />
-			<input type="hidden" name="parent_fencedev" value="" />
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
 		</table>
+
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
 	</div>
 </div>
 
@@ -2345,10 +2348,25 @@
 						tal:attributes="value cur_instance/port | nothing" />
 				</td>
 			</tr>
-			<input tal:condition="exists: cur_instance"
-				type="hidden" name="existing_instance" value="1" />
-			<input type="hidden" name="parent_fencedev" value="" />
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
 		</table>
+
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
 	</div>
 </div>
 
@@ -2362,10 +2380,25 @@
 						tal:attributes="value cur_instance/ipaddress | nothing" />
 				</td>
 			</tr>
-			<input tal:condition="exists: cur_instance"
-				type="hidden" name="existing_instance" value="1" />
-			<input type="hidden" name="parent_fencedev" value="" />
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
 		</table>
+
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
 	</div>
 </div>
 
@@ -2379,10 +2412,25 @@
 						tal:attributes="value cur_instance/ipaddress | nothing" />
 				</td>
 			</tr>
-			<input tal:condition="exists: cur_instance"
-				type="hidden" name="existing_instance" value="1" />
-			<input type="hidden" name="parent_fencedev" value="" />
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
 		</table>
+
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
 	</div>
 </div>
 
@@ -2396,10 +2444,25 @@
 						tal:attributes="value cur_instance/domain | nothing" />
 				</td>
 			</tr>
-			<input tal:condition="exists: cur_instance"
-				type="hidden" name="existing_instance" value="1" />
-			<input type="hidden" name="parent_fencedev" value="" />
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
 		</table>
+
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
 	</div>
 </div>
 
@@ -2413,10 +2476,25 @@
 						tal:attributes="value cur_instance/domain | nothing" />
 				</td>
 			</tr>
-			<input tal:condition="exists: cur_instance"
-				type="hidden" name="existing_instance" value="1" />
-			<input type="hidden" name="parent_fencedev" value="" />
+			<tr><td colspan="2">
+				<div class="hbSubmit">
+					<tal:block tal:condition="exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance"
+							tal:attributes="onclick python: 'del_fence_instance(\'' + cur_fence_instance_id + '\')'" />
+					</tal:block>
+					<tal:block tal:condition="not:exists:cur_fence_instance_id">
+						<input type="button" name="remove_fence"
+							value="Remove this instance" />
+					</tal:block>
+				</div>
+			</td></tr>
 		</table>
+
+		<input tal:condition="exists: cur_instance"
+			type="hidden" name="existing_instance" value="1" />
+		<input type="hidden" name="parent_fencedev"
+			tal:attributes="value cur_fence_dev_id | nothing" />
 	</div>
 </div>
 
@@ -2445,8 +2523,70 @@
 		metal:use-macro="here/form-macros/macros/fence-instance-form-bladecenter" />
 </div>
 
+<div metal:define-macro="fencedev-instance-cond-ladder"
+	tal:condition="exists: cur_fence_type">
+
+    <tal:block tal:condition="python: cur_fence_type == 'fence_apc'">
+		<tal:block
+			metal:use-macro="here/form-macros/macros/fence-instance-form-apc" />
+	</tal:block>
+
+    <tal:block tal:condition="python: cur_fence_type == 'fence_mcdata'">
+		<tal:block
+			metal:use-macro="here/form-macros/macros/fence-instance-form-mcdata" />
+	</tal:block>
+
+    <tal:block tal:condition="python: cur_fence_type == 'fence_wti'">
+		<tal:block
+			metal:use-macro="here/form-macros/macros/fence-instance-form-wti" />
+	</tal:block>
+
+    <tal:block tal:condition="python: cur_fence_type == 'fence_brocade'">
+		<tal:block
+			metal:use-macro="here/form-macros/macros/fence-instance-form-brocade" />
+	</tal:block>
+
+    <tal:block tal:condition="python: cur_fence_type == 'fence_sanbox2'">
+		<tal:block
+			metal:use-macro="here/form-macros/macros/fence-instance-form-sanbox2" />
+	</tal:block>
+
+    <tal:block tal:condition="python: cur_fence_type == 'fence_vixel'">
+		<tal:block
+			metal:use-macro="here/form-macros/macros/fence-instance-form-vixel" />
+	</tal:block>
+
+    <tal:block tal:condition="python: cur_fence_type == 'fence_gnbd'">
+		<tal:block
+			metal:use-macro="here/form-macros/macros/fence-instance-form-gnbd" />
+	</tal:block>
+
+    <tal:block tal:condition="python: cur_fence_type == 'fence_egenera'">
+		<tal:block
+			metal:use-macro="here/form-macros/macros/fence-instance-form-egenera" />
+	</tal:block>
+
+    <tal:block tal:condition="python: cur_fence_type == 'fence_bullpap'">
+		<tal:block
+			metal:use-macro="here/form-macros/macros/fence-instance-form-bullpap" />
+	</tal:block>
+
+    <tal:block tal:condition="python: cur_fence_type == 'fence_xvm'">
+		<tal:block
+			metal:use-macro="here/form-macros/macros/fence-instance-form-xvm" />
+	</tal:block>
+
+    <tal:block tal:condition="python: cur_fence_type == 'fence_bladecenter'">
+		<tal:block
+			metal:use-macro="here/form-macros/macros/fence-instance-form-bladecenter" />
+	</tal:block>
+</div>
+
 <div metal:define-macro="node-form">
 	<script type="text/javascript"
+		src="/luci/homebase/homebase_common.js">
+	</script>
+	<script type="text/javascript"
 		src="/luci/cluster/fence_device.js">
 	</script>
 	<script type="text/javascript">
@@ -2647,13 +2787,6 @@
 	</div>
 
 	<table id="fence_devices" class="cluster node fence">
-		<tfoot class="fence">
-			<tr class="cluster node fence"><td class="cluster node fence">
-				<input type="button" value="Update fence properties"
-					onClick="validate_fence_properties('fence_devices')" />
-			</td></tr>
-		</tfoot>
-
 		<tbody class="fence">
 		<tr class="cluster node info_top fence">
 			<td class="cluster node fence">
@@ -2661,6 +2794,7 @@
 					<strong class="cluster node">Main Fencing Method</strong>
 				</span>
 			</td>
+
 			<td class="cluster node fence_backup">
 				<span class="fence">
 					<strong class="cluster node">Backup Fencing Method</strong>
@@ -2671,29 +2805,71 @@
 		<tr class="cluster node info_top fence">
 			<td class="cluster node fence_main fence">
 				<div class="fence_container">
+
 				<div id="fence_list_level1" tal:define="global cur_fence_num python: 0">
 					<tal:block tal:condition="exists: fenceinfo/level1">
-						<tal:block tal:repeat="cur_fencedev fenceinfo/level1">
+
+						<div tal:repeat="cur_fencedev fenceinfo/level1"
+							 tal:attributes="id python: 'fence1_' + str(cur_fence_num)">
+
 							<tal:block tal:define="
-								cur_fence_instances cur_fencedev/instance_list | nothing;
+								cur_fence_dev_id python: 'fence1_' + str(cur_fence_num);
 								cur_fence_type cur_fencedev/agent | nothing;
-								cur_fence_level python: 1;">
-								<div tal:attributes="id python: 'fence1_' + str(cur_fence_num)">
-									<tal:block
-										metal:use-macro="here/form-macros/macros/fencedev-cond-ladder" />
+								cur_fence_level python: 1">
+
+								<form tal:attributes="name cur_fence_dev_id | string:[unknown]">
+									<tal:block metal:use-macro="here/form-macros/macros/fencedev-cond-ladder" />
+								</form>
+
+								<tal:block
+									tal:define="global cur_instance_num python:0" />
+
+								<div tal:attributes="id python: cur_fence_dev_id + '_instances'">
+									<tal:block tal:condition="exists: cur_fencedev/instance_list">
+										<tal:block tal:repeat="cur_instance cur_fencedev/instance_list">
+											<tal:block
+												tal:define="global cur_fence_instance_id python: cur_fence_dev_id + '_' + str(cur_instance_num)" />
+
+											<div tal:attributes="
+												name cur_fence_instance_id | nothing;
+												id cur_fence_instance_id | nothing">
+
+												<form
+													tal:attributes="name cur_fence_instance_id | nothing">
+													<tal:block metal:use-macro="here/form-macros/macros/fencedev-instance-cond-ladder" />
+												</form>
+												<tal:block
+													tal:define="global cur_instance_num  python:cur_instance_num + 1" />
+											</div>
+										</tal:block>
+									</tal:block>
+								</div>
+								<div class="hbSubmit">
+									<input type="button" name="remove_fence"
+										value="Remove this fence device" />
 								</div>
+
+								<tal:block tal:define="global cur_fence_num python: cur_fence_num + 1" />
 							</tal:block>
-							<tal:block tal:define="global cur_fence_num python: cur_fence_num + 1" />
-						</tal:block>
+						</div>
 					</tal:block>
+
 					<tal:block
 						tal:replace="structure python: '<script type='+chr(0x22)+'text/javascript'+chr(0x22)+'>num_fences_level[0] = ' + str(cur_fence_num) + ';</script>'" />
 				</div>
 
 				<div class="fence_control">
 					<input type="button" value="Add a fence to this level"
-						onclick="add_node_fence_device(1);" />
+						onclick="add_node_fence_device(1)" />
 				</div>
+				<div class="hbSubmit">
+					<form name="fence1_master">
+						<input type="hidden" name="fence_level" value="1" />
+						<input type="hidden" name="fence_xml" value="" />
+						<input type="button"
+							value="Update fence properties"
+							onclick="validate_fence(this.form, 'fence_list_level1')" />
+					</form>
 				</div>
 			</td>
 
@@ -2725,6 +2901,7 @@
 		</tbody>
 	</table>
 	</tal:block>
+
 	<tal:block tal:condition="python: 'ricci_error' in nodeinfo">
 		<hr/>
 		<strong class="errmsgs">
@@ -3707,19 +3884,24 @@
 		<tr class="cluster node info_top fence">
 			<td class="cluster node fence_main fence">
 				<form name="main_fence_form">
-				<select name="select_div"
-					onChange="swap_fence_div('fence_container',
-								this.options[this.selectedIndex].value)">
-					<tal:block metal:use-macro="here/form-macros/macros/shared-fence-option-list" />
-				</select>
+					<select name="select_div"
+						onChange="swap_fence_div('fence_container',
+									this.options[this.selectedIndex].value)">
+						<tal:block metal:use-macro="here/form-macros/macros/shared-fence-option-list" />
+					</select>
+				</form>
+
+				<form name="fencedevaddform" action="" method="post">
+					<div id="fence_container">
+					</div>
+					<div class="hbSubmit">
+						<input type="submit"
+							value="Add this shared fence device" />
+						<input type="hidden" name="pagetype"
+							value="51" id="pagetype" />
+						<input type="hidden" name="clustername" id="pagetype"
+							tal:attributes="value request/clustername" />
 				</form>
-        <form name="fencedevaddform" action="" method="post">
-				<div id="fence_container">
-				</div>
-			  <input type="submit" value="Add this shared fence device"/>
-        <input type="hidden" name="pagetype" value="51" id="pagetype" />
-        <input type="hidden" name="clustername" value="" id="pagetype" tal:attributes="value request/clustername"/>
-        </form>
 			</td>
 		</tr>
 		</tbody>
@@ -3740,7 +3922,7 @@
 
 	<tal:block tal:define="fencedevs python: here.getFenceInfo(modelb, None)">
 
-	<tal:block tal:condition="fencedevs/fencedevs">
+	<tal:block tal:condition="exists: fencedevs/fencedevs">
 		<table class="systemsTable">
 	        <thead class="systemsTable">
 				<tr class="systemsTable">
@@ -3843,34 +4025,47 @@
 <div metal:define-macro="fencedev-form">
 	<h2>Fence Device Form</h2>
 
-	<div class="cluster fencedev">
+	<div class="cluster fencedev fence">
 		<tal:block tal:define="
 			global cur_fencename request/fencename | nothing;
 			global cur_cluster request/clustername | nothing;
-			global cur_fence_type python: 'fence_apc'"/>
+			global cur_fence_type nothing" />
 
-		<span tal:condition="cur_fencename">
-			<span tal:define="
+		<tal:block tal:condition="cur_fencename">
+			<tal:block tal:define="
 					global cur_fencedev python:here.getFence(modelb,request);
-					global cur_fence_type cur_fencedev/agent" />
-		</span>
+					global cur_fence_type cur_fencedev/agent | nothing" />
+		</tal:block>
 
-  <form name="fencedeveditform" action="" method="post">	
-		<tal:block
-			metal:use-macro="here/form-macros/macros/fencedev-cond-ladder" />
-    <input type="submit" value="Update this fence device"/>
-    <input type="hidden" name="pagetype" value="54" id="pagetype" />
-    <input type="hidden" name="clustername" value="" id="pagetype" tal:attributes="value request/clustername"/>
-    <input type="hidden" name="orig_name" value="" id="orig_name" tal:attributes="value request/fencename"/>
-  <input type="hidden" name="fencename" value="" id="fencename" tal:attributes="value request/fencename"/>
-  </form>
-  <form name="fencedevdeleteform" action="" method="post">
-  <input type="submit" value="Delete this fence device"/>
-  <input type="hidden" name="pagetype" value="57" id="pagetype"/>
-  <input type="hidden" name="clustername" value="" id="pagetype" tal:attributes="value request/clustername"/>
-  <input type="hidden" name="fencename" value="" id="fencename" tal:attributes="value request/fencename"/>
-    <input type="hidden" name="orig_name" value="" id="orig_name" tal:attributes="value request/fencename"/>
-  </form>
+		<form name="fencedeveditform" action="" method="post">	
+			<tal:block
+				metal:use-macro="here/form-macros/macros/fencedev-cond-ladder" />
+
+			<input type="hidden" name="pagetype" value="54" />
+			<input type="hidden" name="clustername"
+				tal:attributes="value request/clustername" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value request/fencename"/>
+  			<input type="hidden" name="fencename"
+				tal:attributes="value request/fencename" />
+
+			<div class="hbSubmit">
+				<input type="submit" value="Update this fence device" />
+			</div>
+		</form>
+
+		<form name="fencedevdeleteform" action="" method="post">
+			<input type="hidden" name="pagetype" value="57" />
+			<input type="hidden" name="clustername"
+				tal:attributes="value request/clustername" />
+			<input type="hidden" name="fencename"
+				tal:attributes="value request/fencename" />
+			<input type="hidden" name="orig_name"
+				tal:attributes="value request/fencename" />
+			<div class="hbSubmit">
+				<input type="submit" value="Delete this fence device" />
+			</div>
+		</form>
 	</div>
 </div>
 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Cluster-devel] conga/luci/cluster fence_device.js form-macros
@ 2007-01-09 18:27 rmccabe
  0 siblings, 0 replies; 4+ messages in thread
From: rmccabe @ 2007-01-09 18:27 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2007-01-09 18:27:04

Modified files:
	luci/cluster   : fence_device.js form-macros 

Log message:
	final node-specific fence device frontend bits

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence_device.js.diff?cvsroot=cluster&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.145&r2=1.146

--- conga/luci/cluster/fence_device.js	2007/01/08 21:58:33	1.5
+++ conga/luci/cluster/fence_device.js	2007/01/09 18:27:04	1.6
@@ -1,3 +1,6 @@
+var num_fences_level = Array(0, 0)
+var num_fence_instances = new Array()
+
 function del_fence_instance(fi_div_id) {
 	delete_element_id(fi_div_id);
 }
@@ -6,7 +9,33 @@
 	delete_element_id(fence_id);
 }
 
-function add_fence_instance(fi_cont_id) {
+function add_fence_instance(fi_cont_id, fence_type) {
+	var instance_div = document.getElementById(fi_cont_id + '_instances');
+	if (!instance_div)
+		return (-1);
+
+	var fi_form = document.getElementById(fence_type + '_instance');
+	if (fi_form) {
+		var cloned_iform = fi_form.cloneNode(1);
+		var fencei_name = fi_cont_id + '_' + num_fence_instances[fi_cont_id]++;
+		cloned_iform.id = fencei_name;
+		cloned_iform.name = fencei_name;
+		cloned_iform.className = 'fence_instance';
+
+		var form_elem = document.createElement('form');
+		form_elem.name = cloned_iform.id;
+		form_elem.appendChild(cloned_iform);
+		var ielem = cloned_iform.getElementsByTagName('input');
+		for (var i = 0 ; i < ielem.length ; i++) {
+			if (ielem[i].type == 'button' && ielem[i].name == 'remove_fence') {
+				ielem[i].setAttribute('onclick',
+					'del_fence_instance(\'' + cloned_iform.id + '\')');
+				break;
+			}
+		}
+
+		instance_div.appendChild(cloned_iform);
+	}
 }
 
 function swap_fence_div(container_id, element_id) {
@@ -82,25 +111,33 @@
 				break;
 			}
 		}
-
 		idiv.appendChild(form_elem);
 		container_element.appendChild(idiv);
+		num_fence_instances[container_id] = 1;
 	}
 
 	var remove_div = document.createElement('div');
 	remove_div.className = 'hbSubmit';
+
 	var remove_button = document.createElement('input');
 	remove_button.setAttribute('type', 'button');
-	remove_button.setAttribute('value', 'Remove this fence device');
+	remove_button.setAttribute('value', 'Remove this device');
 	remove_button.setAttribute('onclick', "del_fence('" + container_element.id + "');");
+
+	var add_instance_button = document.createElement('input');
+	add_instance_button.setAttribute('type', 'button');
+	add_instance_button.setAttribute('name', 'add_fence_inst');
+	add_instance_button.setAttribute('value', 'Add an instance');
+	add_instance_button.setAttribute('onclick', "add_fence_instance('" + container_element.id + "','" + fence_type + "');");
+	add_instance_button.className = 'pad_left';
+
 	var remove_form = document.createElement('form');
 	remove_form.appendChild(remove_button);
+	remove_form.appendChild(add_instance_button);
 	remove_div.appendChild(remove_form);
 	container_element.appendChild(remove_div);
 }
 
-var num_fences_level = Array(0, 0)
-
 function add_node_fence_device(fence_level) {
 	var cont_name = 'fence_list_level' + fence_level;
 	var container = document.getElementById(cont_name);
--- conga/luci/cluster/form-macros	2007/01/08 21:58:33	1.145
+++ conga/luci/cluster/form-macros	2007/01/09 18:27:04	1.146
@@ -1283,16 +1283,6 @@
 		</tal:block>
 
 		<input type="hidden" name="sharable" value="1" />
-		<tal:block tal:condition="exists: cur_fencedev">
-			<tal:block tal:condition="exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances"
-					tal:attributes="
-						value python: len(cur_fencedev['instance_list'])" />
-			</tal:block>
-			<tal:block tal:condition="not:exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances" value="1" />
-			</tal:block>
-		</tal:block>
 		<input type="hidden" name="fence_type" value="fence_apc" />
 	</div>
 </div>
@@ -1351,16 +1341,6 @@
 		</tal:block>
 
 		<input type="hidden" name="sharable" value="1" />
-		<tal:block tal:condition="exists: cur_fencedev">
-			<tal:block tal:condition="exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances"
-					tal:attributes="
-						value python: len(cur_fencedev['instance_list'])" />
-			</tal:block>
-			<tal:block tal:condition="not:exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances" value="1" />
-			</tal:block>
-		</tal:block>
 		<input type="hidden" name="fence_type" value="fence_mcdata" />
 	</div>
 </div>
@@ -1410,16 +1390,6 @@
 		</tal:block>
 
 		<input type="hidden" name="sharable" value="1" />
-		<tal:block tal:condition="exists: cur_fencedev">
-			<tal:block tal:condition="exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances"
-					tal:attributes="
-						value python: len(cur_fencedev['instance_list'])" />
-			</tal:block>
-			<tal:block tal:condition="not:exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances" value="1" />
-			</tal:block>
-		</tal:block>
 		<input type="hidden" name="fence_type" value="fence_wti" />
 	</div>
 </div>
@@ -1624,16 +1594,6 @@
 		</tal:block>
 
 		<input type="hidden" name="sharable" value="1" />
-		<tal:block tal:condition="exists: cur_fencedev">
-			<tal:block tal:condition="exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances"
-					tal:attributes="
-						value python: len(cur_fencedev['instance_list'])" />
-			</tal:block>
-			<tal:block tal:condition="not:exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances" value="1" />
-			</tal:block>
-		</tal:block>
 		<input type="hidden" name="fence_type" value="fence_brocade" />
 	</div>
 </div>
@@ -1687,16 +1647,6 @@
 		</tal:block>
 
 		<input type="hidden" name="sharable" value="1" />
-		<tal:block tal:condition="exists: cur_fencedev">
-			<tal:block tal:condition="exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances"
-					tal:attributes="
-						value python: len(cur_fencedev['instance_list'])" />
-			</tal:block>
-			<tal:block tal:condition="not:exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances" value="1" />
-			</tal:block>
-		</tal:block>
 		<input type="hidden" name="fence_type" value="fence_sanbox2" />
 	</div>
 </div>
@@ -1746,16 +1696,6 @@
 		</tal:block>
 
 		<input type="hidden" name="sharable" value="1" />
-		<tal:block tal:condition="exists: cur_fencedev">
-			<tal:block tal:condition="exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances"
-					tal:attributes="
-						value python: len(cur_fencedev['instance_list'])" />
-			</tal:block>
-			<tal:block tal:condition="not:exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances" value="1" />
-			</tal:block>
-		</tal:block>
 		<input type="hidden" name="fence_type" value="fence_vixel" />
 	</div>
 </div>
@@ -1796,16 +1736,6 @@
 		</tal:block>
 
 		<input type="hidden" name="sharable" value="1" />
-		<tal:block tal:condition="exists: cur_fencedev">
-			<tal:block tal:condition="exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances"
-					tal:attributes="
-						value python: len(cur_fencedev['instance_list'])" />
-			</tal:block>
-			<tal:block tal:condition="not:exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances" value="1" />
-			</tal:block>
-		</tal:block>
 		<input type="hidden" name="fence_type" value="fence_gnbd" />
 	</div>
 </div>
@@ -1855,16 +1785,6 @@
 		</tal:block>
 
 		<input type="hidden" name="sharable" value="1" />
-		<tal:block tal:condition="exists: cur_fencedev">
-			<tal:block tal:condition="exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances"
-					tal:attributes="
-						value python: len(cur_fencedev['instance_list'])" />
-			</tal:block>
-			<tal:block tal:condition="not:exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances" value="1" />
-			</tal:block>
-		</tal:block>
 		<input type="hidden" name="fence_type" value="fence_egenera" />
 	</div>
 </div>
@@ -1915,16 +1835,6 @@
 		</tal:block>
 
 		<input type="hidden" name="sharable" value="1" />
-		<tal:block tal:condition="exists: cur_fencedev">
-			<tal:block tal:condition="exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances"
-					tal:attributes="
-						value python: len(cur_fencedev['instance_list'])" />
-			</tal:block>
-			<tal:block tal:condition="not:exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances" value="1" />
-			</tal:block>
-		</tal:block>
 		<input type="hidden" name="fence_type" value="fence_bladecenter" />
 	</div>
 </div>
@@ -1983,16 +1893,6 @@
 		</tal:block>
 
 		<input type="hidden" name="sharable" value="1" />
-		<tal:block tal:condition="exists: cur_fencedev">
-			<tal:block tal:condition="exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances"
-					tal:attributes="
-						value python: len(cur_fencedev['instance_list'])" />
-			</tal:block>
-			<tal:block tal:condition="not:exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances" value="1" />
-			</tal:block>
-		</tal:block>
 		<input type="hidden" name="fence_type" value="fence_bullpap" />
 	</div>
 </div>
@@ -2066,16 +1966,6 @@
 		</tal:block>
 
 		<input type="hidden" name="sharable" value="1" />
-		<tal:block tal:condition="exists: cur_fencedev">
-			<tal:block tal:condition="exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances"
-					tal:attributes="
-						value python: len(cur_fencedev['instance_list'])" />
-			</tal:block>
-			<tal:block tal:condition="not:exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances" value="1" />
-			</tal:block>
-		</tal:block>
 		<input type="hidden" name="fence_type" value="xvm" />
 	</div>
 </div>
@@ -2107,16 +1997,6 @@
 		</tal:block>
 
 		<input type="hidden" name="sharable" value="1" />
-		<tal:block tal:condition="exists: cur_fencedev">
-			<tal:block tal:condition="exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances"
-					tal:attributes="
-						value python: len(cur_fencedev['instance_list'])" />
-			</tal:block>
-			<tal:block tal:condition="not:exists: cur_fencedev/instance_list">
-				<input type="hidden" name="num_instances" value="1" />
-			</tal:block>
-		</tal:block>
 		<input type="hidden" name="fence_type" value="scsi" />
 	</div>
 </div>
@@ -2277,8 +2157,11 @@
 </tal:block>
 </div>
 
-<div metal:define-macro="fence-instance-form-apc">
-	<div id="fence_apc_instance" name="fence_apc" class="fencedev_instance">
+<div metal:define-macro="fence-instance-form-apc"
+	tal:omit-tag="exists: cur_fence_dev_id">
+
+	<div id="fence_apc_instance" name="fence_apc" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
 		<table>
 			<tr>
 				<td>Port</td>
@@ -2316,8 +2199,10 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-instance-form-egenera">
-	<div id="fence_egenera_instance" name="fence_egenera" class="fencedev_instance">
+<div metal:define-macro="fence-instance-form-egenera"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_egenera_instance" name="fence_egenera" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
 		<table>
 			<tr>
 				<td>lpan</td>
@@ -2355,8 +2240,10 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-instance-form-wti">
-	<div id="fence_wti_instance" name="fence_wti" class="fencedev_instance">
+<div metal:define-macro="fence-instance-form-wti"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_wti_instance" name="fence_wti" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
 		<table>
 			<tr>
 				<td>Port</td>
@@ -2387,8 +2274,10 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-instance-form-brocade">
-	<div id="fence_brocade_instance" name="fence_brocade" class="fencedev_instance">
+<div metal:define-macro="fence-instance-form-brocade"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_brocade_instance" name="fence_brocade" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
 		<table>
 			<tr>
 				<td>Port</td>
@@ -2419,8 +2308,10 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-instance-form-vixel">
-	<div id="fence_vixel_instance" name="fence_vixel" class="fencedev_instance">
+<div metal:define-macro="fence-instance-form-vixel"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_vixel_instance" name="fence_vixel" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
 		<table>
 			<tr>
 				<td>Port</td>
@@ -2451,8 +2342,10 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-instance-form-sanbox2">
-	<div id="fence_sanbox2_instance" name="fence_sanbox2" class="fencedev_instance">
+<div metal:define-macro="fence-instance-form-sanbox2"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_sanbox2_instance" name="fence_sanbox2" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
 		<table>
 			<tr>
 				<td>Port</td>
@@ -2483,8 +2376,10 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-instance-form-mcdata">
-	<div id="fence_mcdata_instance" name="fence_mcdata" class="fencedev_instance">
+<div metal:define-macro="fence-instance-form-mcdata"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_mcdata_instance" name="fence_mcdata" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
 		<table>
 			<tr>
 				<td>Port</td>
@@ -2515,8 +2410,10 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-instance-form-gndb">
-	<div id="fence_gnbd_instance" name="fence_gnbd" class="fencedev_instance">
+<div metal:define-macro="fence-instance-form-gndb"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_gnbd_instance" name="fence_gnbd" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
 		<table>
 			<tr>
 				<td>IP Address</td>
@@ -2547,8 +2444,10 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-instance-form-bladecenter">
-	<div id="fence_bladecenter_instance" name="fence_bladecenter" class="fencedev_instance">
+<div metal:define-macro="fence-instance-form-bladecenter"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_bladecenter_instance" name="fence_bladecenter" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
 		<table>
 			<tr>
 				<td>Blade</td>
@@ -2579,8 +2478,10 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-instance-form-bullpap">
-	<div id="fence_bullpap_instance" name="fence_bullpap" class="fencedev_instance">
+<div metal:define-macro="fence-instance-form-bullpap"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_bullpap_instance" name="fence_bullpap" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
 		<table>
 			<tr>
 				<td>Domain</td>
@@ -2611,8 +2512,10 @@
 	</div>
 </div>
 
-<div metal:define-macro="fence-instance-form-xvm">
-	<div id="fence_xvm_instance" name="fence_xvm" class="fencedev_instance">
+<div metal:define-macro="fence-instance-form-xvm"
+	tal:omit-tag="exists: cur_fence_dev_id">
+	<div id="fence_xvm_instance" name="fence_xvm" class="fencedev_instance"
+		tal:omit-tag="exists: cur_fence_dev_id">
 		<table>
 			<tr>
 				<td>Domain</td>
@@ -2965,11 +2868,6 @@
 
 								<form tal:attributes="name cur_fence_dev_id | string:[unknown]">
 									<tal:block metal:use-macro="here/form-macros/macros/fencedev-cond-ladder" />
-									<tal:block tal:condition="exists: cur_fencedev/instance_list">
-										<input type="hidden"
-											name="num_instances"
-											tal:attributes="value python: len(cur_fencedev['instance_list'])" />
-									</tal:block>
 								</form>
 
 								<tal:block
@@ -2977,6 +2875,7 @@
 
 								<div tal:attributes="id python: cur_fence_dev_id + '_instances'">
 									<tal:block tal:condition="exists: cur_fencedev/instance_list">
+										<tal:block tal:replace="structure python: '<script type='+chr(0x22)+'text/javascript'+chr(0x22)+'>num_fence_instances[\'' + cur_fence_dev_id + '\'] = ' + str(len(cur_fencedev['instance_list'])) + ';</script>'" />
 										<tal:block tal:repeat="cur_instance cur_fencedev/instance_list">
 											<tal:block
 												tal:define="global cur_fence_instance_id python: cur_fence_dev_id + '_' + str(cur_instance_num)" />
@@ -2998,9 +2897,13 @@
 								</div>
 								<div class="hbSubmit">
 									<input type="button" name="remove_fence_dev"
-										value="Remove this fence device"
+										value="Remove this device"
 										tal:attributes="
 											onclick python: 'del_fence(\'' + cur_fence_dev_id + '\')'" />
+									<input tal:condition="exists: cur_fencedev/isShared"
+										name="add_instance" type="button"
+										value="Add an instance"
+										tal:attributes="onclick python: 'add_fence_instance(\'' + cur_fence_dev_id + '\',\'' + cur_fence_type + '\')'" />
 								</div>
 								<tal:block tal:define="global cur_fence_num python: cur_fence_num + 1" />
 							</tal:block>
@@ -3041,6 +2944,7 @@
 
 								<div tal:attributes="id python: cur_fence_dev_id + '_instances'">
 									<tal:block tal:condition="exists: cur_fencedev/instance_list">
+										<tal:block tal:replace="structure python: '<script type='+chr(0x22)+'text/javascript'+chr(0x22)+'>num_fence_instances[\'' + cur_fence_dev_id + '\'] = ' + str(len(cur_fencedev['instance_list'])) + ';</script>'" />
 										<tal:block tal:repeat="cur_instance cur_fencedev/instance_list">
 											<tal:block
 												tal:define="global cur_fence_instance_id python: cur_fence_dev_id + '_' + str(cur_instance_num)" />
@@ -3062,9 +2966,13 @@
 								</div>
 								<div class="hbSubmit">
 									<input type="button" name="remove_fence_dev"
-										value="Remove this fence device"
+										value="Remove this device"
 										tal:attributes="
 											onclick python: 'del_fence(\'' + cur_fence_dev_id + '\')'" />
+									<input tal:condition="exists: cur_fencedev/isShared"
+										name="add_instance" type="button"
+										value="Add an instance"
+										tal:attributes="onclick python: 'add_fence_instance(\'' + cur_fence_dev_id + '\',\'' + cur_fence_type + '\')'" />
 								</div>
 								<tal:block tal:define="global cur_fence_num python: cur_fence_num + 1" />
 							</tal:block>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Cluster-devel] conga/luci/cluster fence_device.js form-macros
@ 2007-01-09 23:28 rmccabe
  0 siblings, 0 replies; 4+ messages in thread
From: rmccabe @ 2007-01-09 23:28 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2007-01-09 23:28:02

Modified files:
	luci/cluster   : fence_device.js form-macros 

Log message:
	only show the "Add an instance" button for sharable fence devices

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence_device.js.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.147&r2=1.148

--- conga/luci/cluster/fence_device.js	2007/01/09 18:27:04	1.6
+++ conga/luci/cluster/fence_device.js	2007/01/09 23:28:02	1.7
@@ -71,6 +71,7 @@
 		container_element.removeChild(container_element.firstChild);
 
 	var target = child_element.cloneNode(1);
+	target.id = '';
 
 	var fence_type = fence_id;
 	if (fence_opt.className.match(/shared_fencedev/)) {
@@ -90,6 +91,7 @@
 	container_element.appendChild(target_form);
 
 	var fi_form = document.getElementById(fence_type + '_instance');
+	var sharable = 0;
 	if (fi_form) {
 		var idiv = document.createElement('div');
 		idiv.id = container_id + '_instances';
@@ -114,6 +116,7 @@
 		idiv.appendChild(form_elem);
 		container_element.appendChild(idiv);
 		num_fence_instances[container_id] = 1;
+		sharable++;
 	}
 
 	var remove_div = document.createElement('div');
@@ -124,12 +127,14 @@
 	remove_button.setAttribute('value', 'Remove this device');
 	remove_button.setAttribute('onclick', "del_fence('" + container_element.id + "');");
 
-	var add_instance_button = document.createElement('input');
-	add_instance_button.setAttribute('type', 'button');
-	add_instance_button.setAttribute('name', 'add_fence_inst');
-	add_instance_button.setAttribute('value', 'Add an instance');
-	add_instance_button.setAttribute('onclick', "add_fence_instance('" + container_element.id + "','" + fence_type + "');");
-	add_instance_button.className = 'pad_left';
+	if (sharable) {
+		var add_instance_button = document.createElement('input');
+		add_instance_button.setAttribute('type', 'button');
+		add_instance_button.setAttribute('name', 'add_fence_inst');
+		add_instance_button.setAttribute('value', 'Add an instance');
+		add_instance_button.setAttribute('onclick', "add_fence_instance('" + container_element.id + "','" + fence_type + "');");
+		add_instance_button.className = 'pad_left';
+	}
 
 	var remove_form = document.createElement('form');
 	remove_form.appendChild(remove_button);
--- conga/luci/cluster/form-macros	2007/01/09 22:20:34	1.147
+++ conga/luci/cluster/form-macros	2007/01/09 23:28:02	1.148
@@ -2200,7 +2200,7 @@
 			</td></tr>
 		</table>
 
-		<input name="fence_instance" value="1" />
+		<input type="hidden" name="fence_instance" value="1" />
 		<input tal:condition="exists: cur_instance"
 			type="hidden" name="existing_instance" value="1" />
 		<input type="hidden" name="parent_fencedev"
@@ -2242,7 +2242,7 @@
 			</td></tr>
 		</table>
 
-		<input name="fence_instance" value="1" />
+		<input type="hidden" name="fence_instance" value="1" />
 		<input tal:condition="exists: cur_instance"
 			type="hidden" name="existing_instance" value="1" />
 		<input type="hidden" name="parent_fencedev"
@@ -2277,7 +2277,7 @@
 			</td></tr>
 		</table>
 
-		<input name="fence_instance" value="1" />
+		<input type="hidden" name="fence_instance" value="1" />
 		<input tal:condition="exists: cur_instance"
 			type="hidden" name="existing_instance" value="1" />
 		<input type="hidden" name="parent_fencedev"
@@ -2312,7 +2312,7 @@
 			</td></tr>
 		</table>
 
-		<input name="fence_instance" value="1" />
+		<input type="hidden" name="fence_instance" value="1" />
 		<input tal:condition="exists: cur_instance"
 			type="hidden" name="existing_instance" value="1" />
 		<input type="hidden" name="parent_fencedev"
@@ -2347,7 +2347,7 @@
 			</td></tr>
 		</table>
 
-		<input name="fence_instance" value="1" />
+		<input type="hidden" name="fence_instance" value="1" />
 		<input tal:condition="exists: cur_instance"
 			type="hidden" name="existing_instance" value="1" />
 		<input type="hidden" name="parent_fencedev"
@@ -2382,7 +2382,7 @@
 			</td></tr>
 		</table>
 
-		<input name="fence_instance" value="1" />
+		<input type="hidden" name="fence_instance" value="1" />
 		<input tal:condition="exists: cur_instance"
 			type="hidden" name="existing_instance" value="1" />
 		<input type="hidden" name="parent_fencedev"
@@ -2417,7 +2417,7 @@
 			</td></tr>
 		</table>
 
-		<input name="fence_instance" value="1" />
+		<input type="hidden" name="fence_instance" value="1" />
 		<input tal:condition="exists: cur_instance"
 			type="hidden" name="existing_instance" value="1" />
 		<input type="hidden" name="parent_fencedev"
@@ -2452,7 +2452,7 @@
 			</td></tr>
 		</table>
 
-		<input name="fence_instance" value="1" />
+		<input type="hidden" name="fence_instance" value="1" />
 		<input tal:condition="exists: cur_instance"
 			type="hidden" name="existing_instance" value="1" />
 		<input type="hidden" name="parent_fencedev"
@@ -2487,7 +2487,7 @@
 			</td></tr>
 		</table>
 
-		<input name="fence_instance" value="1" />
+		<input type="hidden" name="fence_instance" value="1" />
 		<input tal:condition="exists: cur_instance"
 			type="hidden" name="existing_instance" value="1" />
 		<input type="hidden" name="parent_fencedev"
@@ -2522,7 +2522,7 @@
 			</td></tr>
 		</table>
 
-		<input name="fence_instance" value="1" />
+		<input type="hidden" name="fence_instance" value="1" />
 		<input tal:condition="exists: cur_instance"
 			type="hidden" name="existing_instance" value="1" />
 		<input type="hidden" name="parent_fencedev"
@@ -2544,7 +2544,7 @@
 			</tr>
 		</table>
 
-		<input name="fence_instance" value="1" />
+		<input type="hidden" name="fence_instance" value="1" />
 		<input tal:condition="exists: cur_instance"
 			type="hidden" name="existing_instance" value="1" />
 		<input type="hidden" name="parent_fencedev"
@@ -2579,7 +2579,7 @@
 			</td></tr>
 		</table>
 
-		<input name="fence_instance" value="1" />
+		<input type="hidden" name="fence_instance" value="1" />
 		<input tal:condition="exists: cur_instance"
 			type="hidden" name="existing_instance" value="1" />
 		<input type="hidden" name="parent_fencedev"



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Cluster-devel] conga/luci/cluster fence_device.js form-macros
@ 2007-01-10 20:02 rmccabe
  0 siblings, 0 replies; 4+ messages in thread
From: rmccabe @ 2007-01-10 20:02 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2007-01-10 20:02:16

Modified files:
	luci/cluster   : fence_device.js form-macros 

Log message:
	more node fencing

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence_device.js.diff?cvsroot=cluster&r1=1.7&r2=1.8
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.148&r2=1.149

--- conga/luci/cluster/fence_device.js	2007/01/09 23:28:02	1.7
+++ conga/luci/cluster/fence_device.js	2007/01/10 20:02:16	1.8
@@ -27,14 +27,17 @@
 		form_elem.appendChild(cloned_iform);
 		var ielem = cloned_iform.getElementsByTagName('input');
 		for (var i = 0 ; i < ielem.length ; i++) {
-			if (ielem[i].type == 'button' && ielem[i].name == 'remove_fence') {
+			if (ielem[i].name == 'parent_fencedev') {
+				ielem[i].value = fi_cont_id;
+			} else if (	ielem[i].type == 'button' &&
+						ielem[i].name == 'remove_fence')
+			{
 				ielem[i].setAttribute('onclick',
 					'del_fence_instance(\'' + cloned_iform.id + '\')');
-				break;
 			}
 		}
 
-		instance_div.appendChild(cloned_iform);
+		instance_div.appendChild(form_elem);
 	}
 }
 
@@ -107,10 +110,13 @@
 		form_elem.appendChild(cloned_iform);
 		var ielem = cloned_iform.getElementsByTagName('input');
 		for (var i = 0 ; i < ielem.length ; i++) {
-			if (ielem[i].type == 'button' && ielem[i].name == 'remove_fence') {
+			if (ielem[i].name == 'parent_fencedev') {
+				ielem[i].value = container_id;
+			} else if (	ielem[i].type == 'button'
+						&& ielem[i].name == 'remove_fence')
+			{
 				ielem[i].setAttribute('onclick',
 					'del_fence_instance(\'' + cloned_iform.id + '\')');
-				break;
 			}
 		}
 		idiv.appendChild(form_elem);
--- conga/luci/cluster/form-macros	2007/01/09 23:28:02	1.148
+++ conga/luci/cluster/form-macros	2007/01/10 20:02:16	1.149
@@ -1250,7 +1250,7 @@
 			<tr>
 				<td>IP Address</td>
 				<td>
-					<input name="ip_addr" type="text"
+					<input name="ipaddr" type="text"
 						tal:attributes="
 							disabled cur_fencedev/isShared | nothing;
 							value cur_fencedev/ipaddr | nothing" />
@@ -1268,7 +1268,7 @@
 			<tr>
 				<td>Password</td>
 				<td>
-					<input name="password" type="password" autocomplete="off"
+					<input name="passwd" type="password" autocomplete="off"
 						tal:attributes="
 							disabled cur_fencedev/isShared | nothing;
 							value cur_fencedev/passwd | nothing" />
@@ -1308,7 +1308,7 @@
 			<tr>
 				<td>IP Address</td>
 				<td>
-					<input name="ip_addr" type="text"
+					<input name="ipaddr" type="text"
 						tal:attributes="
 							disabled cur_fencedev/isShared | nothing;
 							value cur_fendev/ipaddr | nothing" />
@@ -1326,7 +1326,7 @@
 			<tr>
 				<td>Password</td>
 				<td>
-					<input name="password" type="password" autocomplete="off"
+					<input name="passwd" type="password" autocomplete="off"
 						tal:attributes="
 							disabled cur_fencedev/isShared | nothing;
 							value cur_fencedev/passwd | nothing" />
@@ -1366,7 +1366,7 @@
 			<tr>
 				<td>IP Address</td>
 				<td>
-					<input name="ip_addr" type="text"
+					<input name="ipaddr" type="text"
 						tal:attributes="
 							disabled cur_fencedev/isShared | nothing;
 							value cur_fencedev/ipaddr | nothing" />
@@ -1375,7 +1375,7 @@
 			<tr>
 				<td>Password</td>
 				<td>
-					<input name="password" type="password" autocomplete="off"
+					<input name="passwd" type="password" autocomplete="off"
 						tal:attributes="
 							disabled cur_fencedev/isShared | nothing;
 							value cur_fencedev/passwd | nothing" />
@@ -1427,7 +1427,7 @@
 			<tr>
 				<td>Password</td>
 				<td>
-					<input name="password" type="password" autocomplete="off"
+					<input name="passwd" type="password" autocomplete="off"
 						tal:attributes="value cur_fencedev/passwd | nothing" />
 				</td>
 			</tr>
@@ -1462,7 +1462,7 @@
 			<tr>
 				<td>IP Address</td>
 				<td>
-					<input name="ip_addr" type="text"
+					<input name="ipaddr" type="text"
 						tal:attributes="value cur_fencedev/ipaddr | nothing" />
 				</td>
 			</tr>
@@ -1476,7 +1476,7 @@
 			<tr>
 				<td>Password</td>
 				<td>
-					<input name="password" type="password" autocomplete="off"
+					<input name="passwd" type="password" autocomplete="off"
 						tal:attributes="value cur_fencedev/passwd | nothing" />
 				</td>
 		</table>
@@ -1524,7 +1524,7 @@
 			<tr>
 				<td>Password</td>
 				<td>
-					<input name="password" type="password" autocomplete="off"
+					<input name="passwd" type="password" autocomplete="off"
 						tal:attributes="value cur_fencedev/passwd | nothing" />
 				</td>
 			</tr>
@@ -1561,7 +1561,7 @@
 			<tr>
 				<td>IP Address</td>
 				<td>
-					<input name="ip_addr" type="text"
+					<input name="ipaddr" type="text"
 						tal:attributes="
 							disabled cur_fencedev/isShared | nothing;
 							value cur_fencedev/ipaddr | nothing" />
@@ -1579,7 +1579,7 @@
 			<tr>
 				<td>Password</td>
 				<td>
-					<input name="password" type="password" autocomplete="off"
+					<input name="passwd" type="password" autocomplete="off"
 						tal:attributes="
 							disabled cur_fencedev/isShared | nothing;
 							value cur_fencedev/passwd | nothing" />
@@ -1618,7 +1618,12 @@
 			</tr>
 			<tr>
 				<td>IP Address</td>
-				<td><input name="hostname" type="text"/></td>
+				<td>
+					<input name="hostname" type="text"
+						tal:attributes="
+							disabled cur_fencedev/isShared | nothing;
+							value cur_fencedev/hostname | nothing" />
+				</td>
 			</tr>
 			<tr>
 				<td>Login</td>
@@ -1632,7 +1637,7 @@
 			<tr>
 				<td>Password</td>
 				<td>
-					<input name="password" type="password" autocomplete="off"
+					<input name="passwd" type="password" autocomplete="off"
 						tal:attributes="
 							disabled cur_fencedev/isShared | nothing;
 							value cur_fencedev/passwd | nothing" />
@@ -1672,7 +1677,7 @@
 			<tr>
 				<td>IP Address</td>
 				<td>
-					<input name="ip_addr" type="text"
+					<input name="ipaddr" type="text"
 						tal:attributes="
 							disabled cur_fencedev/isShared | nothing;
 							value cur_fencedev/ipaddr | nothing" />
@@ -1681,7 +1686,7 @@
 			<tr>
 				<td>Password</td>
 				<td>
-					<input name="password" type="password" autocomplete="off"
+					<input name="passwd" type="password" autocomplete="off"
 						tal:attributes="
 							disabled cur_fencedev/isShared | nothing;
 							value cur_fencedev/passwd | nothing" />
@@ -1808,7 +1813,7 @@
 			<tr>
 				<td>IP Address</td>
 				<td>
-					<input name="ip_addr" type="text"
+					<input name="ipaddr" type="text"
 						tal:attributes="value cur_fencedev/ipaddr | nothing" />
 				</td>
 			</tr>
@@ -1822,7 +1827,7 @@
 			<tr>
 				<td>Password</td>
 				<td>
-					<input name="password" type="password" autocomplete="off"
+					<input name="passwd" type="password" autocomplete="off"
 						tal:attributes="value cur_fencedev/passwd | nothing" />
 				</td>
 			</tr>
@@ -1860,7 +1865,7 @@
 			<tr>
 				<td>IP Address</td>
 				<td>
-					<input name="ip_addr" type="text"
+					<input name="ipaddr" type="text"
 						tal:attributes="
 							disabled cur_fencedev/isShared | nothing;
 							value cur_fencedev/ipaddr | nothing" />
@@ -1878,7 +1883,7 @@
 			<tr>
 				<td>Password</td>
 				<td>
-					<input name="password" type="password" autocomplete="off"
+					<input name="passwd" type="password" autocomplete="off"
 						tal:attributes="
 							disabled cur_fencedev/isShared | nothing;
 							value cur_fencedev/passwd | nothing" />
@@ -2020,7 +2025,7 @@
 			<tr>
 				<td>IP Address</td>
 				<td>
-					<input name="ip_addr" type="text"
+					<input name="ipaddr" type="text"
 						tal:attributes="value cur_fencedev/ipaddr | nothing" />
 				</td>
 			</tr>
@@ -2468,8 +2473,8 @@
 			<tr>
 				<td>Blade</td>
 				<td>
-					<input name="ipaddress" type="text"
-						tal:attributes="value cur_instance/ipaddress | nothing" />
+					<input name="blade" type="text"
+						tal:attributes="value cur_instance/blade | nothing" />
 				</td>
 			</tr>
 			<tr><td colspan="2">



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-01-10 20:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-09 18:27 [Cluster-devel] conga/luci/cluster fence_device.js form-macros rmccabe
  -- strict thread matches above, loose matches on Subject: below --
2007-01-10 20:02 rmccabe
2007-01-09 23:28 rmccabe
2007-01-05 23:26 rmccabe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).