All of lore.kernel.org
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci cluster/form-macros cluster/index_h ...
Date: 5 Jul 2006 20:13:04 -0000	[thread overview]
Message-ID: <20060705201304.23105.qmail@sourceware.org> (raw)

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 @@
    <h2>Cluster Form</h2>
   </div>
   <div metal:define-macro="clusteradd-form">
-   <h2>Cluster Add Form</h2>
+	<script type="text/javascript" src="/luci/homebase/homebase_common.js">
+	</script>
+	<script type="text/javascript" src="/luci/homebase/validate_cluster_add.js">
+	</script>
+
+	<form name="adminform" action="" method="post">
+		<input name="numStorage" id="numStorage" type="hidden" value="3" />
+
+		<h2>Add a Cluster</h2>
+
+		<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+			<thead class="systemsTable">
+				<tr class="systemsTable"><td class="systemsTable" colspan="2">
+					<div class="systemsTableTop">
+						<strong>Cluster Name</strong>
+						<input class="hbInputSys" type="text" id="clusterName" name="clusterName" />
+					</div>
+				</td></tr>
+				<tr class="systemsTable">
+					<th class="systemsTable">System Hostname</th>
+					<th class="systemsTable">Password</th>
+				</tr>
+			</thead>
+
+			<tfoot class="systemsTable">
+				<tr class="systemsTable"><td colspan="2" class="systemsTable">
+					<div>
+						<input type="checkbox" name="allSameCheckBox" id="allSameCheckBox" onClick="allPasswdsSame(adminform);"/> Check if storage system passwords are identical.
+					</div>
+				</td></tr>
+
+				<tr class="systemsTable"><td class="systemsTable" colspan="2">
+					<div class="systemsTableEnd">
+						<input type="button" class="hbSubmit" value="Add Another Row" onClick="addSystem(adminform);" />
+					</div>
+				</td></tr>
+			</tfoot>
+
+			<tbody class="systemsTable">
+				<tr class="systemsTable">
+					<td class="systemsTable">
+						<input class="hbInputSys" type="text" id="__SYSTEM0:Addr" name="__SYSTEM0:Addr" />
+					</td>
+					<td class="systemsTable">
+						<input type="password" id="__SYSTEM0:Passwd" name="__SYSTEM0:Passwd" class="hbInputPass" onChange="pwd0Change(adminform);" />
+					</td>
+				</tr>
+
+				<tr class="systemsTable">
+					<td class="systemsTable">
+						<input class="hbInputSys" type="text" id="__SYSTEM1:Addr" name="__SYSTEM1:Addr" />
+					</td>
+					<td class="systemsTable">
+						<input type="password" id="__SYSTEM1:Passwd" name="__SYSTEM1:Passwd" class="hbInputPass" onChange="pwd0Change(adminform);" />
+					</td>
+				</tr>
+
+				<tr class="systemsTable">
+					<td class="systemsTable">
+						<input class="hbInputSys" type="text" id="__SYSTEM2:Addr" name="__SYSTEM2:Addr" />
+					</td>
+					<td class="systemsTable">
+						<input type="password" id="__SYSTEM2:Passwd" name="__SYSTEM2:Passwd" class="hbInputPass" onChange="pwd0Change(adminform);" />
+					</td>
+				</tr>
+			</tbody>
+		</table>
+
+		<div class="hbSubmit" id="hbSubmit">
+			<input type="button" class="hbSubmit" name="Submit" value="Submit" onClick="validateForm(document.adminform);" />
+		</div>
+	</form>
   </div>
   <div metal:define-macro="clusterconfig-form">
    <h2>Cluster Configuration Form</h2>
@@ -120,9 +191,67 @@
   <div metal:define-macro="nodeconfig-form">
    <h2>Node Configuration Form</h2>
   </div>
+
   <div metal:define-macro="nodeadd-form">
