Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Added interesting font for stats. Added :hover's.
Browse files Browse the repository at this point in the history
Change-Id: I5c7f18f2fc1ad5343a3e4ae5bc8527329c6fc975
  • Loading branch information
Nelson Lai committed Nov 6, 2012
1 parent 51d54da commit b561f88
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
17 changes: 17 additions & 0 deletions css/styles.css
Expand Up @@ -2,6 +2,10 @@ body {
background: #ddd;
}

div.content_box:hover {
background: #f5f5f5;
}

div.content_box {
padding: 10px;
margin: 0 10px 10px 0;
Expand All @@ -28,6 +32,13 @@ a.job_status {
border-right: 1px #fff solid;
border-top: 1px #fff solid;
display: block;
text-align: center;
font-size: .9em;
font-weight: bold;
}

a.job_status:hover {
opacity: .6;
}

.job_status_caption {
Expand Down Expand Up @@ -104,6 +115,12 @@ div.header form {
color: red;
}

.job_stat_value {
font-family: 'Average Sans', serif;
font-size: 1.5em;
color: #444;
}

a.job_status.status-success {
background: lightgreen;
}
Expand Down
1 change: 1 addition & 0 deletions index.html
Expand Up @@ -5,6 +5,7 @@
<title>Jenkins Dashboard</title>
<link href="css/bootstrap.min.css" rel="stylesheet"/>
<link href="css/styles.css" rel="stylesheet"/>
<link href='http://fonts.googleapis.com/css?family=Average+Sans' rel='stylesheet' type='text/css'>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="http://underscorejs.org/underscore-min.js"></script>
<script src="js/bootstrap.min.js"></script>
Expand Down
6 changes: 6 additions & 0 deletions js/main.js
Expand Up @@ -118,6 +118,7 @@ $(function() {
var view_jobs_num_total_tests = 0;
var view_jobs_list = [];
var last_failed_builds = [];
var map_jobs_to_num_tests = {};

// Start building the HTML display
var view_content_box = $('<div/>', {
Expand Down Expand Up @@ -156,6 +157,10 @@ $(function() {
if (match && match.length > 1) {
view_jobs_num_failing_tests += parseInt(match[1]);
view_jobs_num_total_tests += parseInt(match[2]);

// console.log(match[1]);

map_jobs_to_num_tests[job_data.name] = match[1];
}
});
}
Expand Down Expand Up @@ -205,6 +210,7 @@ $(function() {
title: view_job.name + ' - ' + view_job.status,
href: view_job.url,
target: '_blank',
text: map_jobs_to_num_tests[view_job.name],
})
.addClass('status-' + view_job.status.toLowerCase())
.appendTo(job_boxes_container);
Expand Down

0 comments on commit b561f88

Please sign in to comment.