From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci cluster/form-macros cluster/validat ...
Date: 9 Aug 2007 04:34:53 -0000 [thread overview]
Message-ID: <20070809043453.31019.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2007-08-09 04:34:53
Modified files:
luci/cluster : form-macros validate_xvm_key.js
luci/site/luci/Extensions: cluster_adapters.py
Log message:
minor cleanups for 230451 fix
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.90.2.28&r2=1.90.2.29
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_xvm_key.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.2&r2=1.1.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.120.2.36&r2=1.120.2.37
--- conga/luci/cluster/form-macros 2007/08/08 21:18:46 1.90.2.28
+++ conga/luci/cluster/form-macros 2007/08/09 04:34:49 1.90.2.29
@@ -982,7 +982,7 @@
<tr id="fence_xvm_config" class="invisible">
<td class="systemsTable" colspan="2" id="fence_xvm_config">
- <table class="systemsTable">
+ <table class="systemsTable" width="100%">
<tr class="systemsTable">
<td class="systemsTable">
<div id="fence_xvm_hosts" />
--- conga/luci/cluster/validate_xvm_key.js 2007/08/08 21:20:37 1.1.2.2
+++ conga/luci/cluster/validate_xvm_key.js 2007/08/09 04:34:51 1.1.2.3
@@ -12,16 +12,21 @@
var node_num = 0;
var hclu_elem = document.getElementById('host_cluster_name');
- if (hclu_elem) {
+ if (hclu_elem && hclu_elem.value) {
++node_num;
url += '&node' + node_num + '=' + hclu_elem.value;
}
var vclu_elem = document.getElementById('virt_cluster_name');
- if (vclu_elem) {
+ if (vclu_elem && vclu_elem.value) {
++node_num;
url += '&node' + node_num + '=' + vclu_elem.value;
}
- initiate_async_get(url, cluster_member_callback);
+
+ if (!node_num) {
+ alert('No node names were entered');
+ } else {
+ initiate_async_get(url, cluster_member_callback);
+ }
}
function cluster_member_callback() {
@@ -50,9 +55,15 @@
return;
}
- obj = obj.responseXML;
+ try {
+ obj = obj.responseXML.getElementsByTagName('dict')[0];
+ } catch (e) {
+ alert('Received a malformed response from the luci server.');
+ return;
+ }
+
var clusters = [];
- var dict_tags = obj.firstChild.getElementsByTagName('dict');
+ var dict_tags = obj.getElementsByTagName('dict');
for (var i = 0 ; i < dict_tags.length ; i++) {
try {
var cnode_names = [];
@@ -81,31 +92,33 @@
for (var i = 0 ; i < clusters.length ; i++) {
var cnode_list = clusters[i][1];
- var div = document.createElement('div');
- var p = document.createElement('p');
var span = document.createElement('strong');
- var ul = document.createElement('ul');
-
- p.className = 'cluster';
span.className = 'cluster';
- span.textContent = 'Cluster: ' + clusters[i][0];
- p.appendChild(span);
- div.appendChild(p);
+ var txtnode = document.createTextNode('Cluster: ' + clusters[i][0]);
+ span.appendChild(txtnode);
+
+ var ul = document.createElement('ul');
+ ul.className = 'vanilla';
for (var j = 0 ; j < cnode_list.length ; j++) {
var li = document.createElement('li');
var input = document.createElement('input');
- var lispan = document.createElement('span');
+ var litxt = document.createTextNode(cnode_list[j]);
+
input.type = 'checkbox';
input.name = '__NODE_HOSTNAME__';
input.value = cnode_list[j];
input.checked = 'checked';
- lispan.textContent = cnode_list[j];
+
li.appendChild(input);
- li.appendChild(lispan);
+ li.appendChild(litxt);
ul.appendChild(li);
}
+
+ var div = document.createElement('div');
+ div.className = 'fence';
+ div.appendChild(span);
div.appendChild(ul);
xvm_div_elem.appendChild(div);
}
@@ -115,5 +128,9 @@
form_elem.pagetype.value = '60';
fc_elem.className = 'invisible';
xvm_hidden_elem.className = 'systemsTable';
+ var applyelem = document.getElementById('fence_config_submit');
+ if (applyelem) {
+ applyelem.disabled = true;
+ }
}
}
--- conga/luci/site/luci/Extensions/cluster_adapters.py 2007/08/08 21:14:38 1.120.2.36
+++ conga/luci/site/luci/Extensions/cluster_adapters.py 2007/08/09 04:34:52 1.120.2.37
@@ -27,8 +27,6 @@
from homebase_adapters import parseHostForm
from LuciClusterActions import propagateClusterConfAsync
-from LuciZopeAsync import get_cluster_nodes_async
-
from LuciClusterInfo import getClusterInfo, \
getModelBuilder, LuciExtractCluModel
@@ -2171,8 +2169,8 @@
luci_log.info('Setting fence_xvm key for node "%s" failed' % i)
continue
- set_node_flag(self, clustername, i, batch_num,
- FENCE_XVM_KEY_CREATE, 'Creating a fence_xvm key file')
+ set_node_flag(self, clustername, i, batch_num, FENCE_XVM_KEY_CREATE,
+ 'Creating fence_xvm key file for host "%s"' % i)
request.RESPONSE.redirect('%s?pagetype=%s&clustername=%s&tab=2&busyfirst=true' \
% (baseurl, CLUSTER_CONFIG, clustername))
next reply other threads:[~2007-08-09 4:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-09 4:34 rmccabe [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-08-24 22:01 [Cluster-devel] conga/luci cluster/form-macros cluster/validat rmccabe
2007-08-24 21:55 rmccabe
2007-08-24 18:42 rmccabe
2007-08-24 18:40 rmccabe
2007-08-09 4:37 rmccabe
2007-02-24 7:02 rmccabe
2007-02-16 5:29 rmccabe
2007-02-16 5:26 rmccabe
2007-02-12 23:28 rmccabe
2007-02-12 23:26 rmccabe
2007-02-09 18:32 rmccabe
2007-02-09 18:30 rmccabe
2007-02-08 3:43 rmccabe
2007-02-08 2:34 rmccabe
2007-02-01 23:48 rmccabe
2007-01-25 19:55 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=20070809043453.31019.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).