rhmessaging commits: r4116 - in mgmt/newdata/cumin/python/cumin: messaging and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-07-14 08:33:58 -0400 (Wed, 14 Jul 2010)
New Revision: 4116
Modified:
mgmt/newdata/cumin/python/cumin/messaging/binding.py
mgmt/newdata/cumin/python/cumin/widgets.py
Log:
Fix references to schemas
Modified: mgmt/newdata/cumin/python/cumin/messaging/binding.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/messaging/binding.py 2010-07-14 12:32:22 UTC (rev 4115)
+++ mgmt/newdata/cumin/python/cumin/messaging/binding.py 2010-07-14 12:33:58 UTC (rev 4116)
@@ -420,7 +420,7 @@
exchange_string = self.exchange.get(session)
if exchange_string:
obj = self.form.object.get(session)
- cls = self.app.rosemary.org_apache_qpid_broker.Exchange
+ cls = self.app.model.org_apache_qpid_broker.Exchange
vhostid = obj._class._name == "Vhost" and obj._id or obj._vhostRef_id
exchanges = cls.get_selection(session.cursor, name=exchange_string, _vhostRef_id=vhostid)
if len(exchanges):
Modified: mgmt/newdata/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/widgets.py 2010-07-14 12:32:22 UTC (rev 4115)
+++ mgmt/newdata/cumin/python/cumin/widgets.py 2010-07-14 12:33:58 UTC (rev 4116)
@@ -1528,7 +1528,7 @@
class QueueInput(BaseBindingInput):
def do_get_items(self, session):
- cls = self.app.rosemary.org_apache_qpid_broker.Queue
+ cls = self.app.model.org_apache_qpid_broker.Queue
queue = self.form.object.get(session)
vhostid = queue._vhostRef_id
queues = cls.get_selection(session.cursor, _vhostRef_id=vhostid)
@@ -1536,7 +1536,7 @@
class ExchangeInput(BaseBindingInput):
def do_get_items(self, session):
- cls = self.app.rosemary.org_apache_qpid_broker.Exchange
+ cls = self.app.model.org_apache_qpid_broker.Exchange
obj = self.form.object.get(session)
vhostid = obj._class._name == "Vhost" and obj._id or obj._vhostRef_id
exchanges = cls.get_selection(session.cursor, _vhostRef_id=vhostid)
14 years, 5 months
rhmessaging commits: r4115 - mgmt/newdata/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-07-14 08:32:22 -0400 (Wed, 14 Jul 2010)
New Revision: 4115
Modified:
mgmt/newdata/cumin/python/cumin/admin.py
Log:
Remove references to schema type.
Modified: mgmt/newdata/cumin/python/cumin/admin.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/admin.py 2010-07-14 11:20:44 UTC (rev 4114)
+++ mgmt/newdata/cumin/python/cumin/admin.py 2010-07-14 12:32:22 UTC (rev 4115)
@@ -13,16 +13,10 @@
self.app.model.sql_model.write_create_ddl(writer)
return writer.getvalue()
- def remove_qmf_schema(self):
- self.app.model.sql_model._schemas = \
- [x for x in self.app.model.sql_model._schemas if not x.type == "transient"]
-
def create_schema(self, cursor):
- self.remove_qmf_schema()
cursor.execute(self.get_schema())
def drop_schema(self, cursor):
- self.remove_qmf_schema()
writer = StringIO()
self.app.model.sql_model.write_drop_ddl(writer)
sql = writer.getvalue()
14 years, 5 months
rhmessaging commits: r4113 - in mgmt/newdata/cumin/python/cumin: grid and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-07-13 17:01:16 -0400 (Tue, 13 Jul 2010)
New Revision: 4113
Modified:
mgmt/newdata/cumin/python/cumin/grid/submission.py
mgmt/newdata/cumin/python/cumin/main.py
Log:
Add extra attrs field to submission task; fix an import-related error
Modified: mgmt/newdata/cumin/python/cumin/grid/submission.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/submission.py 2010-07-13 19:39:46 UTC (rev 4112)
+++ mgmt/newdata/cumin/python/cumin/grid/submission.py 2010-07-13 21:01:16 UTC (rev 4113)
@@ -87,7 +87,8 @@
iwd=None,
stdin=None,
stdout=None,
- stderr=None):
+ stderr=None,
+ extra_attrs={}):
# XXX
# user_name = invoc.user.name
user_name = "gridmonkey"
@@ -107,6 +108,9 @@
put("Requirements", requirements)
put("JobUniverse", universe)
+ for name, value in extra_attrs:
+ put(name, value)
+
descriptors = dict()
descriptors["Requirements"] = "com.redhat.grid.Expression"
Modified: mgmt/newdata/cumin/python/cumin/main.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/main.py 2010-07-13 19:39:46 UTC (rev 4112)
+++ mgmt/newdata/cumin/python/cumin/main.py 2010-07-13 21:01:16 UTC (rev 4113)
@@ -89,7 +89,6 @@
def add_pages(self):
self.main_page = MainPage(self, "index.html")
- self.main_page.page_html_class = "Cumin"
self.add_page(self.main_page)
self.set_default_page(self.main_page)
@@ -377,7 +376,7 @@
def render_cell_content(self, session, record):
created = self.field.get_content(session, record)
- return fmt_duration(time() - secs(created))
+ return fmt_duration(time.time() - secs(created))
def render_text_align(self, session):
return "right"
14 years, 5 months
rhmessaging commits: r4112 - in mgmt/newdata: cumin/resources and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-07-13 15:39:46 -0400 (Tue, 13 Jul 2010)
New Revision: 4112
Modified:
mgmt/newdata/cumin/python/cumin/objectselector.py
mgmt/newdata/cumin/resources/app.css
mgmt/newdata/wooly/python/wooly/table.py
mgmt/newdata/wooly/python/wooly/table.strings
Log:
By default sort the first 'sortable' column; move some misplaced style rules
Modified: mgmt/newdata/cumin/python/cumin/objectselector.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/objectselector.py 2010-07-13 18:36:01 UTC (rev 4111)
+++ mgmt/newdata/cumin/python/cumin/objectselector.py 2010-07-13 19:39:46 UTC (rev 4112)
@@ -26,6 +26,8 @@
self.update_enabled = True
+ self.ascending.default = True
+
# (RosemaryAttribute this, RosemaryAttribute that, Attribute object)
self.filter_specs = list()
@@ -36,6 +38,12 @@
assert self.adapter, self
#assert self.adapter.id_field, self
+ for col in self.columns:
+ if col.sortable:
+ self.sort.default = col.name
+
+ break
+
def add_attribute_column(self, attr):
assert isinstance(attr, RosemaryAttribute), attr
@@ -146,6 +154,7 @@
self.cell.input = ObjectCheckboxColumnInput(app, "input", selection)
self.cell.replace_child(self.cell.input)
+ self.sortable = False
self.width = "1%"
def render_cell_value(self, session, record):
Modified: mgmt/newdata/cumin/resources/app.css
===================================================================
--- mgmt/newdata/cumin/resources/app.css 2010-07-13 18:36:01 UTC (rev 4111)
+++ mgmt/newdata/cumin/resources/app.css 2010-07-13 19:39:46 UTC (rev 4112)
@@ -599,6 +599,9 @@
font-weight: normal;
}
+table.DataTable.Cumin td.selected, table.DataTable.Cumin th.selected {
+}
+
table.DataTable.Cumin thead, table.DataTable.Cumin tfoot {
background-color: #f7f7f7;
}
Modified: mgmt/newdata/wooly/python/wooly/table.py
===================================================================
--- mgmt/newdata/wooly/python/wooly/table.py 2010-07-13 18:36:01 UTC (rev 4111)
+++ mgmt/newdata/wooly/python/wooly/table.py 2010-07-13 19:39:46 UTC (rev 4112)
@@ -94,6 +94,7 @@
self.cell = TableColumnCell(app, "cell")
self.add_child(self.cell)
+ self.sortable = True
self.visible = True
self.width = None
@@ -214,6 +215,7 @@
self.cell = CheckboxColumnCell(app, "cell", selection)
self.replace_child(self.cell)
+ self.sortable = False
self.width = "1%"
def init(self):
Modified: mgmt/newdata/wooly/python/wooly/table.strings
===================================================================
--- mgmt/newdata/wooly/python/wooly/table.strings 2010-07-13 18:36:01 UTC (rev 4111)
+++ mgmt/newdata/wooly/python/wooly/table.strings 2010-07-13 19:39:46 UTC (rev 4112)
@@ -52,14 +52,6 @@
width: {width};
}
-table.Table th.{class}.selected {
- background-color: #f0f0f0;
-}
-
-table.Table td.{class}.selected {
- background-color: #f7f7f7;
-}
-
[TableColumnHeader.html]
<th class="{class}"><a href="{href}">{content}</a></th>
14 years, 5 months
rhmessaging commits: r4111 - mgmt/newdata/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-07-13 14:36:01 -0400 (Tue, 13 Jul 2010)
New Revision: 4111
Modified:
mgmt/newdata/cumin/python/cumin/objecttask.strings
Log:
Style adjustments for task invocations
Modified: mgmt/newdata/cumin/python/cumin/objecttask.strings
===================================================================
--- mgmt/newdata/cumin/python/cumin/objecttask.strings 2010-07-13 18:15:09 UTC (rev 4110)
+++ mgmt/newdata/cumin/python/cumin/objecttask.strings 2010-07-13 18:36:01 UTC (rev 4111)
@@ -1,5 +1,5 @@
[TaskInvocationSet.css]
-ul.TaskInvocationSet {
+div.TaskInvocationSet {
background-color: #fe0;
padding: 1em 2em;
-moz-border-radius: 0.5em;
@@ -8,12 +8,25 @@
width: 80%;
}
-ul.TaskInvocationSet a.dismiss {
+div.TaskInvocationSet ul {
+ margin: 0;
+ padding: 0 0 0 1em;
+}
+
+div.TaskInvocationSet a.dismiss {
float: right;
+ font-size: 0.9em;
}
+div.TaskInvocationSet a.dismissall {
+ font-size: 0.9em;
+}
+
[TaskInvocationSet.html]
-<ul id="{id}" class="{class}">{items}</ul>
+<div id="{id}" class="{class}">
+ <!-- <a class="dismissall" href="">Dismiss all</a> -->
+ <ul>{items}</ul>
+</div>
[TaskInvocationItem.html]
<li>
14 years, 5 months
rhmessaging commits: r4110 - mgmt/newdata/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-07-13 14:15:09 -0400 (Tue, 13 Jul 2010)
New Revision: 4110
Modified:
mgmt/newdata/cumin/python/cumin/grid/submission.py
Log:
Add a universe dropdown
Modified: mgmt/newdata/cumin/python/cumin/grid/submission.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/submission.py 2010-07-13 18:01:13 UTC (rev 4109)
+++ mgmt/newdata/cumin/python/cumin/grid/submission.py 2010-07-13 18:15:09 UTC (rev 4110)
@@ -83,11 +83,11 @@
executable,
arguments=None,
requirements=None,
+ universe=None,
iwd=None,
stdin=None,
stdout=None,
- stderr=None,
- universe=5):
+ stderr=None):
# XXX
# user_name = invoc.user.name
user_name = "gridmonkey"
@@ -145,6 +145,9 @@
"this submission will run"
self.add_field(self.requirements)
+ self.universe = self.UniverseField(app, "universe")
+ self.add_extra_field(self.universe)
+
self.directory = self.WorkingDirectoryField(app, "directory")
self.directory.input.size = 50
self.directory.help = "Run the process in this directory"
@@ -184,6 +187,7 @@
stdin = self.stdin.get(session)
stdout = self.stdout.get(session)
stderr = self.stderr.get(session)
+ universe = self.universe.get(session)
tokens = shlex.split(command)
@@ -199,8 +203,8 @@
iwd=directory,
stdin=stdin,
stdout=stdout,
- stderr=stderr)
- # universe=universe) # XXX
+ stderr=stderr,
+ universe=universe)
self.task.exit_with_redirect(session)
@@ -239,6 +243,37 @@
def render_title(self, session):
return "Requirements"
+ class UniverseField(ScalarField):
+ def __init__(self, app, name):
+ super(SubmissionAddForm.UniverseField, self).__init__ \
+ (app, name, None)
+
+ self.param = IntegerParameter(app, "param")
+ self.add_parameter(self.param)
+
+ self.input = self.UniverseOptions(app, "input", self.param)
+ self.add_child(self.input)
+
+ class UniverseOptions(OptionInputSet):
+ def get_items(self, session):
+ return ((None, "[Default]"),
+ (5, "VANILLA"),
+ (7, "SCHEDULER"),
+ (9, "GRID"),
+ (10, "JAVA"),
+ (11, "PARALLEL"),
+ (12, "LOCAL"),
+ (13, "VM"))
+
+ def render_title(self, session):
+ return "Universe"
+
+ def render_item_value(self, session, item):
+ return item[0]
+
+ def render_item_content(self, session, item):
+ return item[1]
+
class WorkingDirectoryField(StringField):
def render_title(self, session):
return "Working directory"
14 years, 5 months
rhmessaging commits: r4109 - mgmt/newdata/rosemary/python/rosemary.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-07-13 14:01:13 -0400 (Tue, 13 Jul 2010)
New Revision: 4109
Modified:
mgmt/newdata/rosemary/python/rosemary/model.py
Log:
Remove references to schema type.
Modified: mgmt/newdata/rosemary/python/rosemary/model.py
===================================================================
--- mgmt/newdata/rosemary/python/rosemary/model.py 2010-07-13 17:50:59 UTC (rev 4108)
+++ mgmt/newdata/rosemary/python/rosemary/model.py 2010-07-13 18:01:13 UTC (rev 4109)
@@ -59,11 +59,11 @@
attr = elem.get("package")
if attr:
- pkg = RosemaryPackage(self, attr, elem.get("type"))
+ pkg = RosemaryPackage(self, attr)
pkg.load(elem)
for child in elem.findall("package"):
- pkg = RosemaryPackage(self, child.get("name"), None)
+ pkg = RosemaryPackage(self, child.get("name"))
pkg.load(child)
def extend(self, elem):
@@ -76,7 +76,7 @@
pkg.init()
class RosemaryPackage(object):
- def __init__(self, model, name, type):
+ def __init__(self, model, name):
self._model = model
self._name = name
@@ -95,9 +95,6 @@
self._classes_by_lowercase_name = dict()
self.sql_schema = SqlSchema(self._model.sql_model, self._name)
- if not type:
- type = "persistant"
- setattr(self.sql_schema, "type", type)
def load(self, elem):
groups_by_name = dict()
14 years, 5 months
rhmessaging commits: r4108 - mgmt/newdata/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-07-13 13:50:59 -0400 (Tue, 13 Jul 2010)
New Revision: 4108
Modified:
mgmt/newdata/cumin/python/cumin/grid/negotiator.py
Log:
Use wrapper functions for partition and rpartition
Modified: mgmt/newdata/cumin/python/cumin/grid/negotiator.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/negotiator.py 2010-07-13 17:50:12 UTC (rev 4107)
+++ mgmt/newdata/cumin/python/cumin/grid/negotiator.py 2010-07-13 17:50:59 UTC (rev 4108)
@@ -13,6 +13,8 @@
from cumin.util import *
from cumin.widgets import *
+from parsley.stringex import partition, rpartition
+
from daemon import *
strings = StringCatalog(__file__)
@@ -230,7 +232,7 @@
def render_content(self, session, group):
# if a user
if "." in group:
- (g, sep, user) = group.rpartition(".")
+ (g, sep, user) = rpartition(group, ".")
return "<span style='padding-left: 1em;'>%s</span>" % user
return group
@@ -341,9 +343,9 @@
info = self.app.model.configs_by_negotiator[negotiator._qmf_agent_id]
siblings = list()
- (ng, s, nn) = node.rpartition(".")
+ (ng, s, nn) = rpartition(node, ".")
for group in info:
- (g, s, n) = group.rpartition(".")
+ (g, s, n) = rpartition(group, ".")
if g == ng:
siblings.append(group)
14 years, 5 months
rhmessaging commits: r4107 - mgmt/newdata/parsley/python/parsley.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-07-13 13:50:12 -0400 (Tue, 13 Jul 2010)
New Revision: 4107
Added:
mgmt/newdata/parsley/python/parsley/stringex.py
Log:
Wrappers for python 2.5's partition and rpartition
Added: mgmt/newdata/parsley/python/parsley/stringex.py
===================================================================
--- mgmt/newdata/parsley/python/parsley/stringex.py (rev 0)
+++ mgmt/newdata/parsley/python/parsley/stringex.py 2010-07-13 17:50:12 UTC (rev 4107)
@@ -0,0 +1,22 @@
+try:
+ from string import partition, rpartition
+ def partition(str, sep):
+ return str.partition(sep)
+
+ def rpartition(str, sep):
+ return str.rpartition(sep)
+
+except ImportError:
+ def partition(str, sep):
+ i = str.find(sep)
+ if i >= 0:
+ return (str[:i], sep, str[i+1:])
+ else:
+ return (str, "", "")
+
+ def rpartition(str, sep):
+ i = str.rfind(sep)
+ if i >= 0:
+ return (str[:i], sep, str[i+1:])
+ else:
+ return ("", "", str)
14 years, 5 months
rhmessaging commits: r4106 - mgmt/newdata/cumin/model.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-07-13 09:56:02 -0400 (Tue, 13 Jul 2010)
New Revision: 4106
Removed:
mgmt/newdata/cumin/model/qmf.xml
Modified:
mgmt/newdata/cumin/model/rosemary.xml
Log:
Removed old qmf xml file.
Changed schema and class in rosemary.xml to the new names.
Deleted: mgmt/newdata/cumin/model/qmf.xml
===================================================================
--- mgmt/newdata/cumin/model/qmf.xml 2010-07-12 21:45:23 UTC (rev 4105)
+++ mgmt/newdata/cumin/model/qmf.xml 2010-07-13 13:56:02 UTC (rev 4106)
@@ -1,13 +0,0 @@
-<schema package="qmf.response" type="transient">
- <class name="GetJobSummaries" storage="none">
- <property name="ProcId" type="sstr"/>
- <property name="Args" type="sstr"/>
- <property name="QDate" type="absTime"/>
- <property name="Cmd" type="sstr"/>
- <property name="ClusterId" type="sstr"/>
- <property name="JobStatus" type="sstr"/>
- <property name="EnteredCurrentStatus" type="absTime"/>
- <property name="GlobalJobId" type="sstr"/>
- <property name="JobId" type="sstr"/>
- </class>
-</schema>
Modified: mgmt/newdata/cumin/model/rosemary.xml
===================================================================
--- mgmt/newdata/cumin/model/rosemary.xml 2010-07-12 21:45:23 UTC (rev 4105)
+++ mgmt/newdata/cumin/model/rosemary.xml 2010-07-13 13:56:02 UTC (rev 4106)
@@ -1,6 +1,6 @@
<model>
- <package name="qmf.response">
- <class name="GetJobSummaries">
+ <package name="com.redhat.cumin.grid">
+ <class name="JobSummary">
<property name="GlobalJobId">
<title>Job Id</title>
</property>
14 years, 5 months