From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci cluster/fence_device.js cluster/for ...
Date: 8 Jan 2007 21:58:34 -0000 [thread overview]
Message-ID: <20070108215834.19128.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2007-01-08 21:58:34
Modified files:
luci/cluster : fence_device.js form-macros
luci/homebase : luci_homebase.css
luci/site/luci/Extensions: homebase_adapters.py
Log message:
more per-node fence updates
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence_device.js.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.144&r2=1.145
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/luci_homebase.css.diff?cvsroot=cluster&r1=1.31&r2=1.32
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/homebase_adapters.py.diff?cvsroot=cluster&r1=1.45&r2=1.46
--- conga/luci/cluster/fence_device.js 2007/01/05 23:44:10 1.4
+++ conga/luci/cluster/fence_device.js 2007/01/08 21:58:33 1.5
@@ -69,11 +69,19 @@
var cloned_iform = fi_form.cloneNode(1);
cloned_iform.id = container_id + '_0';
cloned_iform.name = cloned_iform.id;
- cloned_iform.className = '';
+ 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;
+ }
+ }
idiv.appendChild(form_elem);
container_element.appendChild(idiv);
@@ -109,6 +117,7 @@
var level_num_fences = num_fences_level[fence_level - 1];
div_elem.id = 'fence' + fence_level + '_' + level_num_fences;
+ div_elem.className = 'fence_level';
chooser_elem = chooser_elem.cloneNode(1);
chooser_elem.id = null;
chooser_elem.className = null;
@@ -168,6 +177,6 @@
master_form.fence_xml.value = '<formlist>' + form_xml + '</formlist>';
- if (confirm('Submit: ' + master_form.fence_xml.value))
+ if (confirm('Update this node\'s fence configuration?'))
master_form.submit();
}
--- conga/luci/cluster/form-macros 2007/01/07 17:36:17 1.144
+++ conga/luci/cluster/form-macros 2007/01/08 21:58:33 1.145
@@ -1283,6 +1283,16 @@
</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>
@@ -1341,6 +1351,16 @@
</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>
@@ -1390,6 +1410,16 @@
</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>
@@ -1594,6 +1624,16 @@
</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>
@@ -1647,6 +1687,16 @@
</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>
@@ -1696,6 +1746,16 @@
</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>
@@ -1736,6 +1796,16 @@
</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>
@@ -1785,6 +1855,16 @@
</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>
@@ -1835,6 +1915,16 @@
</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>
@@ -1893,6 +1983,16 @@
</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>
@@ -1966,6 +2066,16 @@
</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>
@@ -1997,6 +2107,16 @@
</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>
@@ -2834,8 +2954,9 @@
<div id="fence_list_level1" tal:define="global cur_fence_num python: 0">
<tal:block tal:condition="exists: fenceinfo/level1">
- <div tal:repeat="cur_fencedev fenceinfo/level1"
- tal:attributes="id python: 'fence1_' + str(cur_fence_num)">
+ <div class="fence_level"
+ tal:repeat="cur_fencedev fenceinfo/level1"
+ tal:attributes="id python: 'fence1_' + str(cur_fence_num)">
<tal:block tal:define="
cur_fence_dev_id python: 'fence1_' + str(cur_fence_num);
@@ -2844,6 +2965,11 @@
<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
@@ -2855,25 +2981,27 @@
<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">
+ <div class="fence_instance"
+ 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" />
+ 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" />
+ <input type="button" name="remove_fence_dev"
+ value="Remove this fence device"
+ tal:attributes="
+ onclick python: 'del_fence(\'' + cur_fence_dev_id + '\')'" />
</div>
-
<tal:block tal:define="global cur_fence_num python: cur_fence_num + 1" />
</tal:block>
</div>
@@ -2887,16 +3015,6 @@
<input type="button" value="Add a fence to this level"
onclick="add_node_fence_device(1)" />
</div>
- <div class="hbSubmit">
- <form name="fence1_master" method="post" action="">
- <input type="hidden" name="fence_level" value="1" />
- <input type="hidden" name="fence_xml" value="" />
- <input type="hidden" name="pagetype" value="58" />
- <input type="button"
- value="Update fence properties"
- onclick="validate_fence(this.form, 'fence_list_level1')" />
- </form>
- </div>
</td>
<td class="cluster node fence_main fence">
@@ -2905,8 +3023,9 @@
<div id="fence_list_level2" tal:define="global cur_fence_num python: 0">
<tal:block tal:condition="exists: fenceinfo/level2">
- <div tal:repeat="cur_fencedev fenceinfo/level2"
- tal:attributes="id python: 'fence2_' + str(cur_fence_num)">
+ <div class="fence_level"
+ tal:repeat="cur_fencedev fenceinfo/level2"
+ tal:attributes="id python: 'fence2_' + str(cur_fence_num)">
<tal:block tal:define="
cur_fence_dev_id python: 'fence2_' + str(cur_fence_num);
@@ -2926,23 +3045,26 @@
<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">
+ <div class="fence_instance"
+ 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" />
+ 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" />
+ <input type="button" name="remove_fence_dev"
+ value="Remove this fence device"
+ tal:attributes="
+ onclick python: 'del_fence(\'' + cur_fence_dev_id + '\')'" />
</div>
<tal:block tal:define="global cur_fence_num python: cur_fence_num + 1" />
</tal:block>
@@ -2957,13 +3079,29 @@
<input type="button" value="Add a fence to this level"
onclick="add_node_fence_device(2)" />
</div>
- <div class="hbSubmit">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div class="fence_control">
+ <form name="fence1_master" method="post" action="">
+ <input type="hidden" name="fence_level" value="1" />
+ <input type="hidden" name="fence_xml" value="" />
+ <input type="hidden" name="pagetype" value="58" />
+ <input type="button"
+ value="Update main fence properties"
+ onclick="validate_fence(this.form, 'fence_list_level1')" />
+ </form>
+ </div>
+ </td>
+ <td>
+ <div class="fence_control">
<form name="fence2_master" method="post" action="">
<input type="hidden" name="fence_level" value="2" />
<input type="hidden" name="fence_xml" value="" />
<input type="hidden" name="pagetype" value="58" />
<input type="button"
- value="Update fence properties"
+ value="Update backup fence properties"
onclick="validate_fence(this.form, 'fence_list_level2')" />
</form>
</div>
@@ -3128,7 +3266,7 @@
<h2>Add a node to <span tal:replace="cur_cluster_name | string:this cluster" /></h2>
<input type="hidden" name="clusterName"
- tal:attributes="value cur_cluster_name | string:[unknown]" />
+ tal:attributes="value cur_cluster_name | string:[unknown]" />
<input name="pagetype" type="hidden"
tal:attributes="value request/form/pagetype | request/pagetype | string:15" />
@@ -3440,7 +3578,7 @@
</div>
<div metal:define-macro="xenvmprocess">
- <span tal:define="retrn python:here.processXenVM(request)"/>
+ <span tal:define="retrn python:here.processXenVM(request)"/>
</div>
--- conga/luci/homebase/luci_homebase.css 2006/12/21 05:08:48 1.31
+++ conga/luci/homebase/luci_homebase.css 2007/01/08 21:58:33 1.32
@@ -28,6 +28,17 @@
width: 700px;
}
+div.fence_level {
+ padding: .4045em;
+ border-bottom: 1px solid #cccccc;
+}
+
+div.fence_instance {
+ margin-left: 1em;
+ padding-left: .4045em;
+ border-left: 1px solid #cccccc;
+}
+
div.fence,
td.fence {
padding-top: .309em;
--- conga/luci/site/luci/Extensions/homebase_adapters.py 2007/01/08 19:46:50 1.45
+++ conga/luci/site/luci/Extensions/homebase_adapters.py 2007/01/08 21:58:34 1.46
@@ -794,6 +794,7 @@
def validateAuthenticate(self, request):
try:
request.SESSION.delete('auth_systems')
+ request.SESSION.delete('auth_status')
except:
pass
@@ -874,7 +875,6 @@
else:
try:
request.SESSION.delete('auth_systems')
- del auth_systems
except:
pass
next reply other threads:[~2007-01-08 21:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-08 21:58 rmccabe [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-08-08 21:18 [Cluster-devel] conga/luci cluster/fence_device.js cluster/for rmccabe
2007-01-25 21:03 rmccabe
2007-01-10 23:49 rmccabe
2007-01-10 23:47 rmccabe
2007-01-10 22:53 rmccabe
2007-01-05 23:44 rmccabe
2006-12-01 14:56 rmccabe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070108215834.19128.qmail@sourceware.org \
--to=rmccabe@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).