From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/cluster form-macros index_html fenc ...
Date: 29 Nov 2006 18:39:52 -0000 [thread overview]
Message-ID: <20061129183952.20166.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-11-29 18:39:51
Modified files:
luci/cluster : form-macros index_html
Added files:
luci/cluster : fence_device.js
Log message:
fence device config updates
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence_device.js.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.109&r2=1.110
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/index_html.diff?cvsroot=cluster&r1=1.28&r2=1.29
/cvs/cluster/conga/luci/cluster/fence_device.js,v --> standard output
revision 1.1
--- conga/luci/cluster/fence_device.js
+++ - 2006-11-29 18:39:52.053462000 +0000
@@ -0,0 +1,19 @@
+function swap_fence_div(container_id, element_id) {
+ var container_element = document.getElementById(container_id)
+ if (!container_element) {
+ return (-1);
+ }
+
+ var child_element = document.getElementById(element_id);
+ if (!child_element) {
+ if (container_element.firstChild)
+ container_element.removeChild(container_element.firstChild);
+ return (-1);
+ }
+
+ if (container_element.firstChild)
+ container_element.removeChild(container_element.firstChild);
+ var target = child_element.cloneNode(1);
+ target.id = null;
+ container_element.appendChild(target);
+}
--- conga/luci/cluster/form-macros 2006/11/28 19:39:31 1.109
+++ conga/luci/cluster/form-macros 2006/11/29 18:39:50 1.110
@@ -1136,7 +1136,9 @@
<option name="fence_manual" value="fence_manual">Manual Fencing</option>
</div>
-<div metal:define-macro="fence-form-apc">
+<div metal:define-macro="fence-form-apc"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_apc" class="fencedev">
<table>
<tr tal:condition="exists: cur_fence_type">
@@ -1176,7 +1178,9 @@
</div>
</div>
-<div metal:define-macro="fence-form-mcdata">
+<div metal:define-macro="fence-form-mcdata"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_mcdata" class="fencedev">
<table>
<tr tal:condition="exists: cur_fence_type">
@@ -1216,7 +1220,9 @@
</div>
</div>
-<div metal:define-macro="fence-form-wti">
+<div metal:define-macro="fence-form-wti"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_wti" class="fencedev">
<table>
<tr tal:condition="exists: cur_fence_type">
@@ -1249,7 +1255,9 @@
</div>
</div>
-<div metal:define-macro="fence-form-ilo">
+<div metal:define-macro="fence-form-ilo"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_ilo" class="fencedev">
<table>
<tr tal:condition="exists: cur_fence_type">
@@ -1289,7 +1297,9 @@
</div>
</div>
-<div metal:define-macro="fence-form-drac">
+<div metal:define-macro="fence-form-drac"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_drac" class="fencedev">
<table>
<tr tal:condition="exists: cur_fence_type">
@@ -1328,7 +1338,9 @@
</div>
</div>
-<div metal:define-macro="fence-form-rsa">
+<div metal:define-macro="fence-form-rsa"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_rsa" class="fencedev">
<table>
<tr tal:condition="exists: cur_fence_type">
@@ -1368,7 +1380,9 @@
</div>
</div>
-<div metal:define-macro="fence-form-brocade">
+<div metal:define-macro="fence-form-brocade"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_brocade" class="fencedev">
<table>
<tr tal:condition="exists: cur_fence_type">
@@ -1408,7 +1422,9 @@
</div>
</div>
-<div metal:define-macro="fence-form-sanbox2">
+<div metal:define-macro="fence-form-sanbox2"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_sanbox2" class="fencedev">
<table>
<tr tal:condition="exists: cur_fence_type">
@@ -1445,7 +1461,9 @@
</div>
</div>
-<div metal:define-macro="fence-form-vixel">
+<div metal:define-macro="fence-form-vixel"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_vixel" class="fencedev">
<table>
<tr tal:condition="exists: cur_fence_type">
@@ -1478,7 +1496,9 @@
</div>
</div>
-<div metal:define-macro="fence-form-gnbd">
+<div metal:define-macro="fence-form-gnbd"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_gnbd" class="fencedev">
<table>
<tr tal:condition="exists: cur_fence_type">
@@ -1504,7 +1524,9 @@
</div>
</div>
-<div metal:define-macro="fence-form-egenera">
+<div metal:define-macro="fence-form-egenera"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_egenera" class="fencedev">
<table>
<tr tal:condition="exists: cur_fence_type">
@@ -1537,7 +1559,9 @@
</div>
</div>
-<div metal:define-macro="fence-form-bladecenter">
+<div metal:define-macro="fence-form-bladecenter"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_bladecenter" class="fencedev">
<table>
<tr tal:condition="exists: cur_fence_type">
@@ -1577,7 +1601,9 @@
</div>
</div>
-<div metal:define-macro="fence-form-bullpap">
+<div metal:define-macro="fence-form-bullpap"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_bullpap" class="fencedev">
<table>
<tr tal:condition="exists: cur_fence_type">
@@ -1617,7 +1643,9 @@
</div>
</div>
-<div metal:define-macro="fence-form-rps10">
+<div metal:define-macro="fence-form-rps10"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_rps10" class="fencedev">
<table>
<tr tal:condition="exists: cur_fence_type">
@@ -1650,19 +1678,25 @@
</div>
</div>
-<div metal:define-macro="fence-form-xvm">
+<div metal:define-macro="fence-form-xvm"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_xvm" class="fencedev">
-
</div>
</div>
-<div metal:define-macro="fence-form-scsi">
+<div metal:define-macro="fence-form-scsi"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_scsi" class="fencedev">
-
</div>
</div>
-<div metal:define-macro="fence-form-ipmilan">
+<div metal:define-macro="fence-form-ipmilan"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_ipmilan" class="fencedev">
<table>
<tr tal:condition="exists: cur_fence_type">
@@ -1706,7 +1740,9 @@
</div>
</div>
-<div metal:define-macro="fence-form-manual">
+<div metal:define-macro="fence-form-manual"
+ tal:attributes="id cur_fencedev/name | nothing">
+
<div id="fence_manual" class="fencedev">
<table>
<tr tal:condition="exists: cur_fence_type">
@@ -1761,6 +1797,47 @@
<tal:block metal:use-macro="here/form-macros/macros/fence-form-scsi" />
</div>
+<div metal:define-macro="shared-fence-device-list">
+<tal:block tal:condition="exists: cur_fencedev">
+ <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_apc'">
+ <tal:block metal:use-macro="here/form-macros/macros/fence-form-apc" />
+ </tal:block>
+ <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_mcdata'">
+ <tal:block metal:use-macro="here/form-macros/macros/fence-form-mcdata" />
+ </tal:block>
+ <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_wti'">
+ <tal:block metal:use-macro="here/form-macros/macros/fence-form-wti" />
+ </tal:block>
+ <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_brocade'">
+ <tal:block metal:use-macro="here/form-macros/macros/fence-form-brocade" />
+ </tal:block>
+ <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_sanbox2'">
+ <tal:block metal:use-macro="here/form-macros/macros/fence-form-sanbox2" />
+ </tal:block>
+ <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_vixel'">
+ <tal:block metal:use-macro="here/form-macros/macros/fence-form-vixel" />
+ </tal:block>
+ <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_gnbd'">
+ <tal:block metal:use-macro="here/form-macros/macros/fence-form-gnbd" />
+ </tal:block>
+ <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_egenera'">
+ <tal:block metal:use-macro="here/form-macros/macros/fence-form-egenera" />
+ </tal:block>
+ <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_bladecenter'">
+ <tal:block metal:use-macro="here/form-macros/macros/fence-form-bladecenter" />
+ </tal:block>
+ <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_bullpap'">
+ <tal:block metal:use-macro="here/form-macros/macros/fence-form-bullpap" />
+ </tal:block>
+ <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_xvm'">
+ <tal:block metal:use-macro="here/form-macros/macros/fence-form-xvm" />
+ </tal:block>
+ <tal:block tal:condition="python: cur_fencedev['agent'] == 'fence_scsi'">
+ <tal:block metal:use-macro="here/form-macros/macros/fence-form-scsi" />
+ </tal:block>
+</tal:block>
+</div>
+
<div metal:define-macro="fence-instance-form-apc">
<div id="fence_apc_instance" class="fencedev">
<table>
@@ -1939,6 +2016,9 @@
</div>
<div metal:define-macro="node-form">
+ <script type="text/javascript"
+ src="/luci/cluster/fence_device.js">
+ </script>
<script type="text/javascript">
set_page_title('Luci ??? cluster ??? nodes ??? properties');
</script>
@@ -2119,13 +2199,26 @@
</span>
</td>
</tr>
+
<tr class="cluster node info_top fencedev">
<td class="cluster node fence_main fencedev">
+ <tal:block tal:repeat="cur_fencedev fencedevinfo/fencedevs">
+ <div class="invisible" id="shared_fence_devices">
+ <tal:block metal:use-macro="here/form-macros/macros/shared-fence-device-list" />
+ </div>
+ </tal:block>
+
<form name="main_fence_form">
<select name="select_div"
onChange="swap_fence_div('fence_container',
this.options[this.selectedIndex].value)">
<option value="fence-form-new-device">------ Use an existing Fence Device ------</option>
+ <tal:block tal:repeat="f fencedevinfo/fencedevs">
+ <option class="shared_fencedev"
+ tal:attributes="value f/name"
+ tal:content="python: f['name'] + ' (' + f['pretty_name'] + ')'"
+ />
+ </tal:block>
<option value="fence-form-new-instance">------ Create a new Fence Device ------</option>
<tal:block metal:use-macro="here/form-macros/macros/fence-option-list" />
</select>
@@ -2158,6 +2251,9 @@
</div>
<div metal:define-macro="nodes-form">
+ <script type="text/javascript"
+ src="/luci/cluster/fence_device.js">
+ </script>
<script type="text/javascript">
set_page_title('Luci ??? cluster ??? nodes');
</script>
@@ -2903,6 +2999,9 @@
</div>
<div metal:define-macro="fencedevadd-form">
+ <script type="text/javascript"
+ src="/luci/cluster/fence_device.js">
+ </script>
<script type="text/javascript">
set_page_title('Luci ??? cluster ??? fence devices - Add a new fence device');
</script>
--- conga/luci/cluster/index_html 2006/11/27 19:56:12 1.28
+++ conga/luci/cluster/index_html 2006/11/29 18:39:50 1.29
@@ -100,26 +100,6 @@
window.open(href, windowname, 'width=500,height=500,scrollbars=yes');
return false;
}
-
- function swap_fence_div(container_id, element_id) {
- var container_element = document.getElementById(container_id)
- if (!container_element) {
- return (-1);
- }
-
- var child_element = document.getElementById(element_id);
- if (!child_element) {
- if (container_element.firstChild)
- container_element.removeChild(container_element.firstChild);
- return (-1);
- }
-
- if (container_element.firstChild)
- container_element.removeChild(container_element.firstChild);
- var target = child_element.cloneNode(1);
- target.id = null;
- container_element.appendChild(target);
- }
//-->
</SCRIPT>
<metal:javascriptslot define-slot="javascript_head_slot" />
reply other threads:[~2006-11-29 18:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20061129183952.20166.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.