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

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Mon Nov 16 11:11:56 EST 2009


Author: justi9
Date: 2009-11-16 11:11:55 -0500 (Mon, 16 Nov 2009)
New Revision: 3711

Modified:
   mgmt/trunk/cumin/python/cumin/main.py
   mgmt/trunk/cumin/python/cumin/main.strings
Log:
Bring the qmf-server configuration warning up-to-date

Modified: mgmt/trunk/cumin/python/cumin/main.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/main.py	2009-11-12 18:38:56 UTC (rev 3710)
+++ mgmt/trunk/cumin/python/cumin/main.py	2009-11-16 16:11:55 UTC (rev 3711)
@@ -127,6 +127,17 @@
         self.view = OverviewView(app, "view")
         self.add_mode(self.view)
 
+        self.notice = ConfigurationNotice(app, "notice")
+        self.add_mode(self.notice)
+
+    def do_process(self, session):
+        super(OverviewFrame, self).do_process(session)
+
+        count = len(self.app.model.mint.model.mintBrokersByUrl)
+
+        if count == 0 or True:
+            self.mode.set(session, self.notice)
+
     def render_title(self, session):
         return "Overview"
 
@@ -134,9 +145,6 @@
     def __init__(self, app, name):
         super(OverviewView, self).__init__(app, name)
 
-        notice = self.ManagementServerNotice(app, "notice")
-        self.add_child(notice)
-
         queues = messaging.queue.TopQueueSet(app, "queues")
         self.add_child(queues)
 
@@ -153,10 +161,5 @@
         def render_icon_href(self, session):
             return "resource?name=action-36.png"
 
-    class ManagementServerNotice(Widget):
-        def do_render(self, session):
-            count = len(self.app.model.mint.model.mintBrokersByUrl)
-
-            if count == 0:
-                return super(OverviewView.ManagementServerNotice,
-                             self).do_render(session)
+class ConfigurationNotice(Widget):
+    pass

Modified: mgmt/trunk/cumin/python/cumin/main.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/main.strings	2009-11-12 18:38:56 UTC (rev 3710)
+++ mgmt/trunk/cumin/python/cumin/main.strings	2009-11-16 16:11:55 UTC (rev 3711)
@@ -53,23 +53,36 @@
   </table>
 </div>
 
-[ManagementServerNotice.css]
-div.ManagementServerNotice {
-    margin: 0 0 1em 0;
+[ConfigurationNotice.css]
+div.ConfigurationNotice {
+    margin: 2em;
     border: 1px dotted #cec;
-    padding: 1em;
+    padding: 0 1em;
     background-color: #dfd;
 }
 
-div.ManagementServerNotice img {
-    vertical-align: top;
-    float: left;
-    margin: 0 0.5em 0.5em 0;
+div.ConfigurationNotice h1 > img {
+    vertical-align: -60%;
+    margin: 0 0.2em 0 0 ;
 }
 
-[ManagementServerNotice.html]
-<div class="ManagementServerNotice">
-  <img src="resource?name=notice-36.png"/> This console is not
-  registered with any management servers.  Go to the 'Management Servers'
-  tab above to add a new server.
+[ConfigurationNotice.html]
+<div class="ConfigurationNotice">
+  <h1><img src="resource?name=warning-36.png"/> QMF server not found</h1>
+
+  <p>This console is not connected to any QMF servers 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>
+
+  <blockquote><pre>[main]
+data: postgresql://cumin@localhost/cumin
+<strong>qmf: server.example.com</strong>
+</pre></blockquote>
+
+  <p>Without a user-specified setting, cumin looks for a QMF server
+  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>
 </div>



More information about the rhmessaging-commits mailing list