[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga/luci cluster/form-chooser cluster/form-m ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe 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 @@
     <span tal:omit-tag="" tal:condition="python: not ptype">
      <div metal:use-macro="here/form-macros/macros/entry-form"/>
     </span>
-    <span tal:omit-tag="" tal:condition="python: ptype == '0'">
-     <div metal:use-macro="here/form-macros/macros/entry-form"/>
-    </span>
-    <span tal:omit-tag="" tal:condition="python: ptype == '3'">
+    <span tal:omit-tag="" tal:condition="python: ptype == '0' or ptype == '1' or ptype == '2' or ptype == '3'">
      <div metal:use-macro="here/form-macros/macros/clusters-form"/>
     </span>
     <span tal:omit-tag="" tal:condition="python: ptype == '4'">
--- 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 @@
 </div>
 
 <div metal:define-macro="clusters-form">
+	<script type="text/javascript">
+		set_page_title('Luci — cluster — cluster list');
+	</script>
 <div id="cluster_list">
 <div class="cluster" tal:repeat="clu clusystems">
 	<tal:block tal:define="global ragent python: here.getRicciAgent(clu)" />
--- 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 @@
 
 
 <!--  async helper functions -->
+<script type="text/javascript" src="/luci/conga.js"></script>
 <script language="javascript" type="text/javascript">
 
 var xmlHttp_object = false;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]