You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by gj...@apache.org on 2012/04/01 03:07:06 UTC
svn commit: r1307972 [2/2] - in
/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard: ./ htdocs/
templates/ widgets/ widgets/templates/
Added: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/yui_one_col.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/yui_one_col.html?rev=1307972&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/yui_one_col.html (added)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/yui_one_col.html Sun Apr 1 01:07:06 2012
@@ -0,0 +1,46 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:py="http://genshi.edgewall.org/"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="layout.html" />
+ <head>
+ <title>$title</title>
+ <style py:if="default.height is not None">
+ .ui-box-panel {
+ max-height:${default.height}px !important;
+ overflow: auto;
+ }
+ </style>
+ <style>
+ .ui-box {
+ margin: 10px;
+ }
+ </style>
+ </head>
+ <body class="yui-skin-sam">
+ <div id="doc3" class="yui-t7">
+ <div id="hd" role="banner"><h1>$title</h1></div>
+ <div id="bd" role="main">
+ <div role="application"
+ class="yui-g ui-box ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"
+ py:for="w in widgets">
+ <div class="ui-box-header ui-widget-header ui-helper-clearfix ui-corner-all">
+ <div class="ui-box-title">${w.title}</div>
+ </div>
+ <div class="ui-box-panel ui-widget-content ui-corner-bottom">
+ ${w.content}
+ </div>
+ </div>
+ </div>
+ <div id="ft" role="contentinfo">
+ <div id="help">
+ <strong>Note:</strong> See
+ <a href="${href.wiki('BloodhoundDashboard')}">BloodhoundDashboard</a>
+ for help on using the dashboard.
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
Propchange: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/yui_one_col.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/yui_one_col.html
------------------------------------------------------------------------------
svn:mime-type = text/html
Added: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/yui_two_col.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/yui_two_col.html?rev=1307972&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/yui_two_col.html (added)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/yui_two_col.html Sun Apr 1 01:07:06 2012
@@ -0,0 +1,65 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:py="http://genshi.edgewall.org/"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="layout.html" />
+ <head>
+ <title>$title</title>
+ <style py:if="default.height is not None">
+ .ui-box-panel {
+ max-height:${default.height}px !important;
+ overflow: auto;
+ }
+ </style>
+ <style>
+ .ui-box {
+ margin: 10px;
+ }
+ </style>
+ </head>
+
+ <div py:def="widget_container(w)" role="application"
+ class="yui-g ui-box ui-widget ui-widget-content ui-helper-clearfix ui-corner-all">
+ <div class="ui-box-header ui-widget-header ui-helper-clearfix ui-corner-all">
+ <div class="ui-box-title">${w.title}</div>
+ </div>
+ <div class="ui-box-panel ui-widget-content ui-corner-bottom">
+ ${w.content}
+ </div>
+ </div>
+
+ <body class="yui-skin-sam">
+ <div id="content" class="dashboard">
+ <div id="doc3" class="yui-t7">
+ <div id="hd" role="banner"><h1>$title</h1></div>
+ <div id="bd" role="main">
+ <div class="yui-g">
+ <div class="yui-u first">
+ <py:for each="(i, w) in enumerate(widgets)">
+ <py:if test="i & 1 == 0">
+ ${widget_container(w)}
+ </py:if>
+ </py:for>
+ </div>
+ <div class="yui-u">
+ <py:for each="(i, w) in enumerate(widgets)">
+ <py:if test="i & 1 == 1">
+ ${widget_container(w)}
+ </py:if>
+ </py:for>
+ </div>
+ </div>
+ </div>
+ <div id="ft" role="contentinfo">
+ <div id="help">
+ <strong>Note:</strong> See
+ <a href="${href.wiki('BloodhoundDashboard')}">BloodhoundDashboard</a>
+ for help on using the dashboard.
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
Propchange: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/yui_two_col.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/yui_two_col.html
------------------------------------------------------------------------------
svn:mime-type = text/html
Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/web_ui.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/web_ui.py?rev=1307972&r1=1307971&r2=1307972&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/web_ui.py (original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/web_ui.py Sun Apr 1 01:07:06 2012
@@ -53,9 +53,8 @@ class DashboardModule(Component):
"""Initially this will render static widgets. With time it will be
more and more dynamic and flexible.
"""
- add_stylesheet(req, 'dashboard/grids.css')
- add_stylesheet(req, 'dashboard/skin.css')
- return 'bhdb_two_col.html', \
+ add_stylesheet(req, 'dashboard/bootstrap.css')
+ return 'bootstrap_two_col_2_1.html', \
{
'context' : Context.from_request(req),
'widgets' : self.expand_widget_data(req),
@@ -115,15 +114,7 @@ class DashboardModule(Component):
},
{
'c' : TimelineWidget(self.env),
- 'args' : ['Timeline', ctx, {'args' : {'max' : 10}}]
- },
- {
- 'c' : TicketReportWidget(self.env),
- 'args' : ['TicketReport', ctx, {'args' : {'id' : 5}}]
- },
- {
- 'c' : TicketReportWidget(self.env),
- 'args' : ['TicketReport', ctx, {'args' : {'id' : 4}}]
+ 'args' : ['Timeline', ctx, {'args' : {}}]
},
]
chrome = Chrome(self.env)
Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/report.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/report.py?rev=1307972&r1=1307971&r2=1307972&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/report.py (original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/report.py Sun Apr 1 01:07:06 2012
@@ -72,17 +72,17 @@ class TicketReportWidget(WidgetBase):
rptid, page, user = self.bind_params(name, options, *params)
user = user or req.authname
- rptreq = dummy_request(self.env, req.authname)
- rptreq.args = {'page' : page, 'user' : user}
- del rptreq.redirect # raise RequestDone as usual
+ fakereq = dummy_request(self.env, req.authname)
+ fakereq.args = {'page' : page, 'user' : user}
+ del fakereq.redirect # raise RequestDone as usual
rptmdl = self.env[ReportModule]
if rptmdl is None :
raise TracError('Report module not available (disabled?)')
if trac_version < trac_tags[0]:
- args = rptreq, self.env.get_db_cnx(), rptid
+ args = fakereq, self.env.get_db_cnx(), rptid
else:
- args = rptreq, rptid
+ args = fakereq, rptid
data = rptmdl._render_view(*args)[1]
except ResourceNotFound, exc:
raise InvalidIdentifier(unicode(exc))
Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_timeline.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_timeline.html?rev=1307972&r1=1307971&r2=1307972&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_timeline.html (original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_timeline.html Sun Apr 1 01:07:06 2012
@@ -4,21 +4,30 @@
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude">
- <py:for each="day, events in groupby(events, key=lambda e: format_date(e.date))">
- <h2>${day}: ${day == today and 'Today' or day == yesterday and 'Yesterday' or None}</h2>
- <dl>
- <py:for each="event in events"
+ <table py:for="day, events in groupby(events, key=lambda e: format_date(e.date))"
+ class="table table-striped">
+ <thead>
+ <tr>
+ <th>
+ ${day}: ${day == today and 'Today' or day == yesterday and 'Yesterday' or None}
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr py:for="event in events"
py:with="highlight = precision and precisedate and timedelta(0) <= (event.date - precisedate) < precision">
- <dt class="${classes(event.kind, highlight=highlight)}">
- <a href="${event.render('url', context)}">
- <span class="time">${format_time(event.date, str('%H:%M'))}</span> ${event.render('title', context)}
- <py:if test="event.author">by <span class="author">${format_author(event.author)}</span></py:if>
- </a>
- </dt>
- <dd class="${classes(event.kind, highlight=highlight)}">
- ${event.render('description', context)}
- </dd>
- </py:for>
- </dl>
- </py:for>
+ <td>
+ <dt class="${classes(event.kind, highlight=highlight)}">
+ <a href="${event.render('url', context)}">
+ <span class="time">${format_time(event.date, str('%H:%M'))}</span> ${event.render('title', context)}
+ <py:if test="event.author">by <span class="author">${format_author(event.author)}</span></py:if>
+ </a>
+ </dt>
+ <dd class="${classes(event.kind, highlight=highlight)}">
+ ${event.render('description', context)}
+ </dd>
+ </td>
+ </tr>
+ </tbody>
+ </table>
</div>