rhmessaging commits: r2787 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-11 15:39:13 -0500 (Tue, 11 Nov 2008)
New Revision: 2787
Modified:
mgmt/trunk/cumin/python/cumin/brokergroup.py
Log:
Fix exception when canceling Broker Group Add.
Fix canceling Broker Group Edit so it returns to correct page instead of always redirecting to BrokerGroupSet page.
Modified: mgmt/trunk/cumin/python/cumin/brokergroup.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokergroup.py 2008-11-11 20:15:06 UTC (rev 2786)
+++ mgmt/trunk/cumin/python/cumin/brokergroup.py 2008-11-11 20:39:13 UTC (rev 2787)
@@ -136,11 +136,9 @@
class BrokerGroupAdd(BrokerGroupForm):
def process_cancel(self, session):
branch = session.branch()
- self.page.pop_current_frame(branch)
- self.page.pop_current_frame(branch)
- self.page.get_current_frame(branch).show_view(branch)
+ self.page.main.view.show(branch)
self.page.set_redirect_url(session, branch.marshal())
-
+
def process_submit(self, session):
errors = self.validate(session)
@@ -162,8 +160,7 @@
def process_cancel(self, session, group):
branch = session.branch()
- self.page.pop_current_frame(branch)
- self.page.get_current_frame(branch).show_view(branch)
+ self.frame.show_view(branch)
self.page.set_redirect_url(session, branch.marshal())
def process_submit(self, session, group):
@@ -190,7 +187,6 @@
def process_cancel(self, session, group):
branch = session.branch()
-
self.frame.show_view(branch)
self.page.pop_current_frame(branch)
self.page.set_redirect_url(session, branch.marshal())
16 years, 2 months
rhmessaging commits: r2786 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-11 15:15:06 -0500 (Tue, 11 Nov 2008)
New Revision: 2786
Modified:
mgmt/trunk/cumin/python/cumin/user.py
Log:
Fix exception when canceling from change password form.
Modified: mgmt/trunk/cumin/python/cumin/user.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/user.py 2008-11-11 17:20:21 UTC (rev 2785)
+++ mgmt/trunk/cumin/python/cumin/user.py 2008-11-11 20:15:06 UTC (rev 2786)
@@ -142,7 +142,7 @@
def process_cancel(self, session):
branch = session.branch()
- self.page.show_main(branch).show_view(branch)
+ self.page.main.view.show(branch)
self.page.set_redirect_url(session, branch.marshal())
def process_submit(self, session):
16 years, 2 months
rhmessaging commits: r2785 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-11 12:20:21 -0500 (Tue, 11 Nov 2008)
New Revision: 2785
Modified:
mgmt/trunk/cumin/python/cumin/binding.strings
mgmt/trunk/cumin/python/cumin/widgets.strings
Log:
Jump to bookmark after submitting form using SubmitSwitch
Modified: mgmt/trunk/cumin/python/cumin/binding.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/binding.strings 2008-11-11 16:16:53 UTC (rev 2784)
+++ mgmt/trunk/cumin/python/cumin/binding.strings 2008-11-11 17:20:21 UTC (rev 2785)
@@ -134,7 +134,7 @@
}
[ExchangeKeysField.html]
-<div class="field"><a name="phase"></a>
+<div class="field">
<div class="rfloat">{phase}</div>
<div class="title">{title}</div>
<div class="rclear"> </div>
Modified: mgmt/trunk/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.strings 2008-11-11 16:16:53 UTC (rev 2784)
+++ mgmt/trunk/cumin/python/cumin/widgets.strings 2008-11-11 17:20:21 UTC (rev 2785)
@@ -860,12 +860,13 @@
} else {
oHidden.value = state;
}
+ document.forms[0].action += "#phase";
document.forms[0].submit();
}
}
[SubmitSwitch.html]
-<ul class="radiotabs">
+<a name="phase"></a><ul class="radiotabs">
{items}
</ul><input type="hidden" name="{name}" value="{value}" />
16 years, 2 months
rhmessaging commits: r2784 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-11 11:16:53 -0500 (Tue, 11 Nov 2008)
New Revision: 2784
Modified:
mgmt/trunk/cumin/python/cumin/brokerlink.py
mgmt/trunk/cumin/python/cumin/exchange.py
mgmt/trunk/cumin/python/cumin/model.py
mgmt/trunk/cumin/python/cumin/queue.py
mgmt/trunk/cumin/python/cumin/widgets.py
Log:
Cleaning up TwoOptionRadioField. Now gets option1 and option2 titles from a dynamic context for future i18n support.
Modified: mgmt/trunk/cumin/python/cumin/brokerlink.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokerlink.py 2008-11-11 15:57:53 UTC (rev 2783)
+++ mgmt/trunk/cumin/python/cumin/brokerlink.py 2008-11-11 16:16:53 UTC (rev 2784)
@@ -433,19 +433,19 @@
self.excludes.set(session, "%s:%s" % (args[0].host, args[0].port))
class DynamicField(TwoOptionRadioField):
- def __init__(self, app, name, option1="yes", option2="no"):
- super(BridgeAddForm.DynamicField, self).__init__(app, name, option1, option2)
-
- self.option1_title = "Dynamic"
- self.option2_title = "Not dynamic"
- self.param.default = option2
-
def render_title(self, session):
return "Dynamic Route?"
def render_field_help(self, session):
return "(Should the added route be dynamic)"
+ def render_title_1(self, session):
+ return "Dynamic"
+
+ def render_title_2(self, session):
+ return "Not dynamic"
+
+
class BridgeAddHelpField(FormField):
pass
@@ -589,19 +589,18 @@
return "rdma"
class DurableField(TwoOptionRadioField):
- def __init__(self, app, name, option1="yes", option2="no"):
- super(BrokerLinkAddForm.DurableField, self).__init__(app, name, option1, option2)
-
- self.option1_title = "Yes, restore if broker restarts"
- self.option2_title = "No, do not restore if broker restarts"
- self.param.default = option2
-
def render_title(self, session):
return "Restore if broker restarts?"
def render_field_help(self, session):
return "(Should the added configuration be durable)"
+ def render_title_1(self, session):
+ return "Yes, restore if broker restarts"
+
+ def render_title_2(self, session):
+ return "No, do not restore if broker restarts"
+
class BrokerLinkAdd(BrokerLinkAddForm):
def process_cancel(self, session):
branch = session.branch()
Modified: mgmt/trunk/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/exchange.py 2008-11-11 15:57:53 UTC (rev 2783)
+++ mgmt/trunk/cumin/python/cumin/exchange.py 2008-11-11 16:16:53 UTC (rev 2784)
@@ -359,47 +359,44 @@
self.more.add_field(self.ive)
class SequenceField(TwoOptionRadioField):
- def __init__(self, app, name, option1="yes", option2="no"):
- super(ExchangeForm.SequenceField, self).__init__(app, name, option1, option2)
-
- self.option1_title = "Insert Sequence"
- self.option2_title = "No Sequence"
- self.param.default = "no"
-
def render_title(self, session):
return "Insert Sequence?"
def render_field_help(self, session):
return "(Exchange will insert a 'qpid.msg_sequence' field in the message header)"
- class IVEField(TwoOptionRadioField):
- def __init__(self, app, name, option1="yes", option2="no"):
- super(ExchangeForm.IVEField, self).__init__(app, name, option1, option2)
+ def render_title_1(self, session):
+ return "Insert Sequence"
- self.option1_title = "Initial-Value-Exchange"
- self.option2_title = "No IVE"
- self.param.default = "no"
+ def render_title_2(self, session):
+ return "No Sequence"
+ class IVEField(TwoOptionRadioField):
def render_title(self, session):
return "Initial Value Exchange?"
def render_field_help(self, session):
return "(Exchange will behave as an 'initial-value-exchange', keeping a reference to the last message forwarded and enqueuing that message to newly bound queues)"
- class ExchangeDurabilityField(TwoOptionRadioField):
- def __init__(self, app, name, option1="yes", option2="no"):
- super(ExchangeForm.ExchangeDurabilityField, self).__init__(app, name, option1, option2)
+ def render_title_1(self, session):
+ return "Initial-Value-Exchange"
- self.option1_title = "Durable"
- self.option2_title = "Transient"
- self.param.default = "no"
+ def render_title_2(self, session):
+ return "No IVE"
+ class ExchangeDurabilityField(TwoOptionRadioField):
def render_title(self, session):
return "Durable?"
def render_field_help(self, session):
return "(Queue is durable)"
+ def render_title_1(self, session):
+ return "Durable"
+
+ def render_title_2(self, session):
+ return "Transient"
+
class ExchangeTypeField(RadioField):
def __init__(self, app, name):
super(ExchangeForm.ExchangeTypeField, self).__init__(app, name, None)
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2008-11-11 15:57:53 UTC (rev 2783)
+++ mgmt/trunk/cumin/python/cumin/model.py 2008-11-11 16:16:53 UTC (rev 2784)
@@ -123,36 +123,6 @@
for coll in Collector.select():
return Pool(coll)
-class AdProperty(object):
- groups = ["Main", "Command Info", "Job Status Info", "Condor Info", "Other"]
-
- def __init__(self, cls, name):
- self.model = cls.model
- self.cumin_class = cls
-
- self.description = None
- self.example = None
- self.group = "Main"
- self.name = name
- self.renderer = None
- self.title = None
- self.writable = True
-
- self.cumin_class.add_ad_property(self)
-
- def init(self):
- pass
-
- def get_title(self, session):
- if self.title:
- return self.title
- else:
- return self.name
-
- @classmethod
- def get_ad_groups(cls):
- return cls.groups
-
class CuminProperty(object):
def __init__(self, cls, name):
self.model = cls.model
@@ -187,6 +157,33 @@
return value
+class AdProperty(CuminProperty):
+ groups = ["Main", "Command Info", "Job Status Info", "Condor Info", "Other"]
+
+ def __init__(self, cls, name):
+ # don't call super since we don't want to call add_property
+ self.model = cls.model
+ self.cumin_class = cls
+
+ self.name = name
+ self.title = None
+ self.category = "general"
+ self.summary = False
+ self.escape = True
+ self.prefix = None
+
+ self.description = None
+ self.example = None
+ self.group = "Main"
+ self.renderer = None
+ self.writable = True
+
+ self.cumin_class.add_ad_property(self)
+
+ @classmethod
+ def get_ad_groups(cls):
+ return cls.groups
+
class CuminAction(object):
def __init__(self, cls, name):
self.model = cls.model
@@ -428,8 +425,6 @@
self.ad_properties_by_name = dict()
self.stats = list()
self.actions = list()
- self.ad_properties = list()
- self.ad_properties_by_name = dict()
self.frame = None
@@ -2132,9 +2127,10 @@
prop.title = "Cluster ID"
prop.writable = False
- prop = AdProperty(self, "QDate")
- prop.description = "The number of nanoseconds since epoch when the job was submitted"
+ prop = self.DateAdProperty(self, "QDate")
+ prop.description = "When the job was submitted"
prop.group = "Other"
+ prop.renderer = prop.render_datetime
prop.title = "QDate"
prop.writable = False
@@ -2230,6 +2226,10 @@
def get_object_name(self, job):
return job.CustomId
+ class DateAdProperty(AdProperty):
+ def render_datetime(self, session, value):
+ return fmt_datetime(value)
+
class JobStatusProperty(AdProperty):
def render_status(self, session, status):
return JobStatusInfo.get_status_string(status)
Modified: mgmt/trunk/cumin/python/cumin/queue.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/queue.py 2008-11-11 15:57:53 UTC (rev 2783)
+++ mgmt/trunk/cumin/python/cumin/queue.py 2008-11-11 16:16:53 UTC (rev 2784)
@@ -393,61 +393,57 @@
return "(File size in pages - 64Kb/page)"
class QueueDurabilityField(TwoOptionRadioField):
- def __init__(self, app, name, option1="durable", option2="transient"):
- super(QueueForm.QueueDurabilityField, self).__init__(app, name, option1, option2)
-
- self.option1_title = "Durable"
- self.option2_title = "Transient"
- self.param.default = "transient"
-
def render_title(self, session):
return "Durable?"
def render_field_help(self, session):
return "(Queue is durable)"
- class ClusterDurabilityField(TwoOptionRadioField):
- def __init__(self, app, name, option1="durable", option2="transient"):
- super(QueueForm.ClusterDurabilityField, self).__init__(app, name, option1, option2)
+ def render_title_1(self, session):
+ return "Durable"
- self.option1_title = "Cluster Durable"
- self.option2_title = "Not Cluster Durable"
- self.param.default = "transient"
+ def render_title_2(self, session):
+ return "Transient"
+ class ClusterDurabilityField(TwoOptionRadioField):
def render_title(self, session):
return "Cluster Durable?"
def render_field_help(self, session):
return "(Queue becomes durable if there is only one functioning cluster node)"
- class LVQField(TwoOptionRadioField):
- def __init__(self, app, name, option1="enable", option2="disable"):
- super(QueueForm.LVQField, self).__init__(app, name, option1, option2)
+ def render_title_1(self, session):
+ return "Cluster Durable"
- self.option1_title = "Enabled"
- self.option2_title = "Not Enabled"
- self.param.default = "disable"
+ def render_title_2(self, session):
+ return "Not Cluster Durable"
+ class LVQField(TwoOptionRadioField):
def render_title(self, session):
return "Enable Last Value Queue?"
def render_field_help(self, session):
return "(Enable LVQ behavior on the queue)"
- class OptimisticField(TwoOptionRadioField):
- def __init__(self, app, name, option1="enable", option2="disable"):
- super(QueueForm.OptimisticField, self).__init__(app, name, option1, option2)
+ def render_title_1(self, session):
+ return "Enabled"
- self.option1_title = "Enabled"
- self.option2_title = "Not Enabled"
- self.param.default = "disable"
+ def render_title_2(self, session):
+ return "Not Enabled"
+ class OptimisticField(TwoOptionRadioField):
def render_title(self, session):
return "Enable Optimistic Consume?"
def render_field_help(self, session):
return "(Enable optimistic consume on the queue)"
+ def render_title_1(self, session):
+ return "Enabled"
+
+ def render_title_2(self, session):
+ return "Not Enabled"
+
class PolicyField(RadioField):
def __init__(self, app, name):
super(QueueForm.PolicyField, self).__init__(app, name, None)
@@ -531,15 +527,15 @@
# blank one
queue = Queue()
queue.name = queue_name
- queue.durable = (durable == "durable")
+ queue.durable = (durable == "yes")
reg = self.frame.get_object(session)
args = {}
args["reg"] = reg
args["exchange_keys"] = form_binding_info
- args["cluster_durable"] = self.cluster_durable.get(session) == "durable"
+ args["cluster_durable"] = self.cluster_durable.get(session) == "yes"
args["lvq"] = self.lvq.get(session) == "enable"
- args["optimistic"] = self.optimistic.get(session) == "enable"
+ args["optimistic"] = self.optimistic.get(session) == "yes"
policy = self.policy.get(session)
if policy == "none":
policy = None
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2008-11-11 15:57:53 UTC (rev 2783)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2008-11-11 16:16:53 UTC (rev 2784)
@@ -1018,11 +1018,11 @@
return "An item with this %s already exists" % self.__field
class TwoOptionRadioField(RadioField):
- def __init__(self, app, name, option1="option1", option2="option2"):
+ def __init__(self, app, name, option1="yes", option2="no"):
super(TwoOptionRadioField, self).__init__(app, name, None)
self.param = Parameter(app, "param")
- self.param.default = option1
+ self.param.default = option2
self.add_parameter(self.param)
option = self.Option1(app, option1, self.param)
@@ -1031,30 +1031,22 @@
option = self.Option2(app, option2, self.param)
self.add_option(option)
- self.option1_value = option1
- self.option2_value = option2
- self.option1_title = option1
- self.option2_title = option2
-
def render_title(self, session):
return "Pick an option"
+ def render_title_1(self, session):
+ pass
+
+ def render_title_2(self, session):
+ pass
+
class Option1(RadioFieldOption):
- def render_value(self, session):
- return self.parent.option1_value
-
def render_title(self, session):
- return self.parent.option1_title
+ return self.parent.render_title_1(session)
- def render_radio_class(self, session):
- return "class=\"two_options\""
-
class Option2(RadioFieldOption):
- def render_value(self, session):
- return self.parent.option2_value
-
def render_title(self, session):
- return self.parent.option2_title
+ return self.parent.render_title_2(session)
class MultiplicityField(RadioField):
def __init__(self, app, name):
16 years, 2 months
rhmessaging commits: r2783 - store/trunk/cpp/lib/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-11-11 10:57:53 -0500 (Tue, 11 Nov 2008)
New Revision: 2783
Modified:
store/trunk/cpp/lib/jrnl/wmgr.cpp
Log:
Logic fix for possible JERR_FCNTL_CMPLOFFSOVFL errors in small journal/large message combination
Modified: store/trunk/cpp/lib/jrnl/wmgr.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/wmgr.cpp 2008-11-11 13:13:11 UTC (rev 2782)
+++ store/trunk/cpp/lib/jrnl/wmgr.cpp 2008-11-11 15:57:53 UTC (rev 2783)
@@ -876,6 +876,7 @@
u_int32_t fid = fhp->_fid;
fcntl* fcntlp = _jc->get_fcntlp(fid);
fcntlp->add_wr_cmpl_cnt_dblks(JRNL_SBLK_SIZE);
+ fcntlp->decr_aio_cnt();
}
}
@@ -1061,6 +1062,7 @@
throw jexception(jerrno::JERR__AIO, "wmgr", "write_fhdr");
_aio_evt_rem++;
_wrfc.add_subm_cnt_dblks(JRNL_SBLK_SIZE);
+ _wrfc.incr_aio_cnt();
}
void
16 years, 2 months
rhmessaging commits: r2782 - store/trunk/cpp/lib/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-11-11 08:13:11 -0500 (Tue, 11 Nov 2008)
New Revision: 2782
Modified:
store/trunk/cpp/lib/jrnl/fcntl.cpp
Log:
Improved exception messages for class fcntl which reflect instance fid and lid.
Modified: store/trunk/cpp/lib/jrnl/fcntl.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/fcntl.cpp 2008-11-11 13:10:29 UTC (rev 2781)
+++ store/trunk/cpp/lib/jrnl/fcntl.cpp 2008-11-11 13:13:11 UTC (rev 2782)
@@ -121,7 +121,7 @@
if (_wr_fh < 0)
{
std::ostringstream oss;
- oss << "file=\"" << _fname << "\"" << FORMAT_SYSERR(errno);
+ oss << "fid=" << _fid << " lid=" << _lid << " file=\"" << _fname << "\"" << FORMAT_SYSERR(errno);
throw jexception(jerrno::JERR_FCNTL_OPENWR, oss.str(), "fcntl", "open_fh");
}
}
@@ -149,7 +149,11 @@
fcntl::decr_enqcnt()
{
if (_rec_enqcnt == 0)
- throw jexception(jerrno::JERR__UNDERFLOW, "fcntl", "decr_enqcnt");
+ {
+ std::ostringstream oss;
+ oss << "fid=" << _fid << " lid=" << _lid;
+ throw jexception(jerrno::JERR__UNDERFLOW, oss.str(), "fcntl", "decr_enqcnt");
+ }
return --_rec_enqcnt;
}
@@ -159,7 +163,7 @@
if (_rec_enqcnt < s)
{
std::ostringstream oss;
- oss << "_rec_enqcnt=" << _rec_enqcnt << " decr=" << s;
+ oss << "fid=" << _fid << " lid=" << _lid << " rec_enqcnt=" << _rec_enqcnt << " decr=" << s;
throw jexception(jerrno::JERR__UNDERFLOW, oss.str(), "fcntl", "subtr_enqcnt");
}
_rec_enqcnt -= s;
@@ -172,8 +176,8 @@
if (_rd_subm_cnt_dblks + a > _wr_subm_cnt_dblks)
{
std::ostringstream oss;
- oss << "_rd_subm_cnt_dblks=" << _rd_subm_cnt_dblks << " incr=" << a;
- oss << " _wr_subm_cnt_dblks=" << _wr_subm_cnt_dblks;
+ oss << "fid=" << _fid << " lid=" << _lid << " rd_subm_cnt_dblks=" << _rd_subm_cnt_dblks << " incr=" << a;
+ oss << " wr_subm_cnt_dblks=" << _wr_subm_cnt_dblks;
throw jexception(jerrno::JERR_FCNTL_RDOFFSOVFL, oss.str(), "fcntl", "add_rd_subm_cnt_dblks");
}
_rd_subm_cnt_dblks += a;
@@ -186,10 +190,9 @@
if (_rd_cmpl_cnt_dblks + a > _rd_subm_cnt_dblks)
{
std::ostringstream oss;
- oss << "_rd_cmpl_cnt_dblks=" << _rd_cmpl_cnt_dblks << " incr=" << a;
- oss << " _rd_subm_cnt_dblks=" << _rd_subm_cnt_dblks;
- throw jexception(jerrno::JERR_FCNTL_CMPLOFFSOVFL, oss.str(), "fcntl",
- "add_rd_cmpl_cnt_dblks");
+ oss << "fid=" << _fid << " lid=" << _lid << " rd_cmpl_cnt_dblks=" << _rd_cmpl_cnt_dblks << " incr=" << a;
+ oss << " rd_subm_cnt_dblks=" << _rd_subm_cnt_dblks;
+ throw jexception(jerrno::JERR_FCNTL_CMPLOFFSOVFL, oss.str(), "fcntl", "add_rd_cmpl_cnt_dblks");
}
_rd_cmpl_cnt_dblks += a;
return _rd_cmpl_cnt_dblks;
@@ -201,10 +204,9 @@
if (_wr_subm_cnt_dblks + a > _ffull_dblks) // Allow for file header
{
std::ostringstream oss;
- oss << "_wr_subm_cnt_dblks=" << _wr_subm_cnt_dblks << " incr=" << a;
+ oss << "fid=" << _fid << " lid=" << _lid << " wr_subm_cnt_dblks=" << _wr_subm_cnt_dblks << " incr=" << a;
oss << " fsize=" << _ffull_dblks << " dblks";
- throw jexception(jerrno::JERR_FCNTL_FILEOFFSOVFL, oss.str(), "fcntl",
- "add_wr_subm_cnt_dblks");
+ throw jexception(jerrno::JERR_FCNTL_FILEOFFSOVFL, oss.str(), "fcntl", "add_wr_subm_cnt_dblks");
}
_wr_subm_cnt_dblks += a;
return _wr_subm_cnt_dblks;
@@ -216,10 +218,9 @@
if (_wr_cmpl_cnt_dblks + a > _wr_subm_cnt_dblks)
{
std::ostringstream oss;
- oss << "_wr_cmpl_cnt_dblks=" << _wr_cmpl_cnt_dblks << " incr=" << a;
- oss << " _wr_subm_cnt_dblks=" << _wr_subm_cnt_dblks;
- throw jexception(jerrno::JERR_FCNTL_CMPLOFFSOVFL, oss.str(), "fcntl",
- "add_wr_cmpl_cnt_dblks");
+ oss << "fid=" << _fid << " lid=" << _lid << " wr_cmpl_cnt_dblks=" << _wr_cmpl_cnt_dblks << " incr=" << a;
+ oss << " wr_subm_cnt_dblks=" << _wr_subm_cnt_dblks;
+ throw jexception(jerrno::JERR_FCNTL_CMPLOFFSOVFL, oss.str(), "fcntl", "add_wr_cmpl_cnt_dblks");
}
_wr_cmpl_cnt_dblks += a;
return _wr_cmpl_cnt_dblks;
@@ -229,8 +230,11 @@
fcntl::decr_aio_cnt()
{
if(_aio_cnt == 0)
- throw jexception(jerrno::JERR__UNDERFLOW, "Decremented _aio_cnt when already zero", "fcntl",
- "decr_aio_cnt");
+ {
+ std::ostringstream oss;
+ oss << "fid=" << _fid << " lid=" << _lid << " Decremented aio_cnt to below zero";
+ throw jexception(jerrno::JERR__UNDERFLOW, oss.str(), "fcntl", "decr_aio_cnt");
+ }
return --_aio_cnt;
}
16 years, 2 months
rhmessaging commits: r2781 - store/trunk/cpp.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-11-11 08:10:29 -0500 (Tue, 11 Nov 2008)
New Revision: 2781
Modified:
store/trunk/cpp/configure.ac
Log:
Updated configure.ac to show version 0.3 (which ties in with qpid version).
Modified: store/trunk/cpp/configure.ac
===================================================================
--- store/trunk/cpp/configure.ac 2008-11-10 21:45:06 UTC (rev 2780)
+++ store/trunk/cpp/configure.ac 2008-11-11 13:10:29 UTC (rev 2781)
@@ -21,7 +21,7 @@
dnl
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([rhm], [0.2], [rhemrg-users-list(a)redhat.com])
+AC_INIT([rhm], [0.3], [rhemrg-users-list(a)redhat.com])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([dist-bzip2])
16 years, 2 months
rhmessaging commits: r2780 - mgmt/trunk/mint/python/mint.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-10 16:45:06 -0500 (Mon, 10 Nov 2008)
New Revision: 2780
Modified:
mgmt/trunk/mint/python/mint/update.py
Log:
Don't allow recTimes to be in the future. This prevents statistics graph drawing problems because of differences in machine times.
Modified: mgmt/trunk/mint/python/mint/update.py
===================================================================
--- mgmt/trunk/mint/python/mint/update.py 2008-11-10 15:39:44 UTC (rev 2779)
+++ mgmt/trunk/mint/python/mint/update.py 2008-11-10 21:45:06 UTC (rev 2780)
@@ -13,6 +13,12 @@
log = logging.getLogger("mint.update")
+def time_unwarp(t):
+ """ don't allow future dates """
+
+ tnow = datetime.now()
+ return t > tnow and tnow or t
+
class ModelUpdateThread(Thread):
def __init__(self, model):
super(ModelUpdateThread, self).__init__()
@@ -180,7 +186,8 @@
# XXX move these down to the try/except
attrs["managedBroker"] = self.conn.id
- attrs["recTime"] = datetime.fromtimestamp(self.timestamps[0]/1000000000)
+ attrs["recTime"] = time_unwarp(datetime.fromtimestamp \
+ (self.timestamps[0]/1000000000))
attrs["creationTime"] = datetime.fromtimestamp \
(self.timestamps[1]/1000000000)
@@ -263,8 +270,8 @@
# insertion in db is deferred until parent info is received
return
- attrs["recTime"] = datetime.fromtimestamp(self.timestamps[0]/1000000000)
-
+ attrs["recTime"] = time_unwarp(datetime.fromtimestamp \
+ (self.timestamps[0]/1000000000))
# Set the stat->obj reference
attrs[cls.__name__[0].lower() + cls.__name__[1:]] = obj
@@ -346,3 +353,4 @@
self.conn.brokerId = uuid
self.conn.sessionId = self.data.sessionId
+
16 years, 2 months
Re: [rhmessaging-commits] rhmessaging commits: r2767 - mgmt/trunk/cumin/python/cumin.
by Justin Ross
I like the new TwoOptionRadioField, but it has a flaw imo: the titles need to come from a dynamic context, because when we do localization, the static ones below won't "switch" properly.
Instead, I recommend:
def render_title_1(session, *args):
pass
def render_title_2(session, *args):
pass
I know there are other places where we have static strings like that, but I hope we can shrink the number of those over time, because when we do i18n, we'll have lots of fix ups to do.
----- Original Message -----
From: rhmessaging-commits(a)lists.jboss.org
To: rhmessaging-commits(a)lists.jboss.org
Sent: Saturday, November 8, 2008 12:48:37 PM GMT -05:00 US/Canada Eastern
Subject: [rhmessaging-commits] rhmessaging commits: r2767 - mgmt/trunk/cumin/python/cumin.
+ class DynamicField(TwoOptionRadioField):
+ def __init__(self, app, name, option1="yes", option2="no"):
+ super(BridgeAddForm.DynamicField, self).__init__(app, name, option1, option2)
+
+ self.option1_title = "Dynamic"
+ self.option2_title = "Not dynamic"
+ self.param.default = option2
16 years, 2 months
Re: [rhmessaging-commits] rhmessaging commits: r2766 - mgmt/trunk/cumin/python/wooly.
by Justin Ross
Ernie, two questions:
* Shouldn't that be called render_field_class, since that's how the other similar method is named?
* Do we need a special class render method on form field, since widget has render_class?
Justin
----- Original Message -----
From: rhmessaging-commits(a)lists.jboss.org
To: rhmessaging-commits(a)lists.jboss.org
Sent: Saturday, November 8, 2008 12:46:25 PM GMT -05:00 US/Canada Eastern
Subject: [rhmessaging-commits] rhmessaging commits: r2766 - mgmt/trunk/cumin/python/wooly.
Author: eallen
Date: 2008-11-08 12:46:25 -0500 (Sat, 08 Nov 2008)
New Revision: 2766
Modified:
mgmt/trunk/cumin/python/wooly/forms.py
mgmt/trunk/cumin/python/wooly/forms.strings
Log:
Added compact version of FormField. This will display the field title to the left of the input and on the same line.
Modified: mgmt/trunk/cumin/python/wooly/forms.py
===================================================================
--- mgmt/trunk/cumin/python/wooly/forms.py 2008-11-06 22:32:22 UTC (rev 2765)
+++ mgmt/trunk/cumin/python/wooly/forms.py 2008-11-08 17:46:25 UTC (rev 2766)
@@ -280,6 +280,8 @@
self.__errors = FormErrorSet(app, "errors")
self.add_child(self.__errors)
+ self.css_class = "field"
+
def validate(self, session):
errors = self.__errors.get(session)
@@ -293,6 +295,9 @@
def render_field_help(self, session, *args):
pass
+ def render_form_field_class(self, session, *args):
+ return self.css_class
+
class ScalarField(FormField):
def __init__(self, app, name, input):
super(ScalarField, self).__init__(app, name)
Modified: mgmt/trunk/cumin/python/wooly/forms.strings
===================================================================
--- mgmt/trunk/cumin/python/wooly/forms.strings 2008-11-06 22:32:22 UTC (rev 2765)
+++ mgmt/trunk/cumin/python/wooly/forms.strings 2008-11-08 17:46:25 UTC (rev 2766)
@@ -72,10 +72,37 @@
div.field div.inputs {
margin: 0 0 1em 1em;
}
+div.field div.clear_left {
+ clear: left;
+}
+/* optional styles for displaying a FormField */
+div.compact {
+ padding: 0;
+ margin: 0;
+}
+div.compact div.title {
+ float: left;
+ margin: 0;
+ width: 6em;
+}
+div.compact div.field_help {
+ font-size: 0.9em;
+ color: #222;
+}
+div.compact div.inputs {
+ margin-left: 1em;
+}
+div.compact.first {
+ margin-top: 1em;
+}
+div.compact.last {
+ margin-bottom: 1em;
+}
+
[FormField.html]
-<div class="field">
- <div class="title">{title}</div> <div class="field_help">{field_help}</div><div style="clear:left;"><!-- --></div>
+<div class="{form_field_class}">
+ <div class="title">{title}</div> <div class="field_help">{field_help}</div><div class="clear_left"></div>
{errors}
<div class="inputs">{inputs}</div><div style="clear:left;"><!-- --></div>
</div>
_______________________________________________
rhmessaging-commits mailing list
rhmessaging-commits(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rhmessaging-commits
16 years, 2 months