[rhmessaging-commits] rhmessaging commits: r4339 - mgmt/newdata/cumin/python/cumin.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Thu Sep 23 17:52:14 EDT 2010
Author: justi9
Date: 2010-09-23 17:52:14 -0400 (Thu, 23 Sep 2010)
New Revision: 4339
Modified:
mgmt/newdata/cumin/python/cumin/widgets.py
mgmt/newdata/cumin/python/cumin/widgets.strings
Log:
For bz 622506, make error output cuminly
Modified: mgmt/newdata/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/widgets.py 2010-09-23 20:48:59 UTC (rev 4338)
+++ mgmt/newdata/cumin/python/cumin/widgets.py 2010-09-23 21:52:14 UTC (rev 4339)
@@ -1339,6 +1339,9 @@
self.user = UserAttribute(app, "user")
self.add_attribute(self.user)
+ self.error_tmpl = WidgetTemplate(self, "error_html")
+ self.not_found_tmpl = WidgetTemplate(self, "not_found_html")
+
def service(self, session):
try:
return super(CuminPage, self).service(session)
@@ -1393,6 +1396,21 @@
return False
+ def render_error(self, session):
+ cls, value, traceback = sys.exc_info()
+
+ writer = Writer()
+
+ if cls is RosemaryNotFound:
+ self.not_found_tmpl.render(writer, session)
+ else:
+ self.error_tmpl.render(writer, session)
+
+ return writer.to_string()
+
+ def render_error_dump(self, session):
+ return self.error.get(session).render()
+
class CuminFormPage(CuminPage):
def __init__(self, app, name):
super(CuminFormPage, self).__init__(app, name)
Modified: mgmt/newdata/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/newdata/cumin/python/cumin/widgets.strings 2010-09-23 20:48:59 UTC (rev 4338)
+++ mgmt/newdata/cumin/python/cumin/widgets.strings 2010-09-23 21:52:14 UTC (rev 4339)
@@ -165,8 +165,6 @@
<div id="body">
{tasks}
- <div id="messages" style="display: none;"><p title="close" onclick="cumin.hideActions()">x</p>{actions}</div>
-
{heartbeat}
{content}
@@ -174,6 +172,32 @@
<div id="foot"/>
+[CuminPage.error_html]
+<div id="body">
+ <h1 style="margin: 0.5em 0 1em 0;">An error!</h1>
+
+ <p>Something unexpected happened. Please report this problem
+ at <a href="http://bugzilla.redhat.com">bugzilla.redhat.com</a>
+ under the
+ <a href="https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20MRG">Red Hat Enterprise MRG product</a>.</p>
+
+ <p><a onclick="$('error').setStyle('display', 'inline')">See the
+ details</a>. Please include this in any bugs filed.</p>
+
+ <div id="error" style="display: none;">
+ {error_dump}
+ </div>
+</div>
+
+[CuminPage.not_found_html]
+<div id="body">
+ <h1 style="margin: 0.5em 0 1em 0;">We can't find the object you requested</h1>
+
+ <p>This often happens when a far-off agent stops or is disconnected.
+ It may come back under a different database ID. Try navigating anew
+ from the <a href="/index.html">site root</a>.</p>
+</div>
+
[CuminPageLinks.css]
ul.CuminPageLinks {
padding: 0;
More information about the rhmessaging-commits
mailing list