From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 5 Jul 2006 20:13:04 -0000 Subject: [Cluster-devel] conga/luci cluster/form-macros cluster/index_h ... Message-ID: <20060705201304.23105.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-05 20:13:03 Modified files: luci/cluster : form-macros index_html main_footer luci/homebase : luci_homebase.css validate_cluster_add.js luci/site/luci/Extensions: homebase_adapters.py Log message: cluster create and add node to cluster frontend Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/index_html.diff?cvsroot=cluster&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/main_footer.diff?cvsroot=cluster&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/luci_homebase.css.diff?cvsroot=cluster&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_cluster_add.js.diff?cvsroot=cluster&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/homebase_adapters.py.diff?cvsroot=cluster&r1=1.11&r2=1.12 --- conga/luci/cluster/form-macros 2006/06/30 17:00:02 1.1 +++ conga/luci/cluster/form-macros 2006/07/05 20:13:03 1.2 @@ -66,7 +66,78 @@

Cluster Form

-

Cluster Add Form

+ + + +
+ + +

Add a Cluster

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ Cluster Name + +
+
System HostnamePassword
+
+ Check if storage system passwords are identical. +
+
+
+ +
+
+ + + +
+ + + +
+ + + +
+ +
+ +
+

Cluster Configuration Form

@@ -120,9 +191,67 @@

Node Configuration Form

+
-

Node Add Form

+ + + + +
+ + +

Add a Node to a Cluster

+ + + + + + + + + + + + + + + + + + + + + + +
+
+ Cluster Name + +
+
System HostnamePassword
+
+ Check if storage system passwords are identical. +
+
+
+ +
+
+ + + +
+ +
+ +
+
+

Node Process Form

--- conga/luci/cluster/index_html 2006/06/30 17:00:02 1.1 +++ conga/luci/cluster/index_html 2006/07/05 20:13:03 1.2 @@ -54,6 +54,7 @@ A slot where you can insert CSS in the header from a template + --- conga/luci/cluster/main_footer 2006/06/30 17:00:02 1.1 +++ conga/luci/cluster/main_footer 2006/07/05 20:13:03 1.2 @@ -13,17 +13,11 @@ 2000- - by - - Red Hat, Luci, Ricci, - - et al. + Red Hat, Inc.

- - Distributed under the @@ -34,4 +28,4 @@

- \ No newline at end of file + --- conga/luci/homebase/luci_homebase.css 2006/06/22 03:49:54 1.6 +++ conga/luci/homebase/luci_homebase.css 2006/07/05 20:13:03 1.7 @@ -1,4 +1,4 @@ -/* $Id: luci_homebase.css,v 1.6 2006/06/22 03:49:54 rmccabe Exp $ */ +/* $Id: luci_homebase.css,v 1.7 2006/07/05 20:13:03 rmccabe Exp $ */ *.errmsgs,*.retmsgs { list-style-image: none !important; @@ -139,6 +139,3 @@ margin-top: .25em !important; margin-bottom: .25em !important; } - -*.hbText { -} --- conga/luci/homebase/validate_cluster_add.js 2006/06/30 18:06:10 1.1 +++ conga/luci/homebase/validate_cluster_add.js 2006/07/05 20:13:03 1.2 @@ -1,9 +1,19 @@ function validateForm(form) { var errors = new Array(); - if (!form || !form.clusterName || - str_is_blank(form.clusterName.value)) - { + 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)) { errors.push('No cluster name was given.'); } else { var invalid_chars = str_is_valid(form.clusterName.value, '/[0-9A-Za-z_. -]/g'); @@ -16,6 +26,12 @@ 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("Submit form?")) form.submit(); --- conga/luci/site/luci/Extensions/homebase_adapters.py 2006/06/30 23:07:32 1.11 +++ conga/luci/site/luci/Extensions/homebase_adapters.py 2006/07/05 20:13:03 1.12 @@ -530,7 +530,8 @@ for i in params: cur['absolute_url'] += '&' + cgi.escape(i) + '=' + cgi.escape(params[i]) else: - cur['base_url'] = cur['absolute_url'] + if cur and 'absolute_url' in cur: + cur['base_url'] = cur['absolute_url'] ret['children'] = temp return ret