-   <h2>Node Add Form</h2>
+	<script type="text/javascript" src="/luci/homebase/homebase_common.js">
+	</script>
+
+	<script type="text/javascript" src="/luci/homebase/validate_cluster_add.js">
+	</script>
+
+	<form name="adminform" action="" method="post">
+		<input name="numStorage" id="numStorage" type="hidden" value="1" />
+
+		<h2>Add a Node to a Cluster</h2>
+
+		<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+			<thead class="systemsTable">
+				<tr class="systemsTable"><td class="systemsTable" colspan="2">
+					<div class="systemsTableTop">
+						<strong>Cluster Name</strong>
+						<select class="hbInputSys" id="clusterName" name="clusterList">
+							<option>Fill this in</option>
+						</select>
+					</div>
+				</td></tr>
+				<tr class="systemsTable">
+					<th class="systemsTable">System Hostname</th>
+					<th class="systemsTable">Password</th>
+				</tr>
+			</thead>
+
+			<tfoot class="systemsTable">
+				<tr class="systemsTable"><td colspan="2" class="systemsTable">
+					<div id="allSameDiv">
+						<input type="checkbox" class="allSameCheckBox" name="allSameCheckBox" id="allSameCheckBox" onClick="allPasswdsSame(adminform);"/> Check if storage system passwords are identical.
+					</div>
+				</td></tr>
+
+				<tr class="systemsTable"><td class="systemsTable" colspan="2">
+					<div class="systemsTableEnd">
+						<input type="button" class="hbSubmit" value="Add Another Row" onClick="addSystem(adminform);" />
+					</div>
+				</td></tr>
+			</tfoot>
+
+			<tbody class="systemsTable">
+				<tr class="systemsTable">
+					<td class="systemsTable">
+						<input class="hbInputSys" type="text" id="__SYSTEM0:Addr" name="__SYSTEM0:Addr" />
+					</td>
+					<td class="systemsTable">
+						<input type="password" id="__SYSTEM0:Passwd" name="__SYSTEM0:Passwd" class="hbInputPass" onChange="pwd0Change(adminform);" />
+					</td>
+				</tr>
+			</tbody>
+		</table>
+
+		<div class="hbSubmit" id="hbSubmit">
+			<input type="button" class="hbSubmit" name="Submit" value="Submit" onClick="validateForm(document.adminform);" />
+		</div>
+	</form>
   </div>
+
   <div metal:define-macro="nodeprocess-form">
    <h2>Node Process Form</h2>
   </div>
--- 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 @@
       <tal:comment replace="nothing"> A slot where you can insert CSS in the header from a template </tal:comment>
     
   <style type="text/css"><!-- @import url(./clusterportlet.css); --></style>
+  <style type="text/css"><!-- @import url(/luci/homebase/luci_homebase.css); --></style>
       <metal:cssslot define-slot="css_slot" />
     </metal:cssslot>
 
--- 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-<span i18n:name="current_year" 
                tal:define="now modules/DateTime/DateTime" 
                tal:content="now/year" />
-    by 
-    <span>
-        <a href="http://redhat.com/Conga">Red Hat, Luci, Ricci, </a>
-    </span>
-    et al.
+    <a href="http://www.redhat.com/">Red Hat, Inc.</a>
     </span>
 </p>
 
 <p>
-
-
     <span i18n:translate="description_license">
     Distributed under the 
         <span i18n:name="license">
@@ -34,4 +28,4 @@
 
 </div>
 </body>
-</html>
\ No newline at end of file
+</html>
--- 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



             reply	other threads:[~2006-07-05 20:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-05 20:13 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-07-19 20:20 [Cluster-devel] conga/luci cluster/form-macros cluster/index_h rmccabe
2006-09-08 22:54 rmccabe
2006-10-16  4:26 rmccabe
2006-10-31 17:28 rmccabe
2006-11-03 19:13 rmccabe
2006-11-07 21:33 rmccabe
2006-12-21  5:08 rmccabe
2007-02-20 23:07 rmccabe
2007-02-20 23:09 rmccabe
2007-07-26  4:16 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=20060705201304.23105.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.