From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 23 Sep 2006 04:04:09 -0000 Subject: [Cluster-devel] conga/luci cluster/form-macros cluster/resourc ... Message-ID: <20060923040409.10380.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-09-23 04:04:08 Modified files: luci/cluster : form-macros resource-form-macros resource_form_handlers.js luci/homebase : form-macros luci_homebase.css luci/site/luci/Extensions: cluster_adapters.py ricci_bridge.py Log message: more cleanups, add the service add form to the service add page. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.65&r2=1.66 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource-form-macros.diff?cvsroot=cluster&r1=1.15&r2=1.16 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource_form_handlers.js.diff?cvsroot=cluster&r1=1.11&r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/form-macros.diff?cvsroot=cluster&r1=1.36&r2=1.37 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/luci_homebase.css.diff?cvsroot=cluster&r1=1.22&r2=1.23 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.66&r2=1.67 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_bridge.py.diff?cvsroot=cluster&r1=1.17&r2=1.18 --- conga/luci/cluster/form-macros 2006/09/22 21:59:03 1.65 +++ conga/luci/cluster/form-macros 2006/09/23 04:04:08 1.66 @@ -165,7 +165,7 @@
- +
@@ -238,7 +238,7 @@
- +
@@ -281,7 +281,7 @@
- +
@@ -670,7 +670,7 @@
-
@@ -769,7 +769,7 @@
- +
@@ -991,7 +991,7 @@
- +
@@ -1013,7 +1013,7 @@
- +
@@ -1090,7 +1090,54 @@
-

Service Add Form

+ + +

Add a Service

+ + + +
+
+ + + + + +
+ Service name + + +
+
+
+
+
+ +
+
+ + + + + + +
+
+ +
@@ -1112,7 +1159,34 @@
-
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ +
@@ -1132,7 +1206,10 @@ var active_resources = ; var resource_names = ; +
+
+
@@ -1178,14 +1255,13 @@

+

Service Composition

+ -

Service Composition

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
-
- + + + + + + -
+
--- conga/luci/cluster/resource-form-macros 2006/09/22 21:59:03 1.15 +++ conga/luci/cluster/resource-form-macros 2006/09/23 04:04:08 1.16 @@ -6,15 +6,15 @@

- - -

--- conga/luci/cluster/resource_form_handlers.js 2006/09/22 21:59:03 1.11 +++ conga/luci/cluster/resource_form_handlers.js 2006/09/23 04:04:08 1.12 @@ -271,16 +271,15 @@ function add_child_resource(form) { if (!form || !form.tree_level || !form.parent_uuid || !form.uuid || - !is_valid_int(form.tree_level.value, 0, null)) + !is_valid_int(form.tree_level.value, -1, null)) { return (-1); } var ilevel = Number(form.tree_level.value) + 1; var sdiv = document.getElementById('resskel'); - if (!sdiv) { + if (!sdiv) return (-1); - } var pdiv = document.getElementById(form.uuid.value); if (!pdiv) { --- conga/luci/homebase/form-macros 2006/09/22 18:22:39 1.36 +++ conga/luci/homebase/form-macros 2006/09/23 04:04:08 1.37 @@ -1,7 +1,7 @@ - $Id: form-macros,v 1.36 2006/09/22 18:22:39 rmccabe Exp $ + $Id: form-macros,v 1.37 2006/09/23 04:04:08 rmccabe Exp $ @@ -72,7 +72,7 @@ tal:attributes="value python:data['children'][data['curIndex']]['absolute_url']" />
- +
@@ -138,7 +138,7 @@ tal:attributes="value python:data['children'][data['curIndex']]['absolute_url']" />
- +
@@ -245,7 +245,7 @@ tal:attributes="value python: num_clusters + 1" />
- +
@@ -351,7 +351,7 @@ tal:attributes="value python: num_clusters + 1" />
- +
@@ -413,7 +413,7 @@
- +
@@ -435,7 +435,7 @@
- +
@@ -540,7 +540,7 @@ tal:attributes="value python: sysNum" />
- +
@@ -609,7 +609,7 @@
- +
--- conga/luci/homebase/luci_homebase.css 2006/09/13 17:50:22 1.22 +++ conga/luci/homebase/luci_homebase.css 2006/09/23 04:04:08 1.23 @@ -1,5 +1,11 @@ input[type=text], input[type=password] { padding: .2em ! important; + font-family: "Bitstream Vera Sans Mono", "DejaVu Sans Mono", monospace; + font-size: 11px; +} + +input[type=button] { + font-size: 11px; } input[type=checkbox], input[type=radio] { @@ -19,7 +25,6 @@ input.qdisk { padding: .2em; - font-size: 10px; } input.qdname { --- conga/luci/site/luci/Extensions/cluster_adapters.py 2006/09/22 18:24:45 1.66 +++ conga/luci/site/luci/Extensions/cluster_adapters.py 2006/09/23 04:04:08 1.67 @@ -843,9 +843,9 @@ rb = ricci_bridge(node[1].getId()) if rb.getRicciResponse() == True: return node[1].getId() - return None + return "" else: - return None + return "" def getClusterStatus(self, ricci_name): @@ -921,7 +921,17 @@ baseurl = req['URL'] cluname = req['clustername'] hmap = {} - servicename = req['servicename'] + root_uuid = 'toplevel' + + hmap['root_uuid'] = root_uuid + hmap['uuid_list'] = map(lambda x: make_uuid('resource'), xrange(30)) + + try: + servicename = req['servicename'] + except KeyError, e: + hmap['resource_list'] = {} + return hmap + for item in status: if item['type'] == "service": if item['name'] == servicename: @@ -966,13 +976,10 @@ if svc != None: indent_ctr = 0 children = svc.getChildren() - root_uuid = 'toplevel'; for child in children: recurse_resources(root_uuid, child, resource_list, indent_ctr) hmap['resource_list'] = resource_list - hmap['root_uuid'] = root_uuid - hmap['uuid_list'] = map(lambda x: make_uuid('resource'), xrange(30)) return hmap def recurse_resources(parent_uuid, child, resource_list, indent_ctr, parent=None): --- conga/luci/site/luci/Extensions/ricci_bridge.py 2006/08/14 16:01:59 1.17 +++ conga/luci/site/luci/Extensions/ricci_bridge.py 2006/09/23 04:04:08 1.18 @@ -127,9 +127,12 @@ if hello != None: pass #print hello.toxml() - self.__sendall(CLUSTER_STR, ss) - - + try: + self.__sendall(CLUSTER_STR, ss) + except sslerror, e: + sock.close() + return '' + # receive response doc = self.__receive(ss) if doc == None: