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:02:52 UTC
svn commit: r1307971 - in
/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard:
templates/bhdb_two_col.html web_ui.py
Author: gjm
Date: Sun Apr 1 01:02:52 2012
New Revision: 1307971
URL: http://svn.apache.org/viewvc?rev=1307971&view=rev
Log:
Dashboard code import: BH_Dashboard: Playing with two column dashboard (experimental)
Modified:
incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/bhdb_two_col.html
incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/web_ui.py
Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/bhdb_two_col.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/bhdb_two_col.html?rev=1307971&r1=1307970&r2=1307971&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/bhdb_two_col.html (original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/templates/bhdb_two_col.html Sun Apr 1 01:02:52 2012
@@ -7,23 +7,58 @@
<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>Header</h1></div>
+ <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"><p>Footer</p></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>
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=1307971&r1=1307970&r2=1307971&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:02:52 2012
@@ -55,7 +55,7 @@ class DashboardModule(Component):
"""
add_stylesheet(req, 'dashboard/grids.css')
add_stylesheet(req, 'dashboard/skin.css')
- return 'bhdb_one_col.html', \
+ return 'bhdb_two_col.html', \
{
'context' : Context.from_request(req),
'widgets' : self.expand_widget_data(req),
@@ -116,7 +116,15 @@ 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}}]
+ },
]
chrome = Chrome(self.env)
render = chrome.render_template