[rhmessaging-commits] rhmessaging commits: r4419 - mgmt/trunk/cumin/python/cumin.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Dec 2 10:11:08 EST 2010


Author: eallen
Date: 2010-12-02 10:11:07 -0500 (Thu, 02 Dec 2010)
New Revision: 4419

Modified:
   mgmt/trunk/cumin/python/cumin/main.py
   mgmt/trunk/cumin/python/cumin/main.strings
Log:
BZ 647199: Update error notice when there are no brokers configured (and no broker at localhost)

Modified: mgmt/trunk/cumin/python/cumin/main.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/main.py	2010-12-01 14:13:40 UTC (rev 4418)
+++ mgmt/trunk/cumin/python/cumin/main.py	2010-12-02 15:11:07 UTC (rev 4419)
@@ -181,9 +181,11 @@
     def do_process(self, session):
         super(OverviewFrame, self).do_process(session)
 
-        count = len(self.app.session.qmf_brokers)
+        configured_count = len([x for x in self.app.session.qmf_brokers if x.host != "localhost"])
+        connected_count = len([x for x in self.app.session.qmf_brokers if x.connected])
 
-        if count == 0:
+        # there were no user defined entries in cumin.conf and localhost isn't connected
+        if (configured_count == 0) and (connected_count == 0):
             self.mode.set(session, self.notice)
 
     def render_title(self, session):

Modified: mgmt/trunk/cumin/python/cumin/main.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/main.strings	2010-12-01 14:13:40 UTC (rev 4418)
+++ mgmt/trunk/cumin/python/cumin/main.strings	2010-12-02 15:11:07 UTC (rev 4419)
@@ -66,20 +66,19 @@
 
 [ConfigurationNotice.html]
 <div class="ConfigurationNotice">
-  <h1><img src="{resource_prefix}/warning-36.png"/> QMF server not found</h1>
+  <h1><img src="{resource_prefix}/warning-36.png"/> Broker not found</h1>
 
-  <p>This console is not connected to any QMF servers and as a result
+  <p>This console is not connected to any brokers and as a result
   has no management data to display.</p>
 
-  <p>To connect, set the <code>qmf</code> configuration parameter in
-  the config file located at <code>/etc/cumin/cumin.conf</code>.</p>
+  <p>To connect, set the <code>brokers</code> configuration parameter in
+   the <code>[common]</code> section of the config file located at <code>/etc/cumin/cumin.conf</code>. or <code>~/.cumin.conf</code></p>
 
-  <blockquote><pre>[main]
-data: postgresql://cumin@localhost/cumin
-<strong>qmf: server.example.com</strong>
-</pre></blockquote>
+  <blockquote><pre>[common]<br/>
+  <strong>brokers: broker1.server.com,broker2.server.com</strong>
+  </pre></blockquote>
 
-  <p>Without a user-specified setting, cumin looks for a QMF server
+  <p>Without a user-specified setting, cumin looks for a broker
   at <code>localhost:5672</code>.  If you wish to use this
   configuration, make sure there is a broker with QMF enabled running
   at this address.</p>



More information about the rhmessaging-commits mailing list