Permalink
Browse files

Continuing work on the dashboard

  • Loading branch information...
1 parent 16376c8 commit 480d29b6cc44ea8c88c3ae6dac43063004608481 @ranginui ranginui committed Jul 11, 2012
Showing with 20 additions and 10 deletions.
  1. +7 −4 lib/KC/Dashboard.pm
  2. +13 −6 views/show_entries.tt
View
11 lib/KC/Dashboard.pm
@@ -17,9 +17,6 @@ my $password;
set 'session' => 'Simple';
-# set 'template' => 'template_toolkit';
-# set 'logger' => 'console';
-# set 'log' => 'debug';
set 'show_errors' => 1;
set 'startup_info' => 1;
set 'warnings' => 1;
@@ -50,14 +47,20 @@ get '/' => sub {
$sth = database->prepare($sql) or die database->errstr;
$sth->execute or die $sth->errstr;
my $daybefore = $sth->fetchrow_hashref();
-
+ $sql = "SELECT bugs.bug_id,short_desc FROM bugs,bugs_activity WHERE bugs.bug_id = bugs_activity.bug_id
+AND added = 'Pushed to Master' AND bug_severity = 'enhancement' ORDER BY bug_when LIMIT 5";
+ $sth = database->prepare($sql) or die database->errstr;
+ $sth->execute or die $sth->errstr;
+ my $enhancement = $sth->fetchall_arrayref;
+
template 'show_entries.tt',
{
'entries' => $entries,
'stats' => $stats,
'yesterday' => $yesterday,
'today' => $today,
'daybefore' => $daybefore,
+ 'enhancments' => $enhancement,
};
};
View
19 views/show_entries.tt
@@ -105,23 +105,30 @@ $(document).ready(function(){
<span id="example_4">
<ul><% FOREACH entry IN entries %>
<li><% entry.0 %> - <% entry.2 %><br>
-<a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=%3C%%20entry.1%20%%3E"><% entry.1 %></a> - <% entry.3 %></li>
+<a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=<% entry.1 %>"><% entry.1 %></a> - <% entry.3 %></li>
<% END %>
</ul>
</span>
<h3>Needs Signoff</h3>
<b>5 Oldest bugs </b>
<div id="needsignoff"></div>
+<h3>New features recently pushed</h3>
+<ul>
+<% FOREACH enhancement IN enhancments %>
+<li><a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=<% enhancement.0 %>"><% enhancement.0%></a> - <% enhancement.1 %></li>
+<% END %>
+</ul>
<h3>Jenkins Status</h3>
<div id="jenkins"></div>
</div>
</div>
<div id="sidebar">
-<h4>Bug activity for <% daybefore.day %></h4>
-<% daybefore.count %> changes
-<h4>Bug activity for <% yesterday.day %></h4>
-<% yesterday.count %> changes
-<h4>Bug activity for <% today.day %></h4>
+<h3>Bug activity </h3>
+<% daybefore.day %> -
+<% daybefore.count %> changes <br/>
+<% yesterday.day %> -
+<% yesterday.count %> changes <br />
+<% today.day %> -
<% today.count %> changes
<h3>Bug statuses</h3>

0 comments on commit 480d29b

Please sign in to comment.