rhmessaging commits: r1516 - mgmt/mint/python/mint.
by rhmessaging-commits@lists.jboss.org
Author: nunofsantos
Date: 2007-12-18 13:17:28 -0500 (Tue, 18 Dec 2007)
New Revision: 1516
Modified:
mgmt/mint/python/mint/schemaparser.py
Log:
add absTime and deltaTime types
Modified: mgmt/mint/python/mint/schemaparser.py
===================================================================
--- mgmt/mint/python/mint/schemaparser.py 2007-12-18 16:30:55 UTC (rev 1515)
+++ mgmt/mint/python/mint/schemaparser.py 2007-12-18 18:17:28 UTC (rev 1516)
@@ -25,6 +25,7 @@
self.dataTypesMap["uint16"]…
[View More] = self.dataTypesMap["hilo16"] = self.dataTypesMap["count16"] = "SmallIntCol"
self.dataTypesMap["uint32"] = self.dataTypesMap["hilo32"] = self.dataTypesMap["count32"] = "IntCol"
self.dataTypesMap["uint64"] = self.dataTypesMap["hilo64"] = self.dataTypesMap["count64"] = "BigIntCol"
+ self.dataTypesMap["absTime"] = self.dataTypesMap["deltaTime"] = "BigIntCol"
self.dataTypesMap["bool"] = "BoolCol"
self.dataTypesMap["sstr"] = self.dataTypesMap["lstr"] = "StringCol"
[View Less]
17 years, 3 months
rhmessaging commits: r1515 - mgmt/cumin/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-12-18 11:30:55 -0500 (Tue, 18 Dec 2007)
New Revision: 1515
Modified:
mgmt/cumin/python/wooly/__init__.py
Log:
Fixes the build up of error state between requests.
Modified: mgmt/cumin/python/wooly/__init__.py
===================================================================
--- mgmt/cumin/python/wooly/__init__.py 2007-12-18 16:25:59 UTC (rev 1514)
+++ mgmt/cumin/python/wooly/__init__.py 2007-12-18 16:30:55 UTC (rev 1515)
@@ -9,11 +9,91 @@
strings = …
[View More]StringCatalog(__file__)
+class Attribute(object):
+ def __init__(self, app, name):
+ self.app = app
+ self.name = name
+ self.widget = None
+ self.default = None
+ self.is_required = True
+
+ self.__path = None
+
+ def path(self):
+ if self.__path == None:
+ if not self.widget.parent():
+ self.__path = self.name
+ else:
+ self.__path = self.widget.path() + "." + self.name
+
+ return self.__path
+
+ def set_required(self, is_required):
+ self.is_required = is_required
+
+ def validate(self, session):
+ value = self.get(session)
+
+ if value == None and self.is_required:
+ raise Exception("%s not set" % str(self))
+
+ def get(self, session):
+ value = session.get(self.path())
+
+ # Use strict test because empty collections are False
+ if value == None:
+ default = self.get_default(session)
+
+ if default != None:
+ value = self.set(session, default)
+
+ return value
+
+ def add(self, session, value):
+ self.set(session, value)
+
+ def set(self, session, value):
+ return session.set(self.path(), value)
+
+ def get_default(self, session):
+ return self.default
+
+ def set_default(self, default):
+ self.default = default
+
+ def __str__(self):
+ return "%s '%s'" % (self.__class__.__name__, self.path())
+
+class Parameter(Attribute):
+ def __init__(self, app, name):
+ super(Parameter, self).__init__(app, name)
+
+ self.is_collection = False
+
+ app.add_parameter(self)
+
+ def marshal(self, object):
+ if object == None:
+ string = ""
+ else:
+ string = self.do_marshal(object)
+
+ return string
+
+ def do_marshal(self, object):
+ return str(object)
+
+ def unmarshal(self, string):
+ return self.do_unmarshal(string)
+
+ def do_unmarshal(self, string):
+ return string
+
class Widget(object):
def __init__(self, app, name):
self.app = app
- self.__name = name
- self.__parent = None
+ self.__name = name # XXX undo this
+ self.__parent = None # XXX undo this
self.children = list()
self.attributes = list()
self.parameters = list()
@@ -22,8 +102,7 @@
self.__errors_tmpl = Template(self, "errors_html")
self.__error_message_tmpl = Template(self, "error_message_html")
- self.errors = Attribute(app, "errors")
- self.errors.set_default(list())
+ self.errors = self.ErrorsAttribute(app, "errors")
self.add_attribute(self.errors)
self.__ancestors = None
@@ -38,6 +117,10 @@
if cls is Widget:
break
+ class ErrorsAttribute(Attribute):
+ def get_default(self, session):
+ return list()
+
def name(self):
return self.__name
@@ -220,86 +303,6 @@
def __str__(self):
return "%s '%s'" % (self.__class__.__name__, self.path())
-class Attribute(object):
- def __init__(self, app, name):
- self.app = app
- self.name = name
- self.widget = None
- self.default = None
- self.is_required = True
-
- self.__path = None
-
- def path(self):
- if self.__path == None:
- if not self.widget.parent():
- self.__path = self.name
- else:
- self.__path = self.widget.path() + "." + self.name
-
- return self.__path
-
- def set_required(self, is_required):
- self.is_required = is_required
-
- def validate(self, session):
- value = self.get(session)
-
- if value == None and self.is_required:
- raise Exception("%s not set" % str(self))
-
- def get(self, session):
- value = session.get(self.path())
-
- # Use strict test because empty collections are False
- if value == None:
- default = self.get_default(session)
-
- if default != None:
- value = self.set(session, default)
-
- return value
-
- def add(self, session, value):
- self.set(session, value)
-
- def set(self, session, value):
- return session.set(self.path(), value)
-
- def get_default(self, session):
- return self.default
-
- def set_default(self, default):
- self.default = default
-
- def __str__(self):
- return "%s '%s'" % (self.__class__.__name__, self.path())
-
-class Parameter(Attribute):
- def __init__(self, app, name):
- super(Parameter, self).__init__(app, name)
-
- self.is_collection = False
-
- app.add_parameter(self)
-
- def marshal(self, object):
- if object == None:
- string = ""
- else:
- string = self.do_marshal(object)
-
- return string
-
- def do_marshal(self, object):
- return str(object)
-
- def unmarshal(self, string):
- return self.do_unmarshal(string)
-
- def do_unmarshal(self, string):
- return string
-
class Frame(Widget):
def get_saved_parameters(self, session):
frame = self.page().get_current_frame(session)
[View Less]
17 years, 3 months
rhmessaging commits: r1514 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-12-18 11:25:59 -0500 (Tue, 18 Dec 2007)
New Revision: 1514
Modified:
mgmt/cumin/python/cumin/client.py
Log:
Adds some exception protection around the client close method call.
Modified: mgmt/cumin/python/cumin/client.py
===================================================================
--- mgmt/cumin/python/cumin/client.py 2007-12-18 16:23:17 UTC (rev 1513)
+++ mgmt/cumin/python/cumin/client.py 2007-12-18 16:25:59 UTC (rev 1514)
@@ -93,16 +93,13 @@
…
[View More]self.page().set_redirect_url(session, branch.marshal())
def process_submit(self, session, client):
- print "open close"
+ try:
+ client.close(self.app.model.data, client.managedBroker, doit)
+ except Exception, e:
+ self.add_error(session, e)
+ else:
+ self.process_cancel(session, client)
- print "client.managedBroker", client.managedBroker
-
- client.close(self.app.model.data, client.managedBroker, doit)
-
- print "close close"
-
- self.process_cancel(session, client)
-
def render_submit_content(self, session, client):
return "Yes, Close Client '%s'" % client.address
[View Less]
17 years, 3 months
rhmessaging commits: r1513 - in mgmt: notes and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-12-18 11:23:17 -0500 (Tue, 18 Dec 2007)
New Revision: 1513
Modified:
mgmt/cumin/python/cumin/broker.py
mgmt/cumin/python/cumin/broker.strings
mgmt/cumin/python/cumin/brokercluster.py
mgmt/cumin/python/cumin/brokergroup.py
mgmt/cumin/python/cumin/brokerprofile.py
mgmt/cumin/python/cumin/widgets.py
mgmt/cumin/python/cumin/widgets.strings
mgmt/notes/justin-todo.txt
Log:
Adds an incomplete multiple action form.
Renames BrokerSetForm to BrokerSet …
[View More]to avoid colissions with bulk
action form names.
Modified: mgmt/cumin/python/cumin/broker.py
===================================================================
--- mgmt/cumin/python/cumin/broker.py 2007-12-17 23:15:22 UTC (rev 1512)
+++ mgmt/cumin/python/cumin/broker.py 2007-12-18 16:23:17 UTC (rev 1513)
@@ -16,9 +16,9 @@
strings = StringCatalog(__file__)
-class BrokerSetForm(PaginatedItemSet, Form, Frame):
+class BrokerSet(PaginatedItemSet, Form, Frame):
def __init__(self, app, name):
- super(BrokerSetForm, self).__init__(app, name)
+ super(BrokerSet, self).__init__(app, name)
self.broker = BrokerParameter(app, "param")
self.add_parameter(self.broker)
@@ -50,7 +50,7 @@
return BrokerRegistration.select(orderBy="name")[start:end]
def do_process(self, session, model):
- super(BrokerSetForm, self).do_process(session, model)
+ super(BrokerSet, self).do_process(session, model)
if self.submit.get(session):
self.submit.set(session, False)
@@ -482,7 +482,7 @@
def get_title(self, session, model):
return "Brokers %s" % fmt_count(BrokerRegistration.select().count())
- class BrowserBrokers(BrokerSetForm):
+ class BrowserBrokers(BrokerSet):
def do_get_items(self, session, model):
group = self.parent().group.get(session)
profile = self.parent().profile.get(session)
@@ -717,3 +717,17 @@
def render_cancel_content(self, session, broker):
return "No, Cancel"
+
+class BrokerSetRemove(CuminActionSetForm):
+ def get_title(self, session, model):
+ return "Unregister Brokers"
+
+ def process_cancel(self, session, model):
+ branch = session.branch()
+ self.page().show_view(branch)
+ self.page().set_redirect_url(session, branch.marshal())
+
+ def process_submit(self, session, model):
+ branch = session.branch()
+ self.page().show_view(branch)
+ self.page().set_redirect_url(session, branch.marshal())
Modified: mgmt/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/cumin/python/cumin/broker.strings 2007-12-17 23:15:22 UTC (rev 1512)
+++ mgmt/cumin/python/cumin/broker.strings 2007-12-18 16:23:17 UTC (rev 1513)
@@ -1,4 +1,4 @@
-[BrokerSetForm.html]
+[BrokerSet.html]
<form id="{id}" method="post" action="?">
<!-- <select onchange="document.getElementById('{id}.submit').submit()"> -->
@@ -35,7 +35,7 @@
{hidden_inputs}
</form>
-[BrokerSetForm.item_html]
+[BrokerSet.item_html]
<tr>
<td><input type="checkbox" name="{item_checkbox_name}" value="{item_checkbox_value}" {item_checkbox_checked_attr}/></td>
<td>{item_link}</td>
Modified: mgmt/cumin/python/cumin/brokercluster.py
===================================================================
--- mgmt/cumin/python/cumin/brokercluster.py 2007-12-17 23:15:22 UTC (rev 1512)
+++ mgmt/cumin/python/cumin/brokercluster.py 2007-12-18 16:23:17 UTC (rev 1513)
@@ -92,7 +92,7 @@
def render_name(self, session, cluster):
return cluster.name
- class ClusterBrokerTab(BrokerSetForm):
+ class ClusterBrokerTab(BrokerSet):
def get_title(self, session, cluster):
return "Brokers %s" % fmt_count(len(cluster.brokers))
Modified: mgmt/cumin/python/cumin/brokergroup.py
===================================================================
--- mgmt/cumin/python/cumin/brokergroup.py 2007-12-17 23:15:22 UTC (rev 1512)
+++ mgmt/cumin/python/cumin/brokergroup.py 2007-12-18 16:23:17 UTC (rev 1513)
@@ -2,7 +2,7 @@
from wooly import *
from wooly.widgets import *
-from broker import BrokerSetForm
+from broker import BrokerSet
from widgets import *
from parameters import *
from formats import *
@@ -85,7 +85,7 @@
def render_name(self, session, group):
return group.name
- class GroupBrokerTab(BrokerSetForm):
+ class GroupBrokerTab(BrokerSet):
def get_title(self, session, group):
return "Brokers %s" % \
fmt_count(self.get_item_count(session, group))
Modified: mgmt/cumin/python/cumin/brokerprofile.py
===================================================================
--- mgmt/cumin/python/cumin/brokerprofile.py 2007-12-17 23:15:22 UTC (rev 1512)
+++ mgmt/cumin/python/cumin/brokerprofile.py 2007-12-18 16:23:17 UTC (rev 1513)
@@ -74,7 +74,7 @@
def get_title(self, session, profile):
return "Configuration"
- class ProfileBrokerTab(BrokerSetForm):
+ class ProfileBrokerTab(BrokerSet):
def __init__(self, app, name):
super(BrokerProfileView.ProfileBrokerTab, self).__init__(app, name)
Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py 2007-12-17 23:15:22 UTC (rev 1512)
+++ mgmt/cumin/python/cumin/widgets.py 2007-12-18 16:23:17 UTC (rev 1513)
@@ -132,6 +132,10 @@
def __init__(self, app, name):
super(CuminConfirmForm, self).__init__(app, name)
+class CuminActionSetForm(ItemSet, CuminForm, Frame):
+ def __init__(self, app, name):
+ super(CuminActionSetForm, self).__init__(app, name)
+
class CuminStatus(Widget):
def render_class(self, session, object):
if hasattr(object, "errors"):
Modified: mgmt/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/cumin/python/cumin/widgets.strings 2007-12-17 23:15:22 UTC (rev 1512)
+++ mgmt/cumin/python/cumin/widgets.strings 2007-12-18 16:23:17 UTC (rev 1513)
@@ -14,6 +14,32 @@
wooly.doc().elembyid("{id}").node.elements[1].focus();
</script>
+[CuminActionSetForm.html]
+<form id="{id}" class="mform" method="post" action="?">
+ <div class="head">
+ <h1>{title}</h1>
+ </div>
+ <div class="body">
+ <span class="legend">Actions</span>
+ <fieldset>
+ <ul>{items}</ul>
+ </fieldset>
+
+ {hidden_inputs}
+ </div>
+ <div class="foot">
+ <div style="display: block; float: left;"><button>Help</button></div>
+ {cancel}
+ {submit}
+ </div>
+</form>
+<script>
+ wooly.doc().elembyid("{id}").node.elements[0].focus();
+</script>
+
+[CuminActionSetForm.item_html]
+<li>{item_content}</li>
+
[CuminStatus.javascript]
function updateStatus(id, object) {
var status = wooly.doc().elembyid(id);
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2007-12-17 23:15:22 UTC (rev 1512)
+++ mgmt/notes/justin-todo.txt 2007-12-18 16:23:17 UTC (rev 1513)
@@ -18,12 +18,11 @@
- Add y-axis ticks and values for reference
- * Broker groups
+ * Sortify brokers
- - Group form submit has different behaviors between hitting enter
- and clicking submit
+ * Sortify clients
- * Sort in tables
+ * Sortify sessions
* Render stats without values as something other than 0, say a --
@@ -39,6 +38,17 @@
Deferred
+ * Consider making CuminForm (or Form) also have Frame behavior
+
+ * Sortify broker groups
+
+ * Sortify exchanges
+
+ * Broker groups
+
+ - Group form submit has different behaviors between hitting enter
+ and clicking submit
+
* Add [None] to groups field in broker view
* Go back to Widget.parent as an attr, not a function
[View Less]
17 years, 3 months
rhmessaging commits: r1512 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-12-17 18:15:22 -0500 (Mon, 17 Dec 2007)
New Revision: 1512
Modified:
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/widgets.py
Log:
Adds the ability to reverse the current sort.
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-12-17 22:51:27 UTC (rev 1511)
+++ mgmt/cumin/python/cumin/queue.py 2007-12-17 23:15:22 UTC (rev 1512)
@@ -109,6 +109,9 @@
…
[View More] start, end = self.get_bounds(session)
queues = queues[start:end]
+ if self.header.is_reversed(session):
+ queues = queues.reversed()
+
return queues
def render_item_link(self, session, queue):
Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py 2007-12-17 22:51:27 UTC (rev 1511)
+++ mgmt/cumin/python/cumin/widgets.py 2007-12-17 23:15:22 UTC (rev 1512)
@@ -333,6 +333,10 @@
self.column = Parameter(app, "col")
self.add_parameter(self.column)
+ self.reversed = BooleanParameter(app, "rev")
+ self.reversed.set_default(False)
+ self.add_parameter(self.reversed)
+
def add_column(self, column):
self.columns.append(column)
column.header = self
@@ -346,6 +350,9 @@
if column.name == name:
return column
+ def is_reversed(self, session):
+ return self.reversed.get(session)
+
def get_items(self, session, object):
return self.columns
@@ -357,7 +364,12 @@
def render_item_href(self, session, column):
branch = session.branch()
+
+ if column.name == self.column.get(session):
+ self.reversed.set(branch, not self.reversed.get(session))
+
self.column.set(branch, column.name)
+
return branch.marshal()
# XXX for now, not a Widget
[View Less]
17 years, 3 months
rhmessaging commits: r1511 - in mgmt: notes and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-12-17 17:51:27 -0500 (Mon, 17 Dec 2007)
New Revision: 1511
Modified:
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/widgets.py
mgmt/notes/justin-todo.txt
Log:
Renames get_column_name to get_data_name to avoid confusion.
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-12-17 22:42:13 UTC (rev 1510)
+++ mgmt/cumin/python/cumin/queue.py 2007-12-17 …
[View More]22:51:27 UTC (rev 1511)
@@ -68,7 +68,7 @@
return "%s Enqueued" % self.header.parent().get_unit_plural \
(session)
- def get_column_name(self, session):
+ def get_data_name(self, session):
if self.header.parent().unit.get(session) == "b":
return QueueStats.q.byteTotalEnqueues
else:
@@ -79,7 +79,7 @@
return "%s Dequeued" % self.header.parent().get_unit_plural \
(session)
- def get_column_name(self, session):
+ def get_data_name(self, session):
if self.header.parent().unit.get(session) == "b":
return QueueStats.q.byteTotalDequeues
else:
@@ -89,7 +89,7 @@
def get_title(self, session):
return "%s Depth" % self.header.parent().get_unit_singular(session)
- def get_column_name(self, session):
+ def get_data_name(self, session):
if self.header.parent().unit.get(session) == "b":
return QueueStats.q.byteDepth
else:
Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py 2007-12-17 22:42:13 UTC (rev 1510)
+++ mgmt/cumin/python/cumin/widgets.py 2007-12-17 22:51:27 UTC (rev 1511)
@@ -362,16 +362,16 @@
# XXX for now, not a Widget
class TableColumn(object):
- def __init__(self, name, column_name=None, title=None, class_=None):
+ def __init__(self, name, data_name=None, title=None, class_=None):
self.name = name
- self.column_name = column_name
+ self.data_name = data_name
self.title = title
self.class_ = class_
self.header = None
- def get_column_name(self, session):
- return self.column_name
+ def get_data_name(self, session):
+ return self.data_name
def get_title(self, session):
return self.title
@@ -386,11 +386,11 @@
return classes
def get_sorted_items(self, session, items):
- name = self.get_column_name(session)
+ name = self.get_data_name(session)
if name:
# XXX sqlobject specific
- items = items.orderBy(self.get_column_name(session))
+ items = items.orderBy(self.get_data_name(session))
return items
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2007-12-17 22:42:13 UTC (rev 1510)
+++ mgmt/notes/justin-todo.txt 2007-12-17 22:51:27 UTC (rev 1511)
@@ -39,6 +39,8 @@
Deferred
+ * Add [None] to groups field in broker view
+
* Go back to Widget.parent as an attr, not a function
* Indicate how old stats are
[View Less]
17 years, 3 months
rhmessaging commits: r1510 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-12-17 17:42:13 -0500 (Mon, 17 Dec 2007)
New Revision: 1510
Modified:
mgmt/cumin/python/cumin/widgets.py
Log:
Adds a default selected column.
Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py 2007-12-17 22:27:15 UTC (rev 1509)
+++ mgmt/cumin/python/cumin/widgets.py 2007-12-17 22:42:13 UTC (rev 1510)
@@ -337,6 +337,9 @@
self.columns.append(column)
…
[View More] column.header = self
+ if not self.column.default:
+ self.column.set_default(column.name)
+
def get_selected_column(self, session):
name = self.column.get(session)
for column in self.columns:
[View Less]
17 years, 3 months
rhmessaging commits: r1509 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-12-17 17:27:15 -0500 (Mon, 17 Dec 2007)
New Revision: 1509
Modified:
mgmt/cumin/python/cumin/queue.py
Log:
Fixes column heading misordering.
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-12-17 22:17:21 UTC (rev 1508)
+++ mgmt/cumin/python/cumin/queue.py 2007-12-17 22:27:15 UTC (rev 1509)
@@ -31,14 +31,14 @@
col = TableColumn("name", Queue.q.name, "…
[View More]Name")
self.header.add_column(col)
+ col = TableColumn("consumers", QueueStats.q.consumers,
+ "Consumers", "ralign")
+ self.header.add_column(col)
+
col = TableColumn("bindings", QueueStats.q.bindings,
"Exchange Bindings", "ralign")
self.header.add_column(col)
- col = TableColumn("consumers", QueueStats.q.consumers,
- "Consumers", "ralign")
- self.header.add_column(col)
-
col = self.EnqueuedColumn("enqueued", None, None, "ralign")
self.header.add_column(col)
[View Less]
17 years, 3 months
rhmessaging commits: r1508 - store/trunk/cpp/lib/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2007-12-17 17:17:21 -0500 (Mon, 17 Dec 2007)
New Revision: 1508
Modified:
store/trunk/cpp/lib/jrnl/jcntl.cpp
store/trunk/cpp/lib/jrnl/jexception.cpp
store/trunk/cpp/lib/jrnl/jexception.hpp
Log:
Additional bugfixes around threading for BZ423981 and a fix for possible scope problems in jexception::what().
Modified: store/trunk/cpp/lib/jrnl/jcntl.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jcntl.cpp 2007-12-17 …
[View More]22:14:21 UTC (rev 1507)
+++ store/trunk/cpp/lib/jrnl/jcntl.cpp 2007-12-17 22:17:21 UTC (rev 1508)
@@ -341,7 +341,7 @@
const u_int32_t
jcntl::get_wr_events()
{
- stlock t(&_gev_mutex);
+ stlock t(&_wr_mutex);
if (t.locked())
return _wmgr.get_events(pmgr::UNUSED);
return 0;
@@ -427,7 +427,7 @@
u_int32_t cnt = 0;
while (_wmgr.get_aio_evt_rem())
{
- get_wr_events();
+ _wmgr.get_events(pmgr::UNUSED);
if (cnt++ > MAX_AIO_CMPL_SLEEPS)
throw jexception(jerrno::JERR_JCNTL_AIOCMPLWAIT, "jcntl", "aio_cmpl_wait");
usleep(AIO_CMPL_SLEEP);
@@ -441,7 +441,7 @@
if (res == RHM_IORES_AIO_WAIT)
{
u_int32_t cnt = 0;
- while (get_wr_events() == 0)
+ while (_wmgr.get_events(pmgr::UNUSED) == 0)
{
if (cnt++ > MAX_AIO_CMPL_SLEEPS)
throw jexception(jerrno::JERR_JCNTL_AIOCMPLWAIT, "jcntl", "aio_cmpl_wait");
Modified: store/trunk/cpp/lib/jrnl/jexception.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jexception.cpp 2007-12-17 22:14:21 UTC (rev 1507)
+++ store/trunk/cpp/lib/jrnl/jexception.cpp 2007-12-17 22:17:21 UTC (rev 1508)
@@ -46,36 +46,48 @@
jexception::jexception() throw ():
std::exception(),
_err_code(0)
-{}
+{
+ format();
+}
jexception::jexception(const u_int32_t err_code) throw ():
std::exception(),
_err_code(err_code)
-{}
+{
+ format();
+}
jexception::jexception(const char* additional_info) throw ():
std::exception(),
_err_code(0),
_additional_info(additional_info)
-{}
+{
+ format();
+}
jexception::jexception(const std::string& additional_info) throw ():
std::exception(),
_err_code(0),
_additional_info(additional_info)
-{}
+{
+ format();
+}
jexception::jexception(const u_int32_t err_code, const char* additional_info) throw ():
std::exception(),
_err_code(err_code),
_additional_info(additional_info)
-{}
+{
+ format();
+}
jexception::jexception(const u_int32_t err_code, const std::string& additional_info) throw ():
std::exception(),
_err_code(err_code),
_additional_info(additional_info)
-{}
+{
+ format();
+}
jexception::jexception(const u_int32_t err_code, const char* throwing_class,
const char* throwing_fn) throw ():
@@ -83,7 +95,9 @@
_err_code(err_code),
_throwing_class(throwing_class),
_throwing_fn(throwing_fn)
-{}
+{
+ format();
+}
jexception::jexception(const u_int32_t err_code, const std::string& throwing_class,
const std::string& throwing_fn) throw ():
@@ -91,7 +105,9 @@
_err_code(err_code),
_throwing_class(throwing_class),
_throwing_fn(throwing_fn)
-{}
+{
+ format();
+}
jexception::jexception(const u_int32_t err_code, const char* additional_info,
const char* throwing_class, const char* throwing_fn) throw ():
@@ -100,7 +116,9 @@
_additional_info(additional_info),
_throwing_class(throwing_class),
_throwing_fn(throwing_fn)
-{}
+{
+ format();
+}
jexception::jexception(const u_int32_t err_code, const std::string& additional_info,
const std::string& throwing_class, const std::string& throwing_fn) throw ():
@@ -109,13 +127,15 @@
_additional_info(additional_info),
_throwing_class(throwing_class),
_throwing_fn(throwing_fn)
-{}
+{
+ format();
+}
jexception::~jexception() throw ()
{}
-const char*
-jexception::what() const throw ()
+void
+jexception::format()
{
const bool ai = !_additional_info.empty();
const bool tc = !_throwing_class.empty();
@@ -136,9 +156,15 @@
oss << "threw " << jerrno::err_msg(_err_code);
if (ai)
oss << " (" << _additional_info << ")";
- return oss.str().c_str();
+ _what.assign(oss.str());
}
+const char*
+jexception::what() const throw ()
+{
+ return _what.c_str();
+}
+
std::ostream&
operator<<(std::ostream& os, const jexception& je)
{
Modified: store/trunk/cpp/lib/jrnl/jexception.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jexception.hpp 2007-12-17 22:14:21 UTC (rev 1507)
+++ store/trunk/cpp/lib/jrnl/jexception.hpp 2007-12-17 22:17:21 UTC (rev 1508)
@@ -78,6 +78,8 @@
std::string _additional_info;
std::string _throwing_class;
std::string _throwing_fn;
+ std::string _what;
+ void format();
public:
jexception() throw ();
[View Less]
17 years, 3 months
rhmessaging commits: r1507 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-12-17 17:14:21 -0500 (Mon, 17 Dec 2007)
New Revision: 1507
Modified:
mgmt/cumin/python/cumin/widgets.py
mgmt/cumin/python/cumin/widgets.strings
Log:
Adds an indication of the current column by which we are sorting.
Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py 2007-12-17 21:51:49 UTC (rev 1506)
+++ mgmt/cumin/python/cumin/widgets.py 2007-12-17 22:14:21 …
[View More]UTC (rev 1507)
@@ -374,8 +374,14 @@
return self.title
def get_class(self, session):
- return self.class_
+ column = self.header.get_selected_column(session)
+ classes = self.class_
+ if self is column:
+ classes = (classes or "") + " selected"
+
+ return classes
+
def get_sorted_items(self, session, items):
name = self.get_column_name(session)
Modified: mgmt/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/cumin/python/cumin/widgets.strings 2007-12-17 21:51:49 UTC (rev 1506)
+++ mgmt/cumin/python/cumin/widgets.strings 2007-12-17 22:14:21 UTC (rev 1507)
@@ -82,6 +82,11 @@
[Paginator.item_html]
<li><a {item_class_attr} href="{item_href}">{item_content}</a></li>
+[TableHeader.css]
+th.selected a {
+ color: black;
+}
+
[TableHeader.html]
<thead>
<tr>{items}</tr>
[View Less]
17 years, 3 months