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:37:21 -0000 [thread overview]
Message-ID: <20070809043721.30139.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2007-08-09 04:37:21
Modified files:
luci/cluster : form-macros validate_xvm_key.js
luci/site/luci/Extensions: StorageReport.py cluster_adapters.py
luci/storage : form-macros
Log message:
pull in fixes from the RHEL5 branch
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.206&r2=1.207
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_xvm_key.js.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/StorageReport.py.diff?cvsroot=cluster&r1=1.25&r2=1.26
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.266&r2=1.267
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/form-macros.diff?cvsroot=cluster&r1=1.22&r2=1.23
--- conga/luci/cluster/form-macros 2007/08/08 21:00:06 1.206
+++ conga/luci/cluster/form-macros 2007/08/09 04:37:20 1.207
@@ -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:00:06 1.1
+++ conga/luci/cluster/validate_xvm_key.js 2007/08/09 04:37:20 1.2
@@ -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/StorageReport.py 2007/07/27 16:43:47 1.25
+++ conga/luci/site/luci/Extensions/StorageReport.py 2007/08/09 04:37:20 1.26
@@ -2060,7 +2060,7 @@
length_in_bytes = 0
for t in mapper_data['sources']:
length_in_bytes += int(t['props']['size']['value'])
- ppb = (length * 1.0) / length_in_bytes # pixels per byte
+ ppb = (length * 1.0) / max(0.00001, length_in_bytes) # pixels per byte
lower_cyl['offset'] = int(lower_cyl['offset'] * ppb)
for d in lower_cyl['cyls']:
d['beg'] = int(d['beg'] * ppb)
--- conga/luci/site/luci/Extensions/cluster_adapters.py 2007/08/08 21:26:37 1.266
+++ conga/luci/site/luci/Extensions/cluster_adapters.py 2007/08/09 04:37:20 1.267
@@ -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))
--- conga/luci/storage/form-macros 2007/06/27 08:14:22 1.22
+++ conga/luci/storage/form-macros 2007/08/09 04:37:21 1.23
@@ -896,7 +896,7 @@
<div metal:use-macro="here/form-macros/macros/form-scripts"/>
<span tal:omit-tag=""
tal:condition="not: mapper/new_sources">
- There is no available <span tal:replace="mapper/pretty_sources_name"/> to be added to <span tal:replace="mapper/pretty_type"/> '<span tal:replace="mapper/pretty_name"/>'.
+ There are no available <span tal:replace="mapper/pretty_sources_name"/> to be added to <span tal:replace="mapper/pretty_type"/> '<span tal:replace="mapper/pretty_name"/>'.
<br/>
<br/>
<a tal:define="go_to_mapper_url python:'./?pagetype=52&mapper_type=' + mapper['mapper_type'] + '&mapper_id=' + mapper['mapper_id'] + '&storagename=' + storagename"
next reply other threads:[~2007-08-09 4:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-09 4:37 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:34 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=20070809043721.30139.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.