From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 20 Jun 2006 21:21:51 -0000 Subject: [Cluster-devel] conga/luci/homebase form-chooser form-macros i ... Message-ID: <20060620212151.9499.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-06-20 21:21:47 Modified files: luci/homebase : form-chooser form-macros index_html luci_homebase.css main_logo main_pathbar main_personalbar main_sections portlet_homebase Added files: luci/homebase : main_footer x.png Log message: Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/main_footer.diff?cvsroot=cluster&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/x.png.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.7&r2=1.8 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/form-macros.diff?cvsroot=cluster&r1=1.21&r2=1.22 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/index_html.diff?cvsroot=cluster&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/luci_homebase.css.diff?cvsroot=cluster&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/main_logo.diff?cvsroot=cluster&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/main_pathbar.diff?cvsroot=cluster&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/main_personalbar.diff?cvsroot=cluster&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/main_sections.diff?cvsroot=cluster&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/portlet_homebase.diff?cvsroot=cluster&r1=1.6&r2=1.7 /cvs/cluster/conga/luci/homebase/main_footer,v --> standard output revision 1.1 --- conga/luci/homebase/main_footer +++ - 2006-06-20 21:21:48.674641000 +0000 @@ -0,0 +1,31 @@ + + + + + /cvs/cluster/conga/luci/homebase/x.png,v --> standard output revision 1.1 Binary files /cvs/cluster/conga/luci/homebase/x.png and - differ --- conga/luci/homebase/form-chooser 2006/05/18 17:47:15 1.7 +++ conga/luci/homebase/form-chooser 2006/06/20 21:21:47 1.8 @@ -5,12 +5,13 @@ - $Id: form-chooser,v 1.7 2006/05/18 17:47:15 rmccabe Exp $ + $Id: form-chooser,v 1.8 2006/06/20 21:21:47 rmccabe Exp $ - - + + +
@@ -39,6 +40,7 @@
- + + --- conga/luci/homebase/form-macros 2006/05/25 22:34:24 1.21 +++ conga/luci/homebase/form-macros 2006/06/20 21:21:47 1.22 @@ -1,7 +1,7 @@ - $Id: form-macros,v 1.21 2006/05/25 22:34:24 rmccabe Exp $ + $Id: form-macros,v 1.22 2006/06/20 21:21:47 rmccabe Exp $ @@ -11,24 +11,22 @@ + + !########################### # ENTRY FORM # ############################ - -
-
-

Luci Homebase

-

Welcome to Luci, .

-

Select an action from the list on the left.

-
+ -
-

Not Logged In

-

Please login first.

-
+
+
+

Luci Homebase

+

Welcome to Luci, .

+

+
!########################### @@ -36,52 +34,57 @@ ############################ -
- - XXX: to validate: - - user was selected, - - selected index is valid - - - -
-

Delete a User

+ if (error_dialog(errors)) + return (-1); + + if (confirm('Do you really want to remove the user \"' + + form.deluserId.options[userIdx].value + '\"?')) + { + form.submit(); + } + + return (0); + } + + + + + + +

+ Delete a User +

-
+ - - No users have been added. - - - +
+ No users have been added.
+
+ + + !########################### # USER ADD FORM # ############################ + + -
- - Things to validate: - - user/passwd exist and are not blank - - user doesn't contain invalid characters. - - passwords match - - - + if (!form) + return (-1); + + if (!form.newUserName || !form.newUserName.value) + errors.push('You did not enter a user name.'); + if (!form.newPassword || !form.newPassword.value) + errors.push('You did not enter a password.'); + if (error_dialog(errors)) + return (-1); + + var invalid = str_is_valid(form.newUserName.value, '/[0-9A-Za-z_]/g'); + if (invalid) + errors.push('The user name you specified contains the following invalid characters: "' + invalid + '"'); + + if (str_is_blank(form.newPassword.value)) + errors.push('Passwords may not be blank.'); + else if (form.newPassword.value.length < 5) + errors.push('Passwords must be@least five characters long.'); + else if (form.newPassword.value != form.newPasswordConfirm.value) + errors.push('The passwords you entered do not match.'); + + if (error_dialog(errors)) + return (-1); + + if (confirm('Do you really want to add the user \"' + form.newUserName.value + '\"?')) + form.submit(); + return (0); + } +

Add a User

@@ -178,20 +168,20 @@ User Name - + Password - + Confirm Password - + @@ -201,65 +191,94 @@ -
+
- -
+ +
+ + + + !########################### # PERMISSIONS FORM # ############################ + + -
- - Things to validate: - - user is selected and valid index - - The rest is checked by the python form submit validator. - - - + var num_storage = document.getElementById('numStorage').value; + for (var i = 0 ; i < num_storage ; i++) { + var element = document.getElementById('__SYSTEM' + i); + if (!element || !element.value || !element.checked) + continue; + selected_storage.push(element.value); + } -
-

User Permissions

+ if (selected_clusters.length + selected_storage.length < 1) + return (0); + + if (error_dialog(errors)) + return (-1); + + if (confirm('Modify permissions for ' + form.userList.options[userIdx].value + '?')) + form.submit(); + return (0); + } + + + + + + + - +

User Permissions

@@ -267,8 +286,9 @@ - -