rhmessaging commits: r2749 - mgmt/trunk/cumin/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-05 16:36:46 -0500 (Wed, 05 Nov 2008)
New Revision: 2749
Modified:
mgmt/trunk/cumin/python/wooly/forms.py
mgmt/trunk/cumin/python/wooly/forms.strings
Log:
Adding a HiddenInput FormInput
Modified: mgmt/trunk/cumin/python/wooly/forms.py
===================================================================
--- mgmt/trunk/cumin/python/wooly/forms.py 2008-11-05 21:35:57 UTC (rev 2748)
+++ mgmt/trunk/cumin/python/wooly/forms.py 2008-11-05 21:36:46 UTC (rev 2749)
@@ -184,6 +184,13 @@
class PasswordInput(StringInput):
pass
+class HiddenInput(ScalarInput):
+ def __init__(self, app, name):
+ super(HiddenInput, self).__init__(app, name, None)
+
+ self.param = BooleanParameter(app, "param")
+ self.add_parameter(self.param)
+
class IntegerInput(ScalarInput):
def __init__(self, app, name):
super(IntegerInput, self).__init__(app, name, None)
Modified: mgmt/trunk/cumin/python/wooly/forms.strings
===================================================================
--- mgmt/trunk/cumin/python/wooly/forms.strings 2008-11-05 21:35:57 UTC (rev 2748)
+++ mgmt/trunk/cumin/python/wooly/forms.strings 2008-11-05 21:36:46 UTC (rev 2749)
@@ -22,6 +22,9 @@
[CheckboxInput.html]
<input type="checkbox" name="{name}" value="{value}" tabindex="{tab_index}" {checked_attr} {disabled_attr}/>
+[HiddenInput.html]
+<input type="hidden" name="{name}" value="{value}" tabindex="{tab_index}"/>
+
[RadioInput.html]
<input type="radio" id="{id}" name="{name}" value="{value}" tabindex="{tab_index}" {checked_attr} {disabled_attr}/>
15 years, 7 months
rhmessaging commits: r2748 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-05 16:35:57 -0500 (Wed, 05 Nov 2008)
New Revision: 2748
Modified:
mgmt/trunk/cumin/python/cumin/widgets.py
mgmt/trunk/cumin/python/cumin/widgets.strings
Log:
Changing the way the MoreOptions widget stores its parameter.
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2008-11-05 21:34:11 UTC (rev 2747)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2008-11-05 21:35:57 UTC (rev 2748)
@@ -547,7 +547,7 @@
def get_title(self, state):
return state in self.__titles and self.__titles[state]
- def render_item_link(self, session, state, id=""):
+ def render_item_link(self, session, state, id="", bm=""):
branch = session.branch()
self.set(branch, state)
@@ -555,7 +555,7 @@
hover = self.__hover[state]
class_ = self.get(session) == state and "selected"
- return fmt_link(branch.marshal(), title, class_, id=id, link_title=hover)
+ return fmt_link(branch.marshal(), title, class_, id=id, link_title=hover, bm=bm)
class GroupSwitch(StateSwitch):
def __init__(self, app, name):
@@ -1100,6 +1100,12 @@
return self.name
class MoreFieldSet(FieldForm, FormField):
+ def __init__(self, app, name):
+ super(MoreFieldSet, self).__init__(app, name)
+
+ self.input = HiddenInput(app, "open")
+ self.add_child(self.input)
+
def render_inputs(self, session, *args):
return self.render_fields(session, *args)
@@ -1108,3 +1114,18 @@
def render_less_text(self, session, *args):
return "Hide Advanced Options..."
+
+ def render_state_text(self, session, *args):
+ return self.input.get(session) \
+ and self.render_less_text(session, *args) \
+ or self.render_more_text(session, *args)
+
+ def render_open_state(self, session, *args):
+ return self.input.do_marshal(self.input.get(session))
+
+ def render_open_path(self, session, *args):
+ return self.input.render_name(session, *args)
+
+ def render_open_display(self, session, *args):
+ return self.input.get(session) and "block" or "none"
+
\ No newline at end of file
Modified: mgmt/trunk/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.strings 2008-11-05 21:34:11 UTC (rev 2747)
+++ mgmt/trunk/cumin/python/cumin/widgets.strings 2008-11-05 21:35:57 UTC (rev 2748)
@@ -846,6 +846,9 @@
{items}
</ul>
+[StateSwitch.item_html]
+<li>{item_link}</li>
+
[CuminEditableProperties.html]
<table class="PropertySet Editable">
<thead>
@@ -890,9 +893,6 @@
[EditablePropertyRenderer.orig_html]
<input type="hidden" name="{porig_name}" value="{porig_value}"/>
-[StateSwitch.item_html]
-<li>{item_link}</li>
-
[CuminTable.css]
table.mobjects th.setnav {
font-size: 0.9em;
@@ -994,7 +994,6 @@
[MoreFieldSet.css]
div.more_inputs {
- display: none;
margin-left: 0.5em;
margin-right: 0.5em;
padding: 0.5em;
@@ -1010,10 +1009,10 @@
<div class="more_field_set">
<ul class="actions">
<li>
- <a class="nav" href="#" onclick="toggle_more_fieldset(); return false;"><span id="button_{id}">{more_text}</span></a>
+ <a class="nav" href="#" onclick="toggle_more_fieldset(); return false;"><span id="button_{id}">{state_text}</span></a>
</li>
- </ul>
- <div id="{id}" class="more_inputs" style="display:none;">
+ </ul>{open}
+ <div id="{id}" class="more_inputs" style="display:{open_display};">
{inputs}
</div>
</div><!-- end of "more_field_set" -->
@@ -1021,17 +1020,25 @@
function toggle_more_fieldset() {
var oDiv = document.getElementById("{id}");
var oButton = document.getElementById("button_{id}");
+ var oState = document.forms[0].elements["{open_path}"];
if (oDiv) {
if (oDiv.style.display == "none") {
oDiv.style.display = "block";
if (oButton)
oButton.innerHTML = "{less_text}";
+ if (oState)
+ oState.value = "t";
} else {
oDiv.style.display = "none"
if (oButton)
oButton.innerHTML = "{more_text}";
+ if (oState)
+ oState.value = "f";
}
+ document.forms[0].submit();
+
}
}
</script>
-
\ No newline at end of file
+
+
15 years, 7 months
rhmessaging commits: r2747 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-05 16:34:11 -0500 (Wed, 05 Nov 2008)
New Revision: 2747
Modified:
mgmt/trunk/cumin/python/cumin/queue.py
Log:
Default queue add durability option to non-durable.
Restore the cancel method for the queue add dialog.
Modified: mgmt/trunk/cumin/python/cumin/queue.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/queue.py 2008-11-05 21:32:04 UTC (rev 2746)
+++ mgmt/trunk/cumin/python/cumin/queue.py 2008-11-05 21:34:11 UTC (rev 2747)
@@ -398,6 +398,7 @@
self.option1_title = "Durable"
self.option2_title = "Transient"
+ self.param.default = "transient"
def render_title(self, session):
return "Durable?"
@@ -512,6 +513,11 @@
return "Ring Strict"
class QueueAdd(QueueForm):
+ def process_cancel(self, session):
+ branch = session.branch()
+ self.frame.show_view(branch)
+ self.page.set_redirect_url(session, branch.marshal())
+
def process_submit(self, session):
queue_name = self.namef.get(session)
durable = self.durable.get(session)
15 years, 7 months
rhmessaging commits: r2746 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-05 16:32:04 -0500 (Wed, 05 Nov 2008)
New Revision: 2746
Modified:
mgmt/trunk/cumin/python/cumin/formats.py
Log:
Added option to add a hash/bookmark to a formatted link
Modified: mgmt/trunk/cumin/python/cumin/formats.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/formats.py 2008-11-05 21:31:14 UTC (rev 2745)
+++ mgmt/trunk/cumin/python/cumin/formats.py 2008-11-05 21:32:04 UTC (rev 2746)
@@ -119,9 +119,9 @@
return string
-def fmt_link(href, content, class_="", id="", link_title=""):
- return "<a %s href=\"%s\"%s%s>%s</a>" % \
- (id and "id=\"%s\"" % id or "", href, class_ and " class=\"%s\" " % class_ or " ",
+def fmt_link(href, content, class_="", id="", link_title="", bm=""):
+ return "<a %s href=\"%s%s\"%s%s>%s</a>" % \
+ (id and "id=\"%s\"" % id or "", href, bm and "#%s" % bm or "", class_ and " class=\"%s\" " % class_ or " ",
link_title and "title=\"%s\"" % link_title or "", content)
def fmt_olink(session, object, selected=False, name=None, pre=16, post=0):
15 years, 7 months
rhmessaging commits: r2745 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-05 16:31:14 -0500 (Wed, 05 Nov 2008)
New Revision: 2745
Modified:
mgmt/trunk/cumin/python/cumin/brokerlink.py
Log:
Using new .show(session) methodology to show the broker link page
Modified: mgmt/trunk/cumin/python/cumin/brokerlink.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokerlink.py 2008-11-05 21:30:05 UTC (rev 2744)
+++ mgmt/trunk/cumin/python/cumin/brokerlink.py 2008-11-05 21:31:14 UTC (rev 2745)
@@ -73,7 +73,7 @@
def render_content(self, session, data):
peer = Identifiable(data["id"])
branch = session.branch()
- self.frame.show_peer(branch, peer).show_view(branch)
+ self.frame.link.view.show(branch)
name = "%s:%i" % (data["host"], data["port"])
return fmt_olink(branch, peer, name=name)
@@ -216,9 +216,9 @@
self.object = PeerParameter(app, "id")
self.add_parameter(self.object)
- view = PeerView(app, "view")
- self.add_mode(view)
- self.set_view_mode(view)
+ self.view = PeerView(app, "view")
+ self.add_mode(self.view)
+ self.set_view_mode(self.view)
remove = LinkRemove(app, "remove")
self.add_mode(remove)
15 years, 7 months
rhmessaging commits: r2744 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-05 16:30:05 -0500 (Wed, 05 Nov 2008)
New Revision: 2744
Modified:
mgmt/trunk/cumin/python/cumin/binding.py
mgmt/trunk/cumin/python/cumin/binding.strings
Log:
Fixed All/Active radio buttons on queue binding form.
Modified: mgmt/trunk/cumin/python/cumin/binding.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/binding.py 2008-11-05 20:41:02 UTC (rev 2743)
+++ mgmt/trunk/cumin/python/cumin/binding.py 2008-11-05 21:30:05 UTC (rev 2744)
@@ -246,7 +246,7 @@
def render_item_link(self, session, state):
path = state == "a" and "state_all" or "state_active"
- return super(ExchangeState, self).render_item_link(session, state, id=path)
+ return super(ExchangeState, self).render_item_link(session, state, id=path, bm="phase")
def is_all(self, session):
return self.get(session) == "a"
@@ -261,9 +261,6 @@
self.dict_param = DictParameter(app, "exchange")
self.add_parameter(self.dict_param)
- self.phase = self.PhaseParameter(app, "phase")
- self.add_parameter(self.phase)
-
self.direct_input = DirectExchangeInput(app, "direct")
self.add_child(self.direct_input)
@@ -287,9 +284,6 @@
self.state = ExchangeState(app, "phase")
self.add_child(self.state)
- def render_phase_path(self, session, vhost):
- return self.phase.path
-
def get_args(self, session):
reg = self.frame.get_ancestor("broker").get_object(session)
return (reg.getDefaultVhost(),)
@@ -298,10 +292,6 @@
def get_default(self, session):
return dict()
- class PhaseParameter(Parameter):
- def get_default(self, session):
- return ""
-
def render_title(self, session, vhost):
return self.title
@@ -336,12 +326,6 @@
return writer.to_string()
- def render(self, session, *args):
- phase = self.phase.get(session)
- if phase:
- self.state.set(session, phase)
- return super(ExchangeKeysField, self).render(session, *args)
-
def get_binding_errors(self, session, queue_name):
form_binding_info = self.process_binding_info(session, queue_name)
Modified: mgmt/trunk/cumin/python/cumin/binding.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/binding.strings 2008-11-05 20:41:02 UTC (rev 2743)
+++ mgmt/trunk/cumin/python/cumin/binding.strings 2008-11-05 21:30:05 UTC (rev 2744)
@@ -132,25 +132,9 @@
headers_extra.style.display = display;
}
-function toggle_phase(state) {
- var phase_state = document.getElementById("phase_state")
- if (phase_state) {
- phase_state.value = state;
- document.forms[0].submit()
- }
- return false;
-}
-function attachPhase() {
- if (document.getElementById("state_all"))
- document.getElementById("state_all").onclick = function() { return toggle_phase("a") }
- if (document.getElementById("state_active"))
- document.getElementById("state_active").onclick = function() { return toggle_phase("c") }
-}
-addEvent(window, "load", attachPhase);
[ExchangeKeysField.html]
-<div class="field">
- <input id="phase_state" type="hidden" name="{phase_path}" value="" />
+<div class="field"><a name="phase"></a>
<div class="rfloat">{phase}</div>
<div class="title">{title}</div>
<div class="rclear"> </div>
15 years, 7 months
rhmessaging commits: r2743 - mgmt/trunk/cumin/bin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-11-05 15:41:02 -0500 (Wed, 05 Nov 2008)
New Revision: 2743
Modified:
mgmt/trunk/cumin/bin/cumin-database-destroy
mgmt/trunk/cumin/bin/cumin-database-init
Log:
Fixes to the database init and destroy scipts
Modified: mgmt/trunk/cumin/bin/cumin-database-destroy
===================================================================
--- mgmt/trunk/cumin/bin/cumin-database-destroy 2008-11-05 15:08:28 UTC (rev 2742)
+++ mgmt/trunk/cumin/bin/cumin-database-destroy 2008-11-05 20:41:02 UTC (rev 2743)
@@ -1,11 +1,12 @@
-#!/bin/bash
+#!/bin/bash -e
# This script assumes that postgresql is configured and running
-if [ "$EUID" -ne "0" ]; then
+if [[ "$EUID" != "0" ]]; then
echo "This script must be run as root"
exit 2
fi
-su - postgres -c "dropdb cumin"
-su - postgres -c "dropuser cumin"
+su - postgres -c "psql -c '\q'"
+su - postgres -c "dropdb cumin 2> /dev/null || :"
+su - postgres -c "dropuser cumin 2> /dev/null || :"
Modified: mgmt/trunk/cumin/bin/cumin-database-init
===================================================================
--- mgmt/trunk/cumin/bin/cumin-database-init 2008-11-05 15:08:28 UTC (rev 2742)
+++ mgmt/trunk/cumin/bin/cumin-database-init 2008-11-05 20:41:02 UTC (rev 2743)
@@ -1,19 +1,20 @@
-#!/bin/bash
+#!/bin/bash -e
# This script assumes that postgresql is configured and running
-if [ "$EUID" -ne "0" ]; then
+if [[ "$EUID" != "0" ]]; then
echo "This script must be run as root"
- exit 2
+ exit 1
fi
-su - postgres -c "createuser --superuser cumin"
-su - postgres -c "createdb --owner=cumin cumin"
+su - postgres -c "psql -c '\q'"
+su - postgres -c "createuser --superuser cumin 2> /dev/null || :"
+su - postgres -c "createdb --owner=cumin cumin 2> /dev/null || :"
cumin-admin check-schema | grep -e '^OK '
-if [ "$?" = 0 ]; then
+if [[ "$?" == "0" ]]; then
echo "Not creating schema; it already exists"
else
- cumin-admin --force 1 create-schema
+ cumin-admin create-schema
fi
15 years, 7 months
rhmessaging commits: r2742 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-05 10:08:28 -0500 (Wed, 05 Nov 2008)
New Revision: 2742
Modified:
mgmt/trunk/cumin/python/cumin/queue.py
Log:
Changed defaults on Add Queue advanced options.
Re-arranged the Add Queue form a bit.
Don't send default values on add queue submit.
Modified: mgmt/trunk/cumin/python/cumin/queue.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/queue.py 2008-11-05 15:06:45 UTC (rev 2741)
+++ mgmt/trunk/cumin/python/cumin/queue.py 2008-11-05 15:08:28 UTC (rev 2742)
@@ -339,9 +339,6 @@
self.optimistic = self.OptimisticField(app, "optimistic")
self.more.add_field(self.optimistic)
- self.policy = self.PolicyField(app, "policy")
- self.more.add_field(self.policy)
-
self.file_count = self.FileCountField(app, "file_count")
self.file_count.input.param.default = 8
self.more.add_field(self.file_count)
@@ -350,6 +347,9 @@
self.file_size.input.param.default = 24
self.more.add_field(self.file_size)
+ self.policy = self.PolicyField(app, "policy")
+ self.more.add_field(self.policy)
+
self.q_size = self.QSizeField(app, "q_size")
self.more.add_field(self.q_size)
@@ -366,17 +366,17 @@
class QCountField(IntegerField):
def render_title(self, session):
- return "Max Queue Count"
+ return "<div style=\"padding-left: 1em;\">Max Queue Count</div>"
def render_field_help(self, session):
- return "(Maximum in-memory queue size as a number of messages)"
+ return "(Maximum in-memory queue size as a number of messages. Applies if Policy is set.)"
class QSizeField(IntegerField):
def render_title(self, session):
- return "Max Queue Size"
+ return "<div style=\"padding-left: 1em;\">Max Queue Size</div>"
def render_field_help(self, session):
- return "(Maximum in-memory queue size as bytes)"
+ return "(Maximum in-memory queue size as bytes. Applies if Policy is set.)"
class FileCountField(IntegerField):
def render_title(self, session):
@@ -411,6 +411,7 @@
self.option1_title = "Cluster Durable"
self.option2_title = "Not Cluster Durable"
+ self.param.default = "transient"
def render_title(self, session):
return "Cluster Durable?"
@@ -424,6 +425,7 @@
self.option1_title = "Enabled"
self.option2_title = "Not Enabled"
+ self.param.default = "disable"
def render_title(self, session):
return "Enable Last Value Queue?"
@@ -437,6 +439,7 @@
self.option1_title = "Enabled"
self.option2_title = "Not Enabled"
+ self.param.default = "disable"
def render_title(self, session):
return "Enable Optimistic Consume?"
@@ -449,9 +452,12 @@
super(QueueForm.PolicyField, self).__init__(app, name, None)
self.param = Parameter(app, "param")
- self.param.default = "reject"
+ self.param.default = "none"
self.add_parameter(self.param)
+ option = self.NoneField(app, "none", self.param)
+ self.add_option(option)
+
option = self.Reject(app, "reject", self.param)
self.add_option(option)
@@ -470,6 +476,13 @@
def render_field_help(self, session):
return "(Action taken when queue limit is reached)"
+ class NoneField(RadioFieldOption):
+ def render_value(self, session):
+ return "none"
+
+ def render_title(self, session):
+ return "None"
+
class Reject(RadioFieldOption):
def render_value(self, session):
return "reject"
@@ -521,9 +534,20 @@
args["cluster_durable"] = self.cluster_durable.get(session) == "durable"
args["lvq"] = self.lvq.get(session) == "enable"
args["optimistic"] = self.optimistic.get(session) == "enable"
- args["policy"] = self.policy.get(session)
- args["file_count"] = self.file_count.get(session)
- args["file_size"] = self.file_size.get(session)
+ policy = self.policy.get(session)
+ if policy == "none":
+ policy = None
+ args["policy"] = policy
+
+ file_count = self.file_count.get(session)
+ file_size = self.file_size.get(session)
+ if file_count == self.file_count.input.param.default:
+ file_count = None
+ if file_size == self.file_size.input.param.default:
+ file_size = None
+ args["file_count"] = file_count
+ args["file_size"] = file_size
+
args["q_count"] = self.q_count.get(session)
args["q_size"] = self.q_size.get(session)
15 years, 7 months
rhmessaging commits: r2741 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-05 10:06:45 -0500 (Wed, 05 Nov 2008)
New Revision: 2741
Modified:
mgmt/trunk/cumin/python/cumin/widgets.strings
Log:
Changed the button style on MoreFieldSet to be consistent with other form buttons.
Modified: mgmt/trunk/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.strings 2008-11-05 15:05:44 UTC (rev 2740)
+++ mgmt/trunk/cumin/python/cumin/widgets.strings 2008-11-05 15:06:45 UTC (rev 2741)
@@ -996,6 +996,7 @@
div.more_inputs {
display: none;
margin-left: 0.5em;
+ margin-right: 0.5em;
padding: 0.5em;
border: 1px dashed #333;
background-color: #FCFCFC;
@@ -1007,7 +1008,11 @@
[MoreFieldSet.html]
<div class="more_field_set">
- <input type="button" id="button_{id}" onclick="toggle_more_fieldset(); return false;" value="{more_text}" />
+ <ul class="actions">
+ <li>
+ <a class="nav" href="#" onclick="toggle_more_fieldset(); return false;"><span id="button_{id}">{more_text}</span></a>
+ </li>
+ </ul>
<div id="{id}" class="more_inputs" style="display:none;">
{inputs}
</div>
@@ -1020,11 +1025,11 @@
if (oDiv.style.display == "none") {
oDiv.style.display = "block";
if (oButton)
- oButton.value = "{less_text}";
+ oButton.innerHTML = "{less_text}";
} else {
oDiv.style.display = "none"
if (oButton)
- oButton.value = "{more_text}";
+ oButton.innerHTML = "{more_text}";
}
}
}
15 years, 7 months
rhmessaging commits: r2740 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-05 10:05:44 -0500 (Wed, 05 Nov 2008)
New Revision: 2740
Modified:
mgmt/trunk/cumin/python/cumin/model.py
Log:
If property is a dict(), use the new fmt_dict method to display it.
Move add queue static strings out of method and make them class variables.
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2008-11-05 15:03:33 UTC (rev 2739)
+++ mgmt/trunk/cumin/python/cumin/model.py 2008-11-05 15:05:44 UTC (rev 2740)
@@ -163,6 +163,7 @@
self.category = "general"
self.summary = False
self.escape = True
+ self.prefix = None
self.cumin_class.add_property(self)
@@ -181,6 +182,9 @@
if isinstance(value, datetime):
value = fmt_datetime(value)
+ if isinstance(value, dict):
+ value = fmt_dict(value, self.prefix)
+
return value
class CuminAction(object):
@@ -787,6 +791,15 @@
authMechanism, username, password)
class AddQueue(CuminAction):
+ FILECOUNT = "qpid.file_count"
+ FILESIZE = "qpid.file_size"
+ MAX_QUEUE_SIZE = "qpid.max_size"
+ MAX_QUEUE_COUNT = "qpid.max_count"
+ POLICY_TYPE = "qpid.policy_type"
+ CLUSTER_DURABLE = "qpid.persist_last_node"
+ LVQ = "qpid.last_value_queue"
+ OPTIMISTIC_CONSUME = "qpid.optimistic_consume"
+
def get_title(self, session):
return "Add Queue"
@@ -798,33 +811,28 @@
return frame.queue_add.show(session)
def do_invoke(self, queue, args, completion):
- FILECOUNT = "qpid.file_count"
- FILESIZE = "qpid.file_size"
- MAX_QUEUE_SIZE = "qpid.max_size"
- MAX_QUEUE_COUNT = "qpid.max_count"
- POLICY_TYPE = "qpid.policy_type"
- CLUSTER_DURABLE = "qpid.persist_last_node"
- LVQ = "qpid.last_value_queue"
- OPTIMISTIC_CONSUME = "qpid.optimistic_consume"
reg = args["reg"]
declArgs = {}
if queue.durable:
- declArgs[FILECOUNT] = args["file_count"]
- declArgs[FILESIZE] = args["file_size"]
+ if args["file_count"]:
+ declArgs[self.FILECOUNT] = args["file_count"]
+ if args["file_size"]:
+ declArgs[self.FILESIZE] = args["file_size"]
- if args["q_size"]:
- declArgs[MAX_QUEUE_SIZE] = args["q_size"]
- if args["q_count"]:
- declArgs[MAX_QUEUE_COUNT] = args["q_count"]
if args["policy"]:
- declArgs[POLICY_TYPE] = args["policy"]
+ declArgs[self.POLICY_TYPE] = args["policy"]
+ if args["q_size"]:
+ declArgs[self.MAX_QUEUE_SIZE] = args["q_size"]
+ if args["q_count"]:
+ declArgs[self.MAX_QUEUE_COUNT] = args["q_count"]
+
if args["cluster_durable"]:
- declArgs[CLUSTER_DURABLE] = 1
+ declArgs[self.CLUSTER_DURABLE] = 1
if args["lvq"]:
- declArgs[LVQ] = 1
+ declArgs[self.LVQ] = 1
if args["optimistic"]:
- declArgs[OPTIMISTIC_CONSUME] = 1
+ declArgs[self.OPTIMISTIC_CONSUME] = 1
session = self.getSessionFromRegistration(reg)
session.queue_declare(queue=queue.name,
@@ -867,6 +875,11 @@
prop.title = "Exclusive?"
prop.summary = True
+ prop = CuminProperty(self, "arguments")
+ prop.title = "Arguments"
+ prop.prefix = "qpid."
+ prop.escape = False
+
stat = CuminStat(self, "consumerCount")
stat.title = "Consumers"
stat.unit = "consumer"
15 years, 7 months