From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 18 Jul 2006 19:25:21 -0000 Subject: [Cluster-devel] conga/luci/homebase form-chooser form-macros h ... Message-ID: <20060718192521.27734.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Changes by: rmccabe at sourceware.org 2006-07-18 19:25:20 Modified files: luci/homebase : form-chooser form-macros homebase_common.js index_html luci_homebase.css validate_cluster_add.js Added files: luci/homebase : validate_cluster_add_initial.js Log message: cluster pull-in frontened Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_cluster_add_initial.js.diff?cvsroot=cluster&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/form-chooser.diff?cvsroot=cluster&r1=1.8&r2=1.9 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/form-macros.diff?cvsroot=cluster&r1=1.27&r2=1.28 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/homebase_common.js.diff?cvsroot=cluster&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/index_html.diff?cvsroot=cluster&r1=1.11&r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/luci_homebase.css.diff?cvsroot=cluster&r1=1.7&r2=1.8 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_cluster_add.js.diff?cvsroot=cluster&r1=1.2&r2=1.3 /cvs/cluster/conga/luci/homebase/validate_cluster_add_initial.js,v --> standard output revision 1.1 --- conga/luci/homebase/validate_cluster_add_initial.js +++ - 2006-07-18 19:25:20.786056000 +0000 @@ -0,0 +1,22 @@ +function validateForm(form) { + var errors = new Array(); + + if (!form) + return (-1); + + var added_storage = validate_systems(form, errors); + + if (error_dialog(errors)) + return (-1); + + if (!added_storage || added_storage.length < 1) + errors.push('You have not added any cluster nodes.'); + + if (error_dialog(errors)) + return (-1); + + if (confirm('Retrieve cluster information from ' + added_storage[0] + '?')) + form.submit(); + + return (0); +} --- conga/luci/homebase/form-chooser 2006/06/20 21:21:47 1.8 +++ conga/luci/homebase/form-chooser 2006/07/18 19:25:20 1.9 @@ -5,7 +5,7 @@ - $Id: form-chooser,v 1.8 2006/06/20 21:21:47 rmccabe Exp $ + $Id: form-chooser,v 1.9 2006/07/18 19:25:20 rmccabe Exp $ @@ -40,6 +40,10 @@
+ + +
+ --- conga/luci/homebase/form-macros 2006/06/30 23:07:32 1.27 +++ conga/luci/homebase/form-macros 2006/07/18 19:25:20 1.28 @@ -1,7 +1,7 @@ - $Id: form-macros,v 1.27 2006/06/30 23:07:32 rmccabe Exp $ + $Id: form-macros,v 1.28 2006/07/18 19:25:20 rmccabe Exp $ @@ -496,17 +496,17 @@ -
- + + - + @@ -516,60 +516,144 @@
- Cluster Name - + Cluster Name: +
- System Hostname - Password + Node Hostname + Root Password -
+
Check if storage system passwords are identical.
- - - -
- -
+
 
+ + + + + + + + + + - + - + + + + + + + + +
+ +
+ +
+ + + + + +!########################### +# CLUSTER ADD FORM INITIAL # +############################ + + + + +
+ + Things to validate + - At least one node name/password are given and are valid + + + + +
+ + + + + +

Manage an Existing Cluster

+ +

Enter one node from the cluster you wish to add to the Luci management interface.

+ + - - + + + + + + + +
- - - - System HostnamePassword
+
+ Attempt to authenticate to all cluster nodes using the password provided above. +
+
- + - +
+ +
--- conga/luci/homebase/homebase_common.js 2006/06/30 17:45:59 1.1 +++ conga/luci/homebase/homebase_common.js 2006/07/18 19:25:20 1.2 @@ -85,13 +85,16 @@ var num_systems = form.numStorage.value; var state = cb.checked; - var passwd = document.getElementById('__SYSTEM0:Passwd').value; + var passwd = document.getElementById('__SYSTEM0:Passwd'); + if (!passwd || passwd.type != 'password') + return (-1); + passwd = passwd.value; if (!passwd || !state) passwd = ''; for (var i = 1 ; i < num_systems ; i++) { var element = document.getElementById('__SYSTEM' + i + ':Passwd') - if (element) { + if (element && element.type == 'password') { element.value = passwd; element.disabled = state; } @@ -161,6 +164,7 @@ if (!element) continue; + element.disabled = false; var pwdElem = document.getElementById('__SYSTEM' + i + ':Passwd'); if (!element.value) { --- conga/luci/homebase/index_html 2006/07/05 20:26:00 1.11 +++ conga/luci/homebase/index_html 2006/07/18 19:25:20 1.12 @@ -15,7 +15,7 @@ xml:lang language"> - $Id: index_html,v 1.11 2006/07/05 20:26:00 rmccabe Exp $ + $Id: index_html,v 1.12 2006/07/18 19:25:20 rmccabe Exp $ @@ -139,8 +139,6 @@ tal:define="global ret python: request.SESSION.get('checkRet')" /> - -
--- conga/luci/homebase/luci_homebase.css 2006/07/05 20:13:03 1.7 +++ conga/luci/homebase/luci_homebase.css 2006/07/18 19:25:20 1.8 @@ -1,11 +1,11 @@ -/* $Id: luci_homebase.css,v 1.7 2006/07/05 20:13:03 rmccabe Exp $ */ +/* $Id: luci_homebase.css,v 1.8 2006/07/18 19:25:20 rmccabe Exp $ */ *.errmsgs,*.retmsgs { list-style-image: none !important; list-style-type: none !important; } -*.errmsgs { +*.error, *.errmsgs { color: red !important; } --- conga/luci/homebase/validate_cluster_add.js 2006/07/05 20:13:03 1.2 +++ conga/luci/homebase/validate_cluster_add.js 2006/07/18 19:25:20 1.3 @@ -4,19 +4,12 @@ if (!form) return (-1); - if (form.clusterList) { - i = form.clusterList.selectedIndex; - if (i < 0 || !form.clusterList[i]) - errors.push('You have not selected a valid cluster.'); - else - clusterName = form.clusterList[i].value; - } else if (form.clusterName) - clusterName = form.clusterName.value; - - if (str_is_blank(clusterName)) { + var clusterName = form.clusterName; + if (!clusterName || str_is_blank(clusterName.value)) { errors.push('No cluster name was given.'); } else { - var invalid_chars = str_is_valid(form.clusterName.value, '/[0-9A-Za-z_. -]/g'); + clusterName = clusterName.value; + var invalid_chars = str_is_valid(clusterName, '/[0-9A-Za-z_. -]/g'); if (invalid_chars) errors.push('The cluster name you gave contains the following invalid characters: "' + invalid_chars + '".'); } @@ -32,7 +25,7 @@ if (error_dialog(errors)) return (-1); - if (confirm("Submit form?")) + if (confirm('Add the cluster \"' + clusterName + '\" to the Luci management interface?')) form.submit(); return (0);