Skip to content

Instantly share code, notes, and snippets.

@spilth
Created July 28, 2010 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spilth/494938 to your computer and use it in GitHub Desktop.
Save spilth/494938 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>$reportGroup Status Board</title>
<meta http-equiv="refresh" content="60">
<style type="text/css">
body, td, th {
font: medium helvetica, verdana, arial, sans-serif;
color: #fff;
}
body {
background: #000;
}
a {
color: #fff;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
th, td {padding: 3px; margin: 1px; text-align: center}
th.name, td.name {text-align: left;}
th {
font-weight: bold;
background:#999;
border-top:1px solid #666
}
table#main-data tr {background: #222;}
table#main-data tr:nth-child(2n+1) {background:#333;}
table.builds tr {background:transparent !important;}
table.builds td a {
width: 90px;
height: 2em;
text-align: center;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
padding:8px;
display:block;
}
table.builds td.success a {
background: #090;
}
table.builds td.failure a {
background: #f00;
}
td.build-id a {
width: 90px;
height: 2em;
text-align: center;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
padding: 4px;
display:block;
}
.build-hover {
background:#fff;
color: #00a;
}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
function rollonOff (elem, toggleOn) {
var myClass = elem.attr("class");
elem.parent("td").parent("tr").children("td.build-id").each(function () {
var anchorChildren = $(this).children("a");
if (anchorChildren.hasClass(myClass)) {
(toggleOn) ? anchorChildren.addClass("build-hover") : anchorChildren.removeClass("build-hover");
}
});
}
$("td.build-id > a").hover(function () {rollonOff($(this), true)}, function () {rollonOff($(this), false)});
});
</script>
</head>
<body>
<h1>$reportGroup Status Board</h1>
<table cellpadding="0" cellspacing="0">
#foreach($environmentGroup in $environmentGroups)
<tr>
<th class="name">$environmentGroup.name</th>
<th>Latest Builds</th>
#foreach($status in $environmentGroup.lifeCycleModel.statuses)
#if(!$status.isLocked())
<th>$status.getName()</th>
#end
#end
</tr>
#foreach($project in $environmentGroup.projects)
<tr>
<td class="name"><a href="/tasks/project/ProjectTasks/viewDashboard?projectId=$project.id">$project.name</a></td>
<td>
<table cellpadding="0" cellspacing="0" class="builds">
<tr>
#foreach($build in $project.builds)
#if ($build.getStatus().isSuccess())
<td class="success"><a href="/tasks/project/BuildLifeTasks/viewBuildLife?buildLifeId=$build.getBuildLifeId()">$build.getWorkflowName()</a></td>
#else
<td class="failure"><a href="/tasks/project/BuildLifeTasks/viewBuildLife?buildLifeId=$build.getBuildLifeId()">$build.getWorkflowName()</a></td>
#end
#end
</tr>
</table>
</td>
#foreach($status in $environmentGroup.lifeCycleModel.statuses)
#if(!$status.isLocked())
#if ($project.statuses.get($status.getName()).getLatestStamp())
<td class="build-id"><a class="buildLifeId-$project.statuses.get($status.getName()).getBuildLifeId()" href="/tasks/project/BuildLifeTasks/viewBuildLife?buildLifeId=$project.statuses.get($status.getName()).getBuildLifeId()">$project.statuses.get($status.getName()).getLatestStamp()</a></td>
#else
<td>&nbsp;</td>
#end
#end
#end
</tr>
#end
#end
</table>
<p>Last Update: $date</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment