rhmessaging commits: r2297 - in store/branches/mrg-1.0/cpp: lib/jrnl and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-08-13 15:24:20 -0400 (Wed, 13 Aug 2008)
New Revision: 2297
Modified:
store/branches/mrg-1.0/cpp/lib/BdbMessageStore.cpp
store/branches/mrg-1.0/cpp/lib/PreparedTransaction.h
store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.cpp
store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.hpp
store/branches/mrg-1.0/cpp/tests/jrnl/jtt/jfile_chk.py
Log:
Additional fixes for BZ458053 "txtest failures when broker killed during transfer phase".
Modified: store/branches/mrg-1.0/cpp/lib/BdbMessageStore.cpp
===================================================================
--- store/branches/mrg-1.0/cpp/lib/BdbMessageStore.cpp 2008-08-13 17:44:19 UTC (rev 2296)
+++ store/branches/mrg-1.0/cpp/lib/BdbMessageStore.cpp 2008-08-13 19:24:20 UTC (rev 2297)
@@ -576,6 +576,8 @@
}
if (incomplTplTxnFlag) {
opcc->complete(citr->second.commit_flag);
+ } else {
+ completed(*opcc.get(), citr->second.commit_flag);
}
}
}
@@ -722,7 +724,6 @@
txn_list& prepared,
message_index& messages)
{
-//std::cout << "***** recoverMessages(): queue=" << queue->getName() << std::endl;
size_t preambleLength = sizeof(u_int32_t)/*header size*/;
JournalImpl* jc = static_cast<JournalImpl*>(queue->getExternalQueueStore());
@@ -783,7 +784,10 @@
std::string xid(i->xid);
TplRecoverMapCitr citr = tplRecoverMap.find(xid);
if (citr == tplRecoverMap.end()) THROW_STORE_EXCEPTION("XID not found in tplRecoverMap");
- if (citr->second.deq_flag) { // deq present in prepared list, this xid is part of incomplete txn commit/abort
+
+ // deq present in prepared list, this xid is part of incomplete txn commit/abort
+ // or this is a 1PC txn that must be rolled forward
+ if (citr->second.deq_flag || !citr->second.tpc_flag) {
if (jc->is_enqueued(rid, true)) {
// Enqueue is non-tx, dequeue tx
assert(jc->is_locked(rid)); // This record MUST be locked by a txn dequeue
@@ -939,7 +943,11 @@
unsigned enqCnt = 0;
unsigned deqCnt = 0;
u_int64_t rid = 0;
- bool commitFlag = false;
+
+ // Assume commit (roll forward) in cases where only prepare has been called - ie only enqueue record exists.
+ // Note: will apply to both 1PC and 2PC transactions.
+ bool commitFlag = true;
+
for (journal::tdl_itr j = txnList.begin(); j<txnList.end(); j++) {
if (j->_enq_flag) {
rid = j->_rid;
@@ -1412,6 +1420,10 @@
try {
chkTplStoreInit(); // Late initialize (if needed)
+ // This sync is requred to ensure multi-queue atomicity - ie all txn data
+ // must hit the disk on *all* queues before the TPL prepare (enq) is written.
+ ctxt->sync();
+
ctxt->incrDtokRef();
DataTokenImpl* dtokp = ctxt->getDtok();
dtokp->set_external_rid(true);
Modified: store/branches/mrg-1.0/cpp/lib/PreparedTransaction.h
===================================================================
--- store/branches/mrg-1.0/cpp/lib/PreparedTransaction.h 2008-08-13 17:44:19 UTC (rev 2296)
+++ store/branches/mrg-1.0/cpp/lib/PreparedTransaction.h 2008-08-13 19:24:20 UTC (rev 2297)
@@ -47,6 +47,7 @@
void add(queue_id queue, message_id message);
bool isLocked(queue_id queue, message_id message);
+ std::size_t size() { return locked.size(); }
iterator begin() { return locked.begin(); }
iterator end() { return locked.end(); }
Modified: store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.cpp
===================================================================
--- store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.cpp 2008-08-13 17:44:19 UTC (rev 2296)
+++ store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.cpp 2008-08-13 19:24:20 UTC (rev 2297)
@@ -640,8 +640,20 @@
for (std::vector<std::string>::iterator itr = xid_list.begin(); itr != xid_list.end(); itr++)
{
std::vector<std::string>::const_iterator pitr = std::find(prep_txn_list_ptr->begin(), prep_txn_list_ptr->end(), *itr);
- if (pitr == prep_txn_list_ptr->end())
- _tmap.get_remove_tdata_list(*itr);
+ if (pitr == prep_txn_list_ptr->end()) // not found in prepared list
+ {
+ txn_data_list tdl = _tmap.get_remove_tdata_list(*itr);
+ // Unlock any affected enqueues in emap
+ for (tdl_itr i=tdl.begin(); i<tdl.end(); i++)
+ {
+ if (i->_enq_flag) // enq op - decrement enqueue count
+ rd._enq_cnt_list[i->_fid]--;
+ else if (_emap.is_enqueued(i->_drid, true)) // deq op - unlock enq record
+ _emap.unlock(i->_drid);
+ }
+ // Write abort record to disk
+ rcvr_write_abort(rd, *itr);
+ }
}
}
}
@@ -957,7 +969,7 @@
ofsp.write((const char*)buff, JRNL_DBLK_SIZE);
assert(!ofsp.fail());
std::ostringstream oss;
- oss << "Wrote filler record at offs=0x" << std::hex << file_pos << std::dec;
+ oss << "Recover phase write: Wrote filler record at offs=0x" << std::hex << file_pos << std::dec;
this->log(LOG_NOTICE, oss.str());
file_pos = ofsp.tellp();
}
@@ -967,5 +979,99 @@
}
}
+// TODO - FIXME - Unify the recover and normal aio write methods.
+// Normally, writes are not performed during recover mode (journal is in read-only
+// mode) so initialization of the aio write controllers is deferred until recover
+// is complete. Currenlty because journal is still in recover mode when
+// rcvr_write_abort() is called, normal writes are not possible, so std::ofstream
+// writes are used instead. Lots of logic duplication!
+void
+jcntl::rcvr_write_abort(rcvdat& rd, std::string xid)
+{
+ const u_int32_t sblk_size = JRNL_DBLK_SIZE * JRNL_SBLK_SIZE;
+ const u_int32_t amagic = RHM_JDAT_TXA_MAGIC;
+ const u_int32_t xmagic = RHM_JDAT_EMPTY_MAGIC;
+
+ // Check last record ends on sblk boundary
+ assert(rd._eo % sblk_size == 0);
+
+ // Find fid and posn to write
+ u_int16_t fid = rd._lfid;
+ std::streampos file_pos = rd._eo;
+ if (rd._eo/sblk_size >= _jfsize_sblks) // file full, use next file
+ {
+ if (++fid >= _num_jfiles)
+ {
+ fid = 0;
+ rd._owi = !rd._owi;
+ }
+ file_pos = 0;
+ }
+
+ // Prepare a buffer of at least 1 sblock
+ u_int32_t abort_dblks = txn_rec::size_dblks(sizeof(txn_hdr) + xid.size());
+ std::size_t buffsize = abort_dblks < JRNL_SBLK_SIZE ? JRNL_SBLK_SIZE : abort_dblks;
+ void* buff = std::malloc(buffsize * JRNL_DBLK_SIZE);
+ assert(buff != 0);
+
+ // Initialize file stream
+ std::ostringstream fn;
+ fn << _jdir.dirname() << "/" << _base_filename << ".";
+ fn << std::hex << std::setfill('0') << std::setw(4) << fid << "." << JRNL_DATA_EXTENSION;
+ std::ofstream ofs(fn.str().c_str(),
+ std::ios_base::in | std::ios_base::out | std::ios_base::binary);
+ if (!ofs.good())
+ throw jexception(jerrno::JERR__FILEIO, fn.str(), "jcntl", "rcvr_write_abort");
+ if (file_pos)
+ ofs.seekp(file_pos);
+ else
+ {
+ // New file, write new file header
+ file_hdr fh(RHM_JDAT_FILE_MAGIC, RHM_JDAT_VERSION, ++rd._h_rid, fid, sblk_size, rd._owi, true);
+ ofs.write((const char*)&fh, sizeof(file_hdr));
+ assert(!ofs.fail());
+ // fill remainder of sblk with fill char
+ std::memset((char*)buff, RHM_CLEAN_CHAR, sblk_size - sizeof(file_hdr));
+ ofs.write((const char*)buff, sblk_size - sizeof(file_hdr));
+ assert(!ofs.fail());
+ // log write action
+ std::ostringstream oss;
+ oss << "Recover phase write: File header in fid=" << fid << " at offs=0x0 for txn abort record";
+ this->log(LOG_NOTICE, oss.str());
+ file_pos = ofs.tellp();
+ }
+
+ // Write abort record
+ txn_rec ar(amagic, ++rd._h_rid, xid.data(), xid.size(), rd._owi);
+ u_int32_t res = ar.encode(buff, 0, abort_dblks);
+ assert(res == abort_dblks);
+ ofs.write((const char*)buff, JRNL_DBLK_SIZE);
+ assert(!ofs.fail());
+ // log write action
+ std::ostringstream oss;
+ oss << "Recover phase write: Aborted unprepared transaction xid=" << xid << " at offs=0x" << std::hex << file_pos << std::dec;
+ this->log(LOG_NOTICE, oss.str());
+ file_pos = ofs.tellp();
+
+ // Prepare filler record
+ std::memcpy(buff, (void*)&xmagic, sizeof(xmagic));
+ std::memset((char*)buff + sizeof(xmagic), RHM_CLEAN_CHAR, JRNL_DBLK_SIZE - sizeof(xmagic));
+ // Write filler as many times as needed to get to next sblk boundary
+ while (file_pos % sblk_size)
+ {
+ ofs.write((const char*)buff, JRNL_DBLK_SIZE);
+ assert(!ofs.fail());
+ std::ostringstream oss;
+ oss << "Recover phase write: Wrote filler record at offs=0x" << std::hex << file_pos << std::dec;
+ this->log(LOG_NOTICE, oss.str());
+ file_pos = ofs.tellp();
+ }
+ rd._eo = file_pos;
+
+ // Clean up
+ ofs.close();
+ std::free(buff);
+}
+
} // namespace journal
} // namespace rhm
Modified: store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.hpp
===================================================================
--- store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.hpp 2008-08-13 17:44:19 UTC (rev 2296)
+++ store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.hpp 2008-08-13 19:24:20 UTC (rev 2297)
@@ -673,6 +673,8 @@
std::streampos& read_pos);
void check_journal_alignment(const u_int16_t fid, std::streampos& rec_offset);
+
+ void rcvr_write_abort(rcvdat& rd, std::string xid);
};
} // namespace journal
Modified: store/branches/mrg-1.0/cpp/tests/jrnl/jtt/jfile_chk.py
===================================================================
--- store/branches/mrg-1.0/cpp/tests/jrnl/jtt/jfile_chk.py 2008-08-13 17:44:19 UTC (rev 2296)
+++ store/branches/mrg-1.0/cpp/tests/jrnl/jtt/jfile_chk.py 2008-08-13 19:24:20 UTC (rev 2297)
@@ -579,7 +579,8 @@
for rec in self.tmap[hdr.xid]:
if isinstance(rec[1], DeqHdr):
if self.emap[rec[1].deq_rid] != None:
- self.emap[rec[1].deq_rid][2] = False # Unlock enq record
+ t = self.emap[rec[1].deq_rid]
+ self.emap[rec[1].deq_rid] = (t[0], t[1], False) # Unlock enq record
del self.tmap[hdr.xid]
if len(mismatched_rids) > 0:
warn = ' (WARNING: transactional dequeues not found in enqueue map; rids=%s)' % mismatched_rids
17 years, 8 months
rhmessaging commits: r2296 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-08-13 13:44:19 -0400 (Wed, 13 Aug 2008)
New Revision: 2296
Modified:
mgmt/trunk/cumin/python/cumin/util.py
Log:
Rogue import that broke the charts
Modified: mgmt/trunk/cumin/python/cumin/util.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/util.py 2008-08-13 16:02:04 UTC (rev 2295)
+++ mgmt/trunk/cumin/python/cumin/util.py 2008-08-13 17:44:19 UTC (rev 2296)
@@ -1,5 +1,5 @@
from ConfigParser import SafeConfigParser
-from datetime import *
+from datetime import datetime
from logging import getLogger
from time import mktime
from random import randint
17 years, 8 months
rhmessaging commits: r2295 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-08-13 12:02:04 -0400 (Wed, 13 Aug 2008)
New Revision: 2295
Modified:
mgmt/trunk/cumin/python/cumin/brokerlink.strings
Log:
Changed css on Broker Link add form to target only that form
Modified: mgmt/trunk/cumin/python/cumin/brokerlink.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokerlink.strings 2008-08-13 15:02:59 UTC (rev 2294)
+++ mgmt/trunk/cumin/python/cumin/brokerlink.strings 2008-08-13 16:02:04 UTC (rev 2295)
@@ -53,8 +53,8 @@
<table class="ExchangeBindingSet mobjects">
<tr>
+ <th>Source</th>
<th>Destination</th>
- <th>Source</th>
<th>Exchange</th>
<th>Routing Key</th>
</tr>
@@ -64,8 +64,8 @@
[PeerRouteSet.item_html]
<tr>
+ <td>{item_src}</td>
<td>{item_destination}</a></td>
- <td>{item_src}</td>
<td>{item_exchange}</td>
<td>{item_routing_key}</td>
</tr>
@@ -85,14 +85,14 @@
margin-bottom: 1em;
}
-div.field div.input_prompt:after {
+div.multiple div.input_prompt:after {
content: ":";
}
-div.field div.inputs input {
+div.multiple div.inputs input {
float:left;
}
-div.field div.inputs:after {
+div.multiple div.inputs:after {
content: ".";
display: block;
height: 0;
17 years, 8 months
rhmessaging commits: r2294 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-08-13 11:02:59 -0400 (Wed, 13 Aug 2008)
New Revision: 2294
Added:
mgmt/trunk/cumin/resources/caution.png
mgmt/trunk/cumin/resources/default.css
mgmt/trunk/cumin/resources/dirty.css
mgmt/trunk/cumin/resources/docnav.css
mgmt/trunk/cumin/resources/documentation.css
mgmt/trunk/cumin/resources/documentation.png
mgmt/trunk/cumin/resources/dot.png
mgmt/trunk/cumin/resources/dot2.png
mgmt/trunk/cumin/resources/h1-bg.png
mgmt/trunk/cumin/resources/important.png
mgmt/trunk/cumin/resources/note.png
mgmt/trunk/cumin/resources/reports.css
mgmt/trunk/cumin/resources/rhlogo.png
mgmt/trunk/cumin/resources/shine.png
mgmt/trunk/cumin/resources/stock-go-back.png
mgmt/trunk/cumin/resources/stock-go-forward.png
mgmt/trunk/cumin/resources/stock-go-up.png
mgmt/trunk/cumin/resources/stock-home.png
mgmt/trunk/cumin/resources/tip.png
mgmt/trunk/cumin/resources/warning.png
mgmt/trunk/cumin/resources/watermark-alpha1.png
mgmt/trunk/cumin/resources/watermark-alpha2.png
mgmt/trunk/cumin/resources/watermark-beta1.png
mgmt/trunk/cumin/resources/watermark-beta2.png
mgmt/trunk/cumin/resources/watermark-pre-release-candidate.png
mgmt/trunk/cumin/resources/watermark-release-candidate.png
Modified:
mgmt/trunk/cumin/resources/help.html
Log:
Copied styles and images from qpid documentation instead of referring to them.
Added help for Add Broker Link and Close Broker Links
Added: mgmt/trunk/cumin/resources/caution.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/caution.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/default.css
===================================================================
--- mgmt/trunk/cumin/resources/default.css (rev 0)
+++ mgmt/trunk/cumin/resources/default.css 2008-08-13 15:02:59 UTC (rev 2294)
@@ -0,0 +1,217 @@
+body.toc_embeded {margin-left: 300px !important;} /*jeff rocks*/
+
+object.toc{ /*for hosting system only*/
+ border-style:none;
+ position:fixed;
+ width:290px;height:99.99%;
+ top:0; left:0;
+ z-index: 100;
+ border-style:none;
+ border-right:1px solid #999 !important;}
+
+body{
+ background-color: white;
+ margin:0 auto;
+ font-family: "liberation sans", "Myriad ", "Bitstream Vera Sans","Lucida Grande", verdana, "Luxi Sans","Trebuchet MS", helvetica,verdana,arial,sans-serif;
+ font-size:12px;
+ max-width:55em;
+ padding:0em 2em;
+ color:#333;
+ line-height:150%;
+ }
+
+/* desktop styles */
+body.desktop .book > .toc {
+ display:block;
+ width:24em;
+ height:99%;
+ position:fixed;
+ overflow:auto;
+ top:0px;
+ left:0px;
+ padding-left:10px;
+ font-size:0.8em;
+ background-color:#EEEEEE;
+}
+body.desktop {
+ margin-left:24em;
+}
+.toc dt {
+ line-height:1.2em;
+ margin-bottom:.7em;
+}
+
+/*Links*/
+a:link{color:#0066cc;}
+a:visited{color:#6699cc;}
+div.longdesc-link{float:right;color:#999;}
+
+
+/*headings*/
+h1,h2,h3,h4,h5,h6{color:#a70000;
+ line-height:130%;
+ margin-top:0em;
+ font-family:"liberation sans","Bitstream Vera Sans","Lucida Grande","Trebuchet MS",helvetica,verdana,arial,sans-serif;
+ background-color:transparent;
+ }
+
+h1{background: #800 url(resource?name=h1-bg.png) top left repeat;
+ line-height:1.2em;
+ color:white;
+ font-size:2em;
+ padding:1.5em;
+ }
+
+h2{font-size:1.6em;
+ }
+
+h3{font-size:1.3em;
+ padding-top:0em;
+ padding-bottom:0em;
+ }
+h4{font-size:1.1em;
+ padding-top:0em;
+ padding-bottom:0em;
+ }
+
+h5.formalpara {font-size:1em;
+ margin-top:2em;margin-bottom:.8em;
+ }
+
+
+/*element rules*/
+hr{border-collapse: collapse;border-style:none;border-top: 1px dotted #ccc;width:100% !important;}
+sup{color:#999;}
+
+/* web site rules */
+ul.languages, .languages li{display:inline; font-size:.9em;padding:0em;}
+.languages li a{padding:0em .5em;text-decoration: none;}
+.languages li p{display:inline;}
+.languages li a:link, .languages li a:visited{color:#444;}
+.languages li a:hover, .languages li a:focus, .languages li a:active{color:black}
+ul.languages{display:block; background-color:#eee;padding:.5em;}
+
+/*supporting stylesheets*/
+
+/*unique to the webpage only*/
+.article ul, .article li{margin:0em; padding:0em;list-style:none;}
+.books{position:relative;}
+
+
+.versions li{width:100%;clear:both; display:block;}
+a.version{font-size:2em; text-decoration:none; width:100%;display:block; padding:1em 0em .2em 0em;clear:both;}
+a.version:before{content:"Version";font-size:smaller; }
+a.version:visited, a.version:link{color:#666;}
+a.version:focus, a.version:hover{color:black;}
+.books {display:block;position:relative; clear:both; width:100%; }
+.books li{display:block; width:200px !important; float:left !important;position:relative; clear: none !important;}
+.books .html{width:170px;display:block;line-height:1.7em;}
+.books .pdf{position:absolute; left:170px;top:0px;font-size:smaller;line-height:2em;}
+.books .pdf:link, .books .pdf:visited{color:#555;}
+.books .pdf:hover, .books .pdf:focus{color:#000;}
+.books li a{text-decoration:none;}
+.books li a:hover{color:black}
+
+/*products*/
+.products li {display: block; width:300px; float:left;}
+.products li a{width:300px; padding:.5em 0em;}
+.products ul{clear:both;}
+
+
+/*revision history*/
+.revhistory {
+ display:block;
+ /*max-height:15em;
+ overflow:auto;
+ */}
+
+
+
+.revhistory table{
+ background-color:transparent;
+ color:#ccc;
+ border-color:#fff;
+ padding:0em;
+ margin: 0;
+ font-size:0.8em;
+ border-collapse:collapse; border-style:none;}
+
+.revhistory td{
+ text-align:right;
+ padding:0em !important;
+ border-top: 1px solid #fff !important;
+ line-height:1.25em;}
+
+
+.revhistory tr td:first-child{
+ text-align:left;}
+
+.revhistory tr td p{
+ text-align:left;
+ font-weight:bold;
+ color:#666;
+ font-size:1.0em;
+ display:block;
+ margin:0em;
+ padding:0em;
+ padding-bottom:0.7em;
+ border-bottom:1px solid #eee;}
+
+.revhistory table th{
+ background-color:transparent;
+ color:#555;
+ font-size:2em;
+ line-height:2em;
+ padding:0em 0em;
+ padding-top:1em;
+ border-bottom:1px solid #eee;}
+
+
+/*credits*/
+.authorgroup div{
+ clear:both}
+h3.author{margin:0em; padding:0em; padding-top:1em;}
+
+
+.authorgroup h4{
+ padding:0em;
+ margin:0em;
+ padding-top:1em;}
+
+
+.author,
+.editor,
+.translator,
+.othercredit{
+ display:block;}
+
+.othercredit h3{
+ padding-top:1em;}
+
+
+div.othercredit{
+ font-size:0.85em;}
+
+.othercredit{
+ margin:0em;
+ padding:0em;
+ line-height: 1.1em;}
+
+.releaseinfo{
+ clear: both;}
+
+.editor{
+ font-size:1.05em;}
+
+h4.editedby{
+ font-size:0.85em;
+ color:#666;
+ font-weight:normal}
+
+h3.title {
+ margin-top: 2em;
+}
+/*copyright release info*/
+.copyright{
+ font-size:.85em;}
+
Added: mgmt/trunk/cumin/resources/dirty.css
===================================================================
--- mgmt/trunk/cumin/resources/dirty.css (rev 0)
+++ mgmt/trunk/cumin/resources/dirty.css 2008-08-13 15:02:59 UTC (rev 2294)
@@ -0,0 +1,3 @@
+pre{-moz-border-radius:11px;}
+.example{-moz-border-radius:15px;}
+/*div.note,div.tip ,div.important ,div.caution ,div.warning{-moz-border-radius:11px;}*/
Added: mgmt/trunk/cumin/resources/docnav.css
===================================================================
--- mgmt/trunk/cumin/resources/docnav.css (rev 0)
+++ mgmt/trunk/cumin/resources/docnav.css 2008-08-13 15:02:59 UTC (rev 2294)
@@ -0,0 +1,22 @@
+/*document navigation*/
+.docnav a, .docnav strong{text-decoration:none;font-weight:normal;}
+.docnav{list-style:none;margin:0em;padding:0em;position:relative;width:100%;padding-bottom:2em;padding-top:1em;border-top:1px dotted #ccc;}
+.docnav li{list-style:none;margin:0em;padding:0em;display:inline;font-size:.8em;}
+.docnav li:before{content:" ";}
+.docnav li.previous, .docnav li.next{position:absolute;top:1em;}
+.docnav li.up, .docnav li.home{margin:0em 1.5em;}
+.docnav li.previous{left:0px;text-align:left;}
+.docnav li.next{right:0px;text-align:right;}
+.docnav li.previous strong, .docnav li.next strong{display:block;height:22px;}
+.docnav{margin:0 auto;text-align:center;}
+.docnav li.next a strong{background: url(resource?name=stock-go-forward.png) top right no-repeat;padding-top:3px;padding-right:28px;font-size:1.2em;}
+.docnav li.previous a strong{background: url(resource?name=stock-go-back.png) top left no-repeat;padding-top:3px;padding-left:28px;font-size:1.2em;}
+.docnav li.home a strong{background: url(resource?name=stock-home.png) top left no-repeat;padding:5px;padding-left:28px;font-size:1.2em;}
+.docnav li.up a strong{background: url(resource?name=stock-go-up.png) top left no-repeat;padding:5px;padding-left:28px;font-size:1.2em;}
+
+.docnav a:link, .docnav a:visited {color:#666 !important;}
+.docnav a:hover,.docnav a:focus, .docnav a:active{color:black !important;}
+.docnav a{max-width: 10em;overflow:hidden;}
+.docnav a:link strong{text-decoration:none;}
+
+.docnav{margin:0 auto;text-align:center;}
Added: mgmt/trunk/cumin/resources/documentation.css
===================================================================
--- mgmt/trunk/cumin/resources/documentation.css (rev 0)
+++ mgmt/trunk/cumin/resources/documentation.css 2008-08-13 15:02:59 UTC (rev 2294)
@@ -0,0 +1,211 @@
+
+
+
+/*Lists*/
+ol li ,ul li{padding-left:.2em;padding-bottom:.5em;margin:0em;}
+
+ul{padding-left:1.6em;list-style-image:url(resource?name=dot.png);list-style-type: circle;}
+ul ul{list-style-image:url(resource?name=dot2.png);list-style-type: circle;}
+dt {font-weight:bold;margin-bottom:0em;padding-bottom:0em;}
+dd{margin:0em;margin-left:2em;padding-top:0em;}
+li p:first-child, dd p:first-child{padding:0em;margin-top:.3em;}
+.variablelist,.itemizedlist{margin-top:.6em;}
+ul li p:first-child{margin:0em;}
+/*images*/
+img{display:block;margin:2em 0;}
+.inlinemediaobject,.inlinemediaobject img{display:inline !important;margin:0em;}
+
+.figure img{display:block; margin:0;}
+.figure .title{margin:0em; margin-bottom:2em !important; padding:0px;}
+
+/*document modes*/
+.confidential{background-color:#900; color:White; padding:.5em .5em; font-family:serif; text-transform:uppercase; text-align:center}
+
+dt a{font-weight: normal;}
+.longdesc-link{display:none;}
+.prompt{background-color:#ede7c8;padding:0em .3em;}
+
+/*user interface styles*/
+.screen .replaceable {color:#444;}
+.screen{background-color:#ede7c8;color:#333;padding:.5em 1em;margin:0em;}
+pre,code,.guibutton,.keycap,.guilabel{font-size:0.9em;font-family:"liberation mono", "Bitstream vera mono",monospace;}
+.guibutton,.keycap,.guilabel{font-weight:bold;white-space:nowrap;color:#444;font-family:"liberation sans", "Bitstream vera sans", "dejavu sans" sans-serif;}
+.guibutton,.guilabel{}
+.keycap{padding: .1em .4em;}
+.example {background-color:#c8c5ac; padding:5px; margin-bottom:10px;}
+
+
+/*terminal/console text*/
+.command,
+.computeroutput,
+.filename,
+.citetitle,
+.replaceable,
+.option{}
+.command .replaceable{color:#555;}
+pre{display:block;background-color:#f7f2d0;color:#333;overflow:auto;}
+code{white-space:nowrap;}
+
+/*Notifications*/
+div.note,div.tip ,div.important ,div.caution ,div.warning{
+ background: #555753; color:white;padding:1em;padding-bottom:20px;border:1px solid #444;margin-bottom:1.5em;background-repeat:no-repeat; background-position:10px 10px;
+}
+
+div.note pre,div.tip pre ,div.important pre ,div.caution pre ,div.warning pre{background-color:#333; color:white;}
+div.note,div.tip ,div.important ,div.caution ,div.warning{margin-top:.5em;}
+div.note{background-image:url(resource?name=note.png)}
+div.tip{background-image:url(resource?name=tip.png)}
+div.important{background-image:url(resource?name=important.png)}
+div.caution{background-image:url(resource?name=caution.png)}
+div.warning{background-image:url(resource?name=warning.png)}
+div.note .replaceable,div.tip .replaceable,div.important .replaceable,div.caution .replaceable,div.warning .replaceable{
+ color:#e3dcc0;
+ }
+
+pre .replaceable, tt .replaceable{
+ color:#444 !important;
+ }
+div.note h2,div.tip h2,div.important h2,div.caution h2,div.warning h2{height:32px;font-size:1.3em;color:white;}
+
+div.note .guilabel,div.tip .guilabel,div.important .guilabel,div.caution .guilabel,div.warning .guilabel{color:white !important;}
+/*
+div.note h2,div.tip h2,div.important h2,div.caution h2,div.warning h2{
+ background-color:transparent;background-position:top left;background-repeat:no-repeat;height:48px;font-size:1.3em;color:#ede7c8;
+ }
+ */
+
+div.note li,div.tip li,div.caution li,div.warning li,div.important li{
+ padding-left:10px;margin:0em;
+ }
+
+div.note ul,div.tip ul,div.caution ul,div.warning ul,div.important ul{
+ padding-left:40px;margin:0em;
+ }
+
+div.note pre pre a:visited,div.tip pre pre a:visited,div.important pre pre a:visited,
+div.caution pre pre a:visited,div.warning pre pre a:visited,div.note pre a:link,
+.tip pre a:link,div.important pre a:link,div.caution pre a:link,div.warning pre a:link{
+ color:#0066cc !important;
+ }
+
+div.note a:visited,div.tip a:visited ,div.important a:visited ,div.caution a:visited ,
+div.warning a:visited,div.note a:link ,div.tip a:link ,div.important a:link ,div.caution a:link ,div.warning a:link{
+ color:#f7f2d0;
+ }
+
+/*notification icons*/
+div.note h2,div.note p,div.tip h2,div.tip p,div.caution h2,div.caution p,div.warning h2,div.warning p,div.important h2,.important p {padding:0em;margin:0em;padding-left:56px;}
+/*div.note h2{background-image:url(resource?name=note.png)}
+div.tip h2{background-image:url(resource?name=tip.png)}
+div.caution h2{background-image:url(resource?name=caution.png)}
+div.warning h2{background-image:url(resource?name=warning.png)}
+div.important h2{background-image:url(resource?name=important.png)}
+*/
+/*Page Title*/
+#title strong{display:none;}
+#title a{display:block;height:45px;width:110px;padding-left:200px;background:transparent url(resource?name=rhlogo.png) top left no-repeat;}
+#title{display:block;height:45px;background:transparent url(resource?name=documentation.png) top right no-repeat;padding-bottom:1em;}
+
+/*Table*/
+table{border:1px solid #aaa;width:100%;border-collapse:collapse;}
+table th{text-align:left;background-color:#900;padding:.3em .5em;color:white;}
+table td{padding:.15em .5em;}
+table tr.even td{background-color:#f5f5f5;}
+table th p:first-child,table td p:first-child,table li p:first-child{margin-top:0em;padding-top:0em;display:inline;}
+
+th, td{border-style:none;;}
+table table td{border-bottom:1px dotted #aaa !important;background-color:white;padding:.6em 0em;}
+table table{border:1px solid white !important;font-size:.9em;}
+
+
+td.remarkval{font-size:.9em;color:#444;}
+.defaultval{font-size:.8em}
+td.typeval{font-size:.8em}
+
+td.fieldval{font-weight:bold; font-size:.9em;}
+
+th.dbkey{font-size:.9em;}
+
+.lbname,.lbtype,.lbdescr,.lbdriver,.lbhost{color:white;font-weight:bold;background-color:#999;font-size:0.9em;width:120px;}
+td.remarkval{width:230px;}
+
+td.tname{font-weight:bold;font-size:1.1em;}
+h5{font-size:9pt;}
+h6{font-size:10pt;}
+th.dbfield{width:120px;}
+th.dbtype{width:70px;}
+th.dbdefault{width:70px;}
+th.dbnul{width:70px;}
+th.dbkey{width:70px;}
+
+span.book{margin-top:4em;display:block;}
+span.chapter{display:block;margin-top:0.5em;}
+
+/*Breadcrumbs*/
+#breadcrumbs ul li.first:before{content:" ";}
+#breadcrumbs{color:#900;padding:3px;margin-bottom:25px;}
+#breadcrumbs ul{margin-left:0;padding-left:0;display:inline;border:none;}
+#breadcrumbs ul li{margin-left:0;padding-left:2px;border:none;list-style:none;display:inline;}
+#breadcrumbs ul li:before{content:"\0020 \0020 \0020 \00BB \0020";color:#333;}
+
+/*status*/
+.alpha1{background: white url(resource?name=watermark-alpha1.png) top left repeat;}
+.alpha2{background: white url(resource?name=watermark-alpha2.png) top left repeat;}
+.beta1{background: white url(resource?name=watermark-beta1.png) top left repeat;}
+.beta2{background: white url(resource?name=watermark-beta2.png) top left repeat;}
+.pre-release-candidate{background: white url(resource?name=watermark-pre-release-candidate.png) top left repeat;}
+.release-candidate{background: white url(resource?name=watermark-release-candidate.png) top left repeat;}
+
+/*index*/
+.glossary h3,
+.index h3{font-size: 2em;color:#aaa;margin:0em;}
+.indexdiv{margin-bottom:1em;}
+.glossary dt,.index dt{font-size:.9em;color:#444;padding-top:.5em;}
+.glossary dl dl dt,
+.index dl dl dt{font-size:.85em;color:#777;line-height:1.2em;font-weight:normal;padding-top:0em;}
+.index dl dl dt:before{content:"- ";color:#ccc;}
+
+/*changes*/
+.footnotes{}
+.footnote {padding:.2em 1em;background-color:#c8c5ac;font-size: .9em;margin:0em;margin-bottom:.5em;color:#222;}
+table .footnote{margin:1em .5em;}
+sup{padding:0em .3em;padding-left:0em;}
+.footnote{position:relative;}
+.footnote sup {color:#e3dcc0;font-size:1.8em;position:absolute;left: .4em;}
+.footnote sup a:link,
+.footnote sup a:visited{color:#92917d;text-decoration:none;}
+.footnote:hover sup a{color:#fff;text-decoration:none;}
+.footnote p{padding-left:5em;}
+.footnote a:link,
+.footnote a:visited{color:#00537c;}
+.footnote a:hover{color:white;}
+
+li p:first-child{margin:0em !important; padding:0em !important;}
+
+/**/
+div.chapter, div.section {padding-top:2em;}
+
+.revhistory{font-size:}
+
+pre .replaceable,
+pre .keycap{color:white;}
+pre{font-family:"liberation mono", "bitstream vera mono", "dejavu mono" monospace;}
+
+div.note .replaceable,
+div.tip .replaceable,
+div.important .replaceable,
+div.caution .replaceable,
+div.warning .replaceable,
+div.note .keycap,
+div.tip .keycap,
+div.important .keycap,
+div.caution .keycap,
+div.warning .keycap
+{color:white;}
+div.abstract{font-size:larger;}
+
+.authorgroup {}
+.authorgroup h4{padding:0em; margin:0em;margin-top:1em;}
+.author, .editor, .translator, .othercredit{display:block;}
+
+ul li p:last-child{margin-bottom:0em; padding-bottom:0em;}
Added: mgmt/trunk/cumin/resources/documentation.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/documentation.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/dot.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/dot.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/dot2.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/dot2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/h1-bg.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/h1-bg.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: mgmt/trunk/cumin/resources/help.html
===================================================================
--- mgmt/trunk/cumin/resources/help.html 2008-08-13 15:01:10 UTC (rev 2293)
+++ mgmt/trunk/cumin/resources/help.html 2008-08-13 15:02:59 UTC (rev 2294)
@@ -3,7 +3,11 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Cumin - Help</title>
- <link rel="stylesheet" href="http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/html/Messagin..." type="text/css" />
+ <link rel="stylesheet" href="resource?name=default.css" type="text/css" />
+ <link rel="stylesheet" href="resource?name=documentation.css" type="text/css" />
+ <link rel="stylesheet" href="resource?name=docnav.css" type="text/css" />
+ <link rel="stylesheet" href="resource?name=reports.css" type="text/css" />
+ <link rel="stylesheet" href="resource?name=dirty.css" type="text/css" />
</head>
<body>
@@ -18,11 +22,8 @@
</p>
<div class="section" lang="en-US" xml:lang="en-US">
<div class="titlepage">
- <div>
- <div>
- <h3 class="title"><a name="main.broker.queue.queuebindingadd.help"/>Bind a Queue to an Exchange</h3>
- </div>
- </div>
+ <a name="main.broker.queue.queuebindingadd.help"/>
+ <h3 class="title">Bind a Queue to an Exchange</h3>
</div>
<p>
Allows an existing queue to bind to an existing exchange. Select one or more exchanges from the list and
@@ -58,11 +59,8 @@
</ul>
<div class="titlepage">
- <div>
- <div>
- <h3 class="title"><a name="main.broker.queueadd.help"/>Adding a new Queue</h3>
- </div>
- </div>
+ <a name="main.broker.queueadd.help"/>
+ <h3 class="title">Adding a new Queue</h3>
</div>
<p>
Allows the creation of a new queue and optionally allows binding to an existing exchange. A new queue
@@ -108,11 +106,8 @@
</ul>
<div class="titlepage">
- <div>
- <div>
- <h3 class="title"><a name="main.broker.exchangeadd.help"/>Adding a new Exchange</h3>
- </div>
- </div>
+ <a name="main.broker.exchangeadd.help"/>
+ <h3 class="title">Adding a new Exchange</h3>
</div>
<p>
Allows the creation of a new exchange. An exchange name is required.
@@ -126,6 +121,42 @@
</a>
</li>
</ul>
+
+
+ <div class="titlepage">
+ <a name="main.broker.brokeradd.help"/>
+ <h3 class="title">Adding a Broker Link</h3>
+ </div>
+ <p>
+ Allows the creation of a new link between brokers. An broker address is required. It can be an IP address or a host name.
+ A port, username and password are optional. If a port is entered, it must be a numeric value.
+ </p>
+ <p>A durable link survives after a broker is restarted.</p>
+
+<ul class="docnav">
+ <li class="up">
+ <a accesskey="u" href="#top">
+ <strong>Help Index</strong>
+ </a>
+ </li>
+</ul>
+
+ <div class="titlepage">
+ <a name="main.broker.brokersclose.help"/>
+ <h3 class="title">Closing a Broker Link</h3>
+ </div>
+ <p>
+ Closes the links between the current broker and all selected brokers. If a linked broker has link routes (also known as bridges), they will be abandoned.
+ </p>
+
+<ul class="docnav">
+ <li class="up">
+ <a accesskey="u" href="#top">
+ <strong>Help Index</strong>
+ </a>
+ </li>
+</ul>
+
</div><!-- section -->
<div style="height:1000px;"><!-- --></div>
Added: mgmt/trunk/cumin/resources/important.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/important.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/note.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/note.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/reports.css
===================================================================
--- mgmt/trunk/cumin/resources/reports.css (rev 0)
+++ mgmt/trunk/cumin/resources/reports.css 2008-08-13 15:02:59 UTC (rev 2294)
@@ -0,0 +1,55 @@
+
+/* Reports */
+.reports ul.locale{list-style:none;}
+.reports ul{padding:0em;margin:0em;}
+.reports ul.locale li{font-size:small;color:#000;display:block;border:1px solid #eee;float:left;padding-right:2em;margin-right:1em;margin-bottom:1em;}
+.reports ul.locale li a{font-size:1.2em;display:block;padding-top:.1em;padding-bottom:.5em;}
+.reports ul.locale strong{display:block;margin:0em;padding:0em;margin-bottom:-2.2em;}
+.reports ul.locale span.value{display:block;position:relative;text-align:right;margin-right:-1.5em;font-size:1.0em;color:#444;}
+.reports ul.locale li{width:12em;display:block;float:left;margin:0em;clear:none;}
+.reports ul.locale li div.progress{font-size:1em;width:13.2em;position:relative; left: 0em; top:0em; margin-bottom:0em;}
+.reports h2{font-size:1em;margin:0em;}
+.reports li{}
+.reports li:hover{background-color:#666;border-color:#444 !important;color:white !important;}
+.reports li:hover strong, .reports li:hover h2, .reports li:hover a, .reports li:hover span.value{color:white;}
+
+/*uniform*/
+body.results, body.reports{max-width:57em !important;padding:0em !important}
+/*Progress Bar*/
+div.progress{display:block;float:left;width:16em;background:#c00 url(resource?name=shine.png) top left repeat-x;height:1em;}
+div.progress span{height:1em; float:left;}
+div.progress span.translated{background:#6c3 url(resource?name=shine.png) top left repeat-x;}
+div.progress span.fuzzy{background:#ff9f00 url(resource?name=shine.png) top left repeat-x;}
+
+
+
+
+/*Results*/
+
+.results ul.locale{list-style:none;padding:0em;margin:0em;}
+.results .pofile{padding:0em !important;margin:0em;}
+.results ul.locale li{border-top:1px solid #eee;padding:0em; margin:0em;padding-left:32px;}
+.results ul.locale .pofile{font-size:1.2em;display:block;width:100%;color:#444;padding:0em;margin:0em;}
+.results span.value{color:#888;}
+.results strong{font-weight: normal;}
+.results .home a{display:block;margin:0 auto;width:5em;background: url(resource?name=stock-home.png) top left no-repeat;padding:5px;padding-left:28px;font-size:1.2em;}
+.results ul.locale li:hover, .results ul.locale li:hover span.pofile ,.results ul.locale li:hover strong, .results ul.locale li:hover span.value{background-color:#666 !important;color:white;}
+
+ul.locale{list-style:none;}
+ul.locale li.total{font-size:small;color:#777;width:31em;display:block;float:left;margin-right:2em;clear:none !important;}
+ul.locale li{clear:both;font-size:small;color:#777;display:block;}
+ul.locale strong, span.value {font-weight:normal;color:#888;font-size:.7em;}
+ul.locale li a{font-size:1.2em;display:block;padding-top:.2em;}
+ul.locale li.total div.progress{position:relative;left:0em;top:0em;margin-bottom:0em; }
+ul.locale li{width:100%;}
+ul.locale li div.progress{float:left;position:relative; left:30.5em; top:-2em; margin:0em;margin-bottom:-3em;}
+
+li.total{padding:0em !important;}
+li.total{float:right;max-width:16em;padding:.5em;margin:0 auto;padding-top: .5em;background-color:#f7f2d0;font-size: 1.3em !important;color:#ccc !important;margin-bottom:1em;min-height:9.5em;}
+li.total .value{color:#444;font-size:.8em;}
+li.total strong{display:block;color:black;font-weight:bold;}
+li.total span.value {position:relative;display:block;top:-1.25em;text-align:right;}
+
+
+.pofile{position:relative;}
+
Added: mgmt/trunk/cumin/resources/rhlogo.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/rhlogo.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/shine.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/shine.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/stock-go-back.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/stock-go-back.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/stock-go-forward.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/stock-go-forward.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/stock-go-up.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/stock-go-up.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/stock-home.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/stock-home.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/tip.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/tip.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/warning.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/warning.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/watermark-alpha1.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/watermark-alpha1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/watermark-alpha2.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/watermark-alpha2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/watermark-beta1.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/watermark-beta1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/watermark-beta2.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/watermark-beta2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/watermark-pre-release-candidate.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/watermark-pre-release-candidate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/watermark-release-candidate.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/watermark-release-candidate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 8 months
rhmessaging commits: r2293 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-08-13 11:01:10 -0400 (Wed, 13 Aug 2008)
New Revision: 2293
Modified:
mgmt/trunk/cumin/python/cumin/brokerlink.py
mgmt/trunk/cumin/python/cumin/brokerlink.strings
Log:
Made optional fields obvious on Add Broker Link form.
Modified: mgmt/trunk/cumin/python/cumin/brokerlink.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokerlink.py 2008-08-12 23:40:57 UTC (rev 2292)
+++ mgmt/trunk/cumin/python/cumin/brokerlink.py 2008-08-13 15:01:10 UTC (rev 2293)
@@ -313,6 +313,9 @@
if "port" in self.errors:
return "<ul class=\"errors\" style=\"float:left;\"><li>%s</li></ul>" % \
self.errors["port"]
+
+ def render_optional_prompt(self, session, *args):
+ return "Optional"
def process_cancel(self, session):
self.host.clear()
Modified: mgmt/trunk/cumin/python/cumin/brokerlink.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokerlink.strings 2008-08-12 23:40:57 UTC (rev 2292)
+++ mgmt/trunk/cumin/python/cumin/brokerlink.strings 2008-08-13 15:01:10 UTC (rev 2293)
@@ -81,7 +81,7 @@
margin-bottom: 0.25em;
}
-div.multiple div.field {
+div.multiple {
margin-bottom: 1em;
}
@@ -99,19 +99,46 @@
clear: left;
visibility: hidden;
}
+div.multiple div.optional {
+ background-color: #fcfcfc;
+ border: 1px solid #999999;
+ margin: 1.25em 1em 1em;
+}
+div.optional_prompt {
+ background-color: #fcfcfc;
+ border: 1px solid #cccccc;
+ color: #999999;
+ float:left;
+ margin-left: 0.5em;
+ padding: 0.25em 0.5em;
+ position: relative;
+ top: -1em;
+}
+
+div.optional_inputs {
+ clear: left;
+ position: relative;
+ top: -0.5em;
+}
+
[BrokerLinkAdd.html]
<form id="{id}" class="mform" method="post" action="?">
<div class="head">{title}</div>
- <div class="body multiple">
- <div class="field">
- <div class="title">Source Broker</div>
- <div class="inputs"><div class="input_prompt">Address</div><input type="text" name="{broker_name_path}" value="{broker_name_value}" tabindex="100" size="32"/>{broker_name_error}</div>
- <div class="inputs"><div class="input_prompt">Port</div><input type="text" name="{broker_port_path}" value="{broker_port_value}" tabindex="100" size="5"/>{broker_port_error}</div>
- <div class="inputs"><div class="input_prompt">Username</div><input type="text" name="{broker_username_path}" value="{broker_username_value}" tabindex="100" size="32"/></div>
- <div class="inputs"><div class="input_prompt">Password</div><input type="text" name="{broker_password_path}" value="{broker_password_value}" tabindex="100" size="32"/></div>
+ <div class="body">
+ <div class="field multiple">
+ <div class="title">Source Broker</div>
+ <div class="inputs"><div class="input_prompt">Address</div><input type="text" name="{broker_name_path}" value="{broker_name_value}" tabindex="100" size="32"/>{broker_name_error}</div>
+ <div class="optional">
+ <div class="optional_prompt">{optional_prompt}</div>
+ <div class="optional_inputs">
+ <div class="inputs"><div class="input_prompt">Port</div><input type="text" name="{broker_port_path}" value="{broker_port_value}" tabindex="100" size="5"/>{broker_port_error}</div>
+ <div class="inputs"><div class="input_prompt">Username</div><input type="text" name="{broker_username_path}" value="{broker_username_value}" tabindex="100" size="32"/></div>
+ <div class="inputs"><div class="input_prompt">Password</div><input type="text" name="{broker_password_path}" value="{broker_password_value}" tabindex="100" size="32"/></div>
+ </div>
+ </div>
</div>
- {fields}
+ {fields}
</div>
{form_error}
<div class="foot">
17 years, 8 months
rhmessaging commits: r2292 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-08-12 19:40:57 -0400 (Tue, 12 Aug 2008)
New Revision: 2292
Modified:
mgmt/trunk/cumin/python/cumin/queue.py
mgmt/trunk/cumin/python/cumin/widgets.py
Log:
Implemented a post_process method to allow the form to clear out any parameters after it is rendered
Modified: mgmt/trunk/cumin/python/cumin/queue.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/queue.py 2008-08-12 23:37:43 UTC (rev 2291)
+++ mgmt/trunk/cumin/python/cumin/queue.py 2008-08-12 23:40:57 UTC (rev 2292)
@@ -355,6 +355,9 @@
return (errors or super_error, form_binding_info)
class QueueAdd(QueueForm):
+ def post_process(self, session):
+ self.bindings.post_process(session)
+
def process_cancel(self, session):
branch = session.branch()
self.frame.show_view(branch)
@@ -525,6 +528,9 @@
return "<ul class=\"errors\" style=\"margin:0; float:left;\"><li>%s</li></ul>" % \
"</li><li>".join(errors["no_exchanges"])
+ def post_process(self, session):
+ self.bindings.post_process(session)
+
def process_cancel(self, session):
branch = session.branch()
self.frame.show_view(branch)
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2008-08-12 23:37:43 UTC (rev 2291)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2008-08-12 23:40:57 UTC (rev 2292)
@@ -156,6 +156,8 @@
self.process_submit(session, *args)
else:
self.process_display(session, *args)
+
+ self.post_process(session, *args)
def process_cancel(self, session, *args):
pass
@@ -166,6 +168,9 @@
def process_display(self, session, *args):
pass
+ def post_process(self, session, *args):
+ pass
+
def render_cancel_content(self, session, *args):
return "Cancel"
@@ -347,14 +352,14 @@
def get_items(self, session):
return self.__states
- def render_item_link(self, session, state):
+ def render_item_link(self, session, state, id=id):
branch = session.branch()
self.set(branch, state)
title = self.__titles[state]
class_ = self.get(session) == state and "selected"
- return fmt_link(branch.marshal(), title, class_)
+ return fmt_link(branch.marshal(), title, class_, id=id)
class UnitSwitch(StateSwitch):
def __init__(self, app, name):
17 years, 8 months
rhmessaging commits: r2291 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-08-12 19:37:43 -0400 (Tue, 12 Aug 2008)
New Revision: 2291
Modified:
mgmt/trunk/cumin/python/cumin/formats.py
Log:
Added optional id to formatted links
Modified: mgmt/trunk/cumin/python/cumin/formats.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/formats.py 2008-08-12 23:36:51 UTC (rev 2290)
+++ mgmt/trunk/cumin/python/cumin/formats.py 2008-08-12 23:37:43 UTC (rev 2291)
@@ -112,9 +112,9 @@
else:
return string
-def fmt_link(href, content, class_=""):
- return "<a href=\"%s\"%s>%s</a>" % \
- (href, class_ and " class=\"%s\" " % class_ or " ", content)
+def fmt_link(href, content, class_="", id=""):
+ return "<a %s href=\"%s\"%s>%s</a>" % \
+ (id and "id=\"%s\"" % id or "", href, class_ and " class=\"%s\" " % class_ or " ", content)
def fmt_olink(session, object, selected=False, name=None):
if name is None:
17 years, 8 months
rhmessaging commits: r2290 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-08-12 19:36:51 -0400 (Tue, 12 Aug 2008)
New Revision: 2290
Modified:
mgmt/trunk/cumin/python/cumin/binding.py
mgmt/trunk/cumin/python/cumin/binding.strings
Log:
Now with improved All/Active handling to preserve the form values
Modified: mgmt/trunk/cumin/python/cumin/binding.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/binding.py 2008-08-12 23:35:49 UTC (rev 2289)
+++ mgmt/trunk/cumin/python/cumin/binding.py 2008-08-12 23:36:51 UTC (rev 2290)
@@ -1,8 +1,8 @@
from cumin.exchange import ExchangeInfo
-from cumin.util import sorted_by, is_active
+from cumin.util import sorted_by
from cumin.widgets import StateSwitch
-from formats import fmt_shorten
-from wooly import Template, Writer, Attribute
+from formats import *
+from wooly import Template, Writer, Attribute, Parameter
from wooly.forms import FormInput, FormField
from wooly.parameters import DictParameter
from wooly.resources import StringCatalog
@@ -235,9 +235,10 @@
self.add_state("c", "Active")
self.add_state("a", "All")
- def render_href(self, session):
- pass
-
+ 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)
+
def is_all(self, session):
return self.get(session) == "a"
@@ -251,6 +252,10 @@
self.dict_param = DictParameter(app, "exchange")
self.add_parameter(self.dict_param)
form.add_form_parameter(self.dict_param)
+
+ self.phase = Parameter(app, "phase")
+ self.add_parameter(self.phase)
+ form.add_form_parameter(self.phase)
self.direct_input = DirectExchangeInput(app, "direct", form)
self.add_child(self.direct_input)
@@ -272,9 +277,17 @@
self.binding_errors = self.Errors(self, "binding_errors")
self.add_attribute(self.binding_errors)
- self.__state = ExchangeState(app, "phase")
- self.add_child(self.__state)
+ self.state = ExchangeState(app, "phase")
+ self.add_child(self.state)
+ def render_phase_path(self, session, vhost):
+ # the hidden input phase MUST be rendered before the stateswitch
+ phase = self.phase.get(session)
+ if phase:
+ self.state.set(session, phase)
+
+ return self.phase.path
+
def get_args(self, session):
broker = self.get_parent_named("broker")
reg = broker.get_object(session)
@@ -294,7 +307,7 @@
writer = Writer()
for exchange in sortedExchanges:
if ExchangeInfo.is_builtin(exchange) or \
- not (self.__state.is_active(session) and not is_active(exchange)):
+ not (self.state.is_active(session) and not is_active(exchange)):
# instance_key gives us a unique path for each exchange
# we will be rendering
instance_key = self.dict_param.get_instance_key(str(exchange.id))
@@ -318,6 +331,9 @@
return writer.to_string()
+ def post_process(self, session):
+ self.dict_param.clear()
+
def get_binding_errors(self, session, queue_name):
form_binding_info = self.process_binding_info(session, queue_name)
@@ -356,16 +372,6 @@
berrs.setdefault(name, dict())
berrs[name]["xquery"] = ["Missing xquery"]
- if len(berrs):
- # Tell dictionary to clear out any
- # values the next time the page is submitted
- # before it starts adding new entries.
- # This is needed because checkboxes don't
- # send a blank value when they are cleared.
- self.dict_param.set_clear_on_add()
- else:
- self.dict_param.clear()
-
return (len(berrs), form_binding_info)
def process_binding_info(self, session, queue_name):
Modified: mgmt/trunk/cumin/python/cumin/binding.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/binding.strings 2008-08-12 23:35:49 UTC (rev 2289)
+++ mgmt/trunk/cumin/python/cumin/binding.strings 2008-08-12 23:36:51 UTC (rev 2290)
@@ -132,9 +132,25 @@
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="rfloat">{phase}</div>
<div class="title">{title}</div>
<div class="rclear"> </div>
17 years, 8 months
rhmessaging commits: r2289 - mgmt/trunk/cumin/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-08-12 19:35:49 -0400 (Tue, 12 Aug 2008)
New Revision: 2289
Modified:
mgmt/trunk/cumin/python/wooly/parameters.py
Log:
Removed clear_on_add attribute in favor of post_process method
Modified: mgmt/trunk/cumin/python/wooly/parameters.py
===================================================================
--- mgmt/trunk/cumin/python/wooly/parameters.py 2008-08-12 23:34:39 UTC (rev 2288)
+++ mgmt/trunk/cumin/python/wooly/parameters.py 2008-08-12 23:35:49 UTC (rev 2289)
@@ -8,18 +8,10 @@
self.default = dict()
self.is_dictionary = True
- self.clear_on_add = False
- def set_clear_on_add(self):
- self.clear_on_add = True
-
def add(self, session, value, full_key):
# full_key looks like <DictParameter.path>_<stuff>
- if self.clear_on_add:
- self.clear()
- self.clear_on_add = False
-
keys = self.get(session)
# separate the DictParameter.path from the stuff
17 years, 8 months
rhmessaging commits: r2288 - mgmt/trunk/cumin/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-08-12 19:34:39 -0400 (Tue, 12 Aug 2008)
New Revision: 2288
Modified:
mgmt/trunk/cumin/python/wooly/pages.py
Log:
Added text/css response type for stylesheets
Modified: mgmt/trunk/cumin/python/wooly/pages.py
===================================================================
--- mgmt/trunk/cumin/python/wooly/pages.py 2008-08-12 21:37:06 UTC (rev 2287)
+++ mgmt/trunk/cumin/python/wooly/pages.py 2008-08-12 23:34:39 UTC (rev 2288)
@@ -92,6 +92,8 @@
type = "image/jpeg"
elif name.endswith(".html"):
type = "text/html"
+ elif name.endswith(".css"):
+ type = "text/css"
else:
type = "text/plain"
17 years, 8 months