From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 9 Oct 2006 17:12:32 -0000 Subject: [Cluster-devel] conga/luci cluster/form-chooser cluster/form-m ... Message-ID: <20061009171232.13980.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-10-09 17:12:29 Modified files: luci/cluster : form-chooser form-macros luci/site/luci/Extensions: cluster_adapters.py luci/storage : index_html Log message: more page title labels and miscellaneous other small fixes Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-chooser.diff?cvsroot=cluster&r1=1.9&r2=1.10 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.78&r2=1.79 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.85&r2=1.86 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/index_html.diff?cvsroot=cluster&r1=1.6&r2=1.7 --- conga/luci/cluster/form-chooser 2006/10/09 16:16:11 1.9 +++ conga/luci/cluster/form-chooser 2006/10/09 17:12:26 1.10 @@ -14,10 +14,7 @@
- -
- - +
--- conga/luci/cluster/form-macros 2006/10/09 16:16:11 1.78 +++ conga/luci/cluster/form-macros 2006/10/09 17:12:28 1.79 @@ -25,6 +25,9 @@
+
--- conga/luci/site/luci/Extensions/cluster_adapters.py 2006/10/06 20:45:26 1.85 +++ conga/luci/site/luci/Extensions/cluster_adapters.py 2006/10/09 17:12:28 1.86 @@ -1,5 +1,6 @@ import socket from ModelBuilder import ModelBuilder +from xml.dom import minidom from ZPublisher import HTTPRequest import AccessControl from conga_constants import * @@ -287,7 +288,21 @@ return (True, {'errors': errors, 'messages': messages}) def validateServiceEdit(self, request): - return (True, {}) + try: + form_xml = request['form_xml'] + if not form_xml: + raise KeyError('form_xml must not be blank') + except KeyError, e: + return (False, {errors: ['No resource data was supplied for this service.']}) + + try: + doc = minidom.parseString(form_xml) + if not doc.firstChild: + raise + except: + return (False, {'errors': ['The resource data submitted for this service is not properly formed.']}) + + return (True, {'messages': ['OK']}) def validateServiceAdd(self, request): return (True, {}) @@ -588,7 +603,7 @@ try: pagetype = request[PAGETYPE] except KeyError, e: - pagetype = "0" + pagetype = '3' cldata = {} @@ -667,7 +682,7 @@ try: pagetype = request[PAGETYPE] except KeyError, e: - pagetype = "0" + pagetype = '3' try: url = request['URL'] --- conga/luci/storage/index_html 2006/08/03 18:56:09 1.6 +++ conga/luci/storage/index_html 2006/10/09 17:12:28 1.7 @@ -49,6 +49,7 @@ +