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

[Cluster-devel] conga/luci/cluster form-chooser form-macros



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe sourceware org	2006-10-16 18:35:01

Modified files:
	luci/cluster   : form-chooser form-macros 

Log message:
	fence config frontend ui stuff

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-chooser.diff?cvsroot=cluster&r1=1.10&r2=1.11
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.85&r2=1.86

--- conga/luci/cluster/form-chooser	2006/10/09 17:12:26	1.10
+++ conga/luci/cluster/form-chooser	2006/10/16 18:35:01	1.11
@@ -131,7 +131,7 @@
     <span tal:omit-tag="" tal:condition="python: ptype == '52'">
      <div metal:use-macro="here/form-macros/macros/fencedevlist-form"/>
     </span>
-    <span tal:omit-tag="" tal:condition="python: ptype == '45'">
+    <span tal:omit-tag="" tal:condition="python: ptype == '53'">
      <div metal:use-macro="here/form-macros/macros/fencedevconfig-form"/>
     </span>
     <span tal:omit-tag="" tal:condition="python: ptype == '54'">
--- conga/luci/cluster/form-macros	2006/10/16 04:26:19	1.85
+++ conga/luci/cluster/form-macros	2006/10/16 18:35:01	1.86
@@ -805,7 +805,7 @@
 	<option name="fence_manual" value="fence_manual">Manual Fencing</option>
 </div>
 
-<div metal:define-macro="fence-form-list">
+<div metal:define-macro="fence-form-apc">
 	<div id="fence_apc" class="fencedev">
 		<table>
 			<tr>
@@ -829,7 +829,35 @@
 		</table>
 		<input type="hidden" name="fence_type" value="fence_apc" />
 	</div>
+</div>
 
+<div metal:define-macro="fence-form-mcdata">
+	<div id="fence_mcdata" class="fencedev">
+		<table>
+			<tr>
+				<td>Name</td>
+				<td><input name="name" type="text"/></td>
+			</tr>
+			<tr>
+				<td>IP Address</td>
+				<td><input name="ip_addr" type="text"/></td>
+			</tr>
+			<tr>
+				<td>Login</td>
+				<td><input name="login" type="text"/></td>
+			</tr>
+			<tr>
+				<td>Password</td>
+				<td>
+					<input name="password" autocomplete="off" type="password"/>
+				</td>
+			</tr>
+		</table>
+		<input type="hidden" name="fence_type" value="fence_mcdata" />
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-wti">
 	<div id="fence_wti" class="fencedev">
 		<table>
 			<tr>
@@ -849,7 +877,9 @@
 		</table>
 		<input type="hidden" name="fence_type" value="fence_wti" />
 	</div>
+</div>
 
+<div metal:define-macro="fence-form-ilo">
 	<div id="fence_ilo" class="fencedev">
 		<table>
 			<tr>
@@ -873,7 +903,9 @@
 		</table>
 		<input type="hidden" name="fence_type" value="fence_ilo" />
 	</div>
+</div>
 
+<div metal:define-macro="fence-form-drac">
 	<div id="fence_drac" class="fencedev">
 		<table>
 			<tr>
@@ -896,7 +928,9 @@
 		</table>
 		<input type="hidden" name="fence_type" value="fence_drac" />
 	</div>
+</div>
 
+<div metal:define-macro="fence-form-rsa">
 	<div id="fence_rsa" class="fencedev">
 		<table>
 			<tr>
@@ -920,7 +954,9 @@
 		</table>
 		<input type="hidden" name="fence_type" value="fence_rsa" />
 	</div>
+</div>
 
+<div metal:define-macro="fence-form-brocade">
 	<div id="fence_brocade" class="fencedev">
 		<table>
 			<tr>
@@ -944,7 +980,9 @@
 		</table>
 		<input type="hidden" name="fence_type" value="fence_brocade" />
 	</div>
+</div>
 
+<div metal:define-macro="fence-form-sanbox2">
 	<div id="fence_sanbox2" class="fencedev">
 		<table>
 			<tr>
@@ -968,7 +1006,9 @@
 		</table>
 		<input type="hidden" name="fence_type" value="fence_sanbox2" />
 	</div>
+</div>
 
+<div metal:define-macro="fence-form-vixel">
 	<div id="fence_vixel" class="fencedev">
 		<table>
 			<tr>
@@ -988,7 +1028,9 @@
 		</table>
 		<input type="hidden" name="fence_type" value="fence_vixel" />
 	</div>
+</div>
 
+<div metal:define-macro="fence-form-gnbd">
 	<div id="fence_gnbd" class="fencedev">
 		<table>
 			<tr>
@@ -1002,7 +1044,9 @@
 		</table>
 		<input type="hidden" name="fence_type" value="fence_gnbd" />
 	</div>
+</div>
 
+<div metal:define-macro="fence-form-egenera">
 	<div id="fence_egenera" class="fencedev">
 		<table>
 			<tr>
@@ -1020,7 +1064,9 @@
 		</table>
 		<input type="hidden" name="fence_type" value="fence_egenera" />
 	</div>
+</div>
 
+<div metal:define-macro="fence-form-bladecenter">
 	<div id="fence_bladecenter" class="fencedev">
 		<table>
 			<tr>
@@ -1044,7 +1090,9 @@
 		</table>
 		<input type="hidden" name="fence_type" value="fence_bladecenter" />
 	</div>
+</div>
 
+<div metal:define-macro="fence-form-bullpap">
 	<div id="fence_bullpap" class="fencedev">
 		<table>
 			<tr>
@@ -1068,7 +1116,9 @@
 		</table>
 		<input type="hidden" name="fence_type" value="fence_bullpap" />
 	</div>
+</div>
 
+<div metal:define-macro="fence-form-rps10">
 	<div id="fence_rps10" class="fencedev">
 		<table>
 			<tr>
@@ -1086,7 +1136,9 @@
 		</table>
 		<input type="hidden" name="fence_type" value="fence_rps10"/>
 	</div>
+</div>
 
+<div metal:define-macro="fence-form-ipmilan">
 	<div id="fence_ipmilan" class="fencedev">
 		<table>
 			<tr>
@@ -1116,6 +1168,37 @@
 	</div>
 </div>
 
+<div metal:define-macro="fence-form-manual">
+	<div id="fence_manual" class="fencedev">
+		<table>
+			<tr>
+				<td>Name</td>
+				<td><input name="name" type="text"/></td>
+			</tr>
+			<input type="hidden" name="fence_type" value="fence_manual" />
+		</table>
+	</div>
+</div>
+
+<div metal:define-macro="fence-form-list">
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-apc" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-mcdata" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-wti" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-ilo" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-drac" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-rsa" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-brocade" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-sanbox2" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-vixel" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-gnbd" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-egenera" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-bladecenter" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-bullpap" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-rps10" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-ipmilan" />
+	<tal:block metal:use-macro="here/form-macros/macros/fence-form-manual" />
+</div>
+
 <div metal:define-macro="node-form">
 	<script type="text/javascript">
 		set_page_title('Luci — cluster — nodes — properties');
@@ -2004,18 +2087,151 @@
 	<script type="text/javascript">
 		set_page_title('Luci — cluster — fence devices - Add a new fence device');
 	</script>
-	<h2>Fence Device Add Form</h2>
+
+	<h2>Add a Fence Device</h2>
+
+	<div id="invisible" class="invisible">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-list" />
+	</div>
+
+	<table id="fence_devices" class="cluster node fencedev">
+		<tfoot class="fencedev">
+		<tr class="cluster node fencedev"><td class="cluster node fencedev">
+			<input type="button" value="Add this shared fence device"
+				onClick="validate_fence_properties('fence_devices')" />
+		</td></tr>
+		</tfoot>
+		<tbody class="fencedev">
+		<tr class="cluster node info_top fencedev">
+			<td class="cluster node fencedev">
+				<span class="fencedev">
+					<strong class="cluster node">Fencing Type</strong>
+				</span>
+			</td>
+		</tr>
+		<tr class="cluster node info_top fencedev">
+			<td class="cluster node fence_main fencedev">
+				<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/fence-option-list" />
+				</select>
+				</form>
+				<div id="fence_container">
+				</div>
+			</td>
+		</tr>
+		</tbody>
+	</table>
+
+	<script type="text/javascript">
+		swap_fence_div('fence_container',
+			document.main_fence_form.select_div.options[document.main_fence_form.select_div.selectedIndex].value);
+	</script>
 </div>
 
 <div metal:define-macro="fencedevconfig-form">
 	<script type="text/javascript">
 		set_page_title('Luci — cluster — fence devices - Configure a fence device');
 	</script>
-	<h2>Fence Device Configuration Form</h2>
+
+	<h3>Configure a Fence Device</h3>
+
+	<tal:block tal:define="fencedevs python: here.getFenceInfo(modelb, None)">
+
+	<tal:block tal:condition="fencedevs/fencedevs">
+		<table class="systemsTable">
+	        <thead class="systemsTable">
+				<tr class="systemsTable">
+					<th class="systemsTable" width="100">Name</th>
+					<th class="systemsTable" width="100">Type</th>
+					<th class="systemsTable" width="75">Configure</th>
+            	</tr>
+			</thead>
+			<tr class="systemsTable" tal:repeat="f fencedevs/fencedevs">
+				<td class="systemsTable" tal:content="f/name | string:[unknown]"/>
+				<td class="systemsTable" tal:content="f/agent | string:[unknown]"/>
+				<td tal:condition="python: 'name' in f and 'clustername' in request">
+					<a class="cluster"
+						tal:attributes="
+							href python:str('/luci/cluster/index_html?pagetype=54&fencename=' + f['name'] + '&clustername=' + request['clustername'])">
+						configure
+					</a>
+				</td>
+			</tr>
+		</table>
+	</tal:block>
+	</tal:block>
 </div>
 
 <div metal:define-macro="fencedev-form">
 	<h2>Fence Device Form</h2>
+	<tal:block tal:define="global cur_fence_type python: 'fence_apc'"/>
+	
+	<tal:block tal:condition="python: cur_fence_type == 'fence_apc'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-apc" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_mcdata'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-mcdata" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_wti'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-wti" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_ilo'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-ilo" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_drac'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-drac" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_rsa'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-rsa" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_brocade'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-brocade" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_sanbox2'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-sanbox2" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_vixel'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-vixel" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_gnbd'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-gnbd" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_egenera'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-egenera" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_bladecenter'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-bladecenter" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_bullpap'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-bullpap" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_rps10'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-rps10" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_ipmilan'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-ipmilan" />
+	</tal:block>
+
+	<tal:block tal:condition="python: cur_fence_type == 'fence_manual'">
+		<tal:block metal:use-macro="here/form-macros/macros/fence-form-manual" />
+	</tal:block>
 </div>
 
 <div metal:define-macro="fencedevprocess-form">


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