[rhmessaging-commits] rhmessaging commits: r4232 - in mgmt/newdata: wooly/python/wooly and 1 other directory.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Aug 26 17:07:49 EDT 2010


Author: justi9
Date: 2010-08-26 17:07:48 -0400 (Thu, 26 Aug 2010)
New Revision: 4232

Modified:
   mgmt/newdata/cumin/python/cumin/grid/scheduler.py
   mgmt/newdata/cumin/python/cumin/grid/submission.py
   mgmt/newdata/wooly/python/wooly/forms.strings
Log:
 * Improve form text messages

 * Avoid a weird cursor type when hovering over "Show more"

 * Use get_items, not scheduler.get, to determine if there are any
   schedulers at all

 * Fix a missing import


Modified: mgmt/newdata/cumin/python/cumin/grid/scheduler.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/scheduler.py	2010-08-26 20:29:10 UTC (rev 4231)
+++ mgmt/newdata/cumin/python/cumin/grid/scheduler.py	2010-08-26 21:07:48 UTC (rev 4232)
@@ -1,5 +1,3 @@
-from random import choice
-
 from wooly import *
 from wooly.widgets import *
 from wooly.forms import *

Modified: mgmt/newdata/cumin/python/cumin/grid/submission.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/submission.py	2010-08-26 20:29:10 UTC (rev 4231)
+++ mgmt/newdata/cumin/python/cumin/grid/submission.py	2010-08-26 21:07:48 UTC (rev 4232)
@@ -1,6 +1,8 @@
 import logging
 import shlex
 
+from random import choice
+
 from rosemary.sqlquery import *
 from parsley.stringex import partition, rpartition
 
@@ -107,11 +109,13 @@
 
         self.input.size = 50
         self.required = True
-        self.help = "This text will identify the submission"
 
     def render_title(self, session):
         return "Description"
 
+    def render_help(self, session):
+        return "This text will identify the submission"
+
 class JobSchedulerField(ScalarField):
     def __init__(self, app, name, pool_name):
         super(JobSchedulerField, self).__init__(app, name, None)
@@ -129,23 +133,24 @@
         self.input = self.SchedulerOptions(app, "input", self.param)
         self.add_child(self.input)
 
-        self.help = "Submit job to this schedd"
-
     def get(self, session):
         return self.object.get(session)
 
     def validate(self, session):
         super(JobSchedulerField, self).validate(session)
 
-        scheduler = self.get(session)
+        schedulers = self.input.get_items(session)
 
-        if not scheduler:
+        if not schedulers:
             error = FormError("There is no schedd to submit to")
             self.form.errors.add(session, error)
 
     def render_title(self, session):
         return "Schedd"
 
+    def render_help(self, session):
+        return "Submit the job to this schedd"
+
     class SchedulerOptions(OptionInputSet):
         def do_process(self, session):
             cls = self.app.model.com_redhat_grid.Scheduler
@@ -624,10 +629,16 @@
         def render_title(self, session):
             return "Image location"
 
+        def render_help(self, session):
+            return "The path to VM disk image file"
+
     class MemoryField(IntegerField):
         def render_title(self, session):
             return "Memory"
 
+        def render_help(self, session):
+            return "The VM's memory size in megabytes"
+
 class DagJobSubmit(Task):
     def __init__(self, app):
         super(DagJobSubmit, self).__init__(app)
@@ -699,7 +710,7 @@
         self.add_field(self.description)
 
         self.location = self.LocationField(app, "location")
-        self.location.help = "Path to the DAG job file"
+        self.location.help = "The path to the DAG job file"
         self.location.required = True
         self.location.input.size = 50
         self.add_field(self.location)

Modified: mgmt/newdata/wooly/python/wooly/forms.strings
===================================================================
--- mgmt/newdata/wooly/python/wooly/forms.strings	2010-08-26 20:29:10 UTC (rev 4231)
+++ mgmt/newdata/wooly/python/wooly/forms.strings	2010-08-26 21:07:48 UTC (rev 4232)
@@ -220,10 +220,14 @@
     display: none;
 }
 
-div.heading {
+div.ShowableFieldSet div.heading {
     margin: 1em 0;
 }
 
+div.ShowableFieldSet div.heading a {
+    cursor: default;
+}
+
 [ShowableFieldSet.javascript]
 (function() {
     wooly.toggleFieldDisplay = function(id) {
@@ -236,18 +240,18 @@
 
         if (table.getStyle("display") === "table") {
              table.setStyle("display", "none");
-             a.set("text", "Show extra fields");
+             a.set("text", "Show more >");
         } else {
              table.setStyle("display", "table");
-             a.set("text", "Hide extra fields");
+             a.set("text", "Show fewer <");
         }
     }
 }())
 
 [ShowableFieldSet.html]
-<div id="{id}" class="ShowableFieldSet">
+<div id="{id}" class="{class}">
   <div class="heading">
-    <a onclick="wooly.toggleFieldDisplay('{id}');" class="action">Show extra fields</a>
+    <a onclick="wooly.toggleFieldDisplay('{id}');" class="action">Show more &gt;</a>
   </div>
 
   <table class="FormFieldSet">



More information about the rhmessaging-commits mailing list