[gnome-ostree] repoweb: Import changes from Andreas Nilsson
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] repoweb: Import changes from Andreas Nilsson
- Date: Sat, 15 Dec 2012 22:53:03 +0000 (UTC)
commit 959465fb043b03a218250530cf9bd6f9dd063299
Author: Colin Walters <walters verbum org>
Date: Sat Dec 15 17:40:55 2012 -0500
repoweb: Import changes from Andreas Nilsson
Patch based on design work from Andreas Nilsson <andreas andreasn se>
qa/repoweb/images/ajax-loader.gif | Bin 0 -> 7825 bytes
qa/repoweb/images/buildbot-happy.png | Bin 0 -> 6210 bytes
qa/repoweb/images/buildbot-sad.png | Bin 0 -> 6190 bytes
qa/repoweb/images/html-bg.png | Bin 0 -> 312 bytes
qa/repoweb/images/icons-18-black.png | Bin 0 -> 1767 bytes
qa/repoweb/images/icons-18-white.png | Bin 0 -> 1806 bytes
qa/repoweb/images/icons-36-black.png | Bin 0 -> 3611 bytes
qa/repoweb/images/icons-36-white.png | Bin 0 -> 3648 bytes
qa/repoweb/index.html | 107 +++++----
qa/repoweb/repoweb.css | 434 +++++++++-------------------------
qa/repoweb/repoweb.js | 42 ++--
11 files changed, 193 insertions(+), 390 deletions(-)
---
diff --git a/qa/repoweb/images/ajax-loader.gif b/qa/repoweb/images/ajax-loader.gif
new file mode 100644
index 0000000..fd1a189
Binary files /dev/null and b/qa/repoweb/images/ajax-loader.gif differ
diff --git a/qa/repoweb/images/buildbot-happy.png b/qa/repoweb/images/buildbot-happy.png
new file mode 100644
index 0000000..1be6c4c
Binary files /dev/null and b/qa/repoweb/images/buildbot-happy.png differ
diff --git a/qa/repoweb/images/buildbot-sad.png b/qa/repoweb/images/buildbot-sad.png
new file mode 100644
index 0000000..b300d90
Binary files /dev/null and b/qa/repoweb/images/buildbot-sad.png differ
diff --git a/qa/repoweb/images/html-bg.png b/qa/repoweb/images/html-bg.png
new file mode 100644
index 0000000..b51984e
Binary files /dev/null and b/qa/repoweb/images/html-bg.png differ
diff --git a/qa/repoweb/images/icons-18-black.png b/qa/repoweb/images/icons-18-black.png
new file mode 100644
index 0000000..ce1b758
Binary files /dev/null and b/qa/repoweb/images/icons-18-black.png differ
diff --git a/qa/repoweb/images/icons-18-white.png b/qa/repoweb/images/icons-18-white.png
new file mode 100644
index 0000000..1ab0127
Binary files /dev/null and b/qa/repoweb/images/icons-18-white.png differ
diff --git a/qa/repoweb/images/icons-36-black.png b/qa/repoweb/images/icons-36-black.png
new file mode 100644
index 0000000..1a59d7c
Binary files /dev/null and b/qa/repoweb/images/icons-36-black.png differ
diff --git a/qa/repoweb/images/icons-36-white.png b/qa/repoweb/images/icons-36-white.png
new file mode 100644
index 0000000..5647bdc
Binary files /dev/null and b/qa/repoweb/images/icons-36-white.png differ
diff --git a/qa/repoweb/index.html b/qa/repoweb/index.html
index cb2e3fa..3f1040f 100644
--- a/qa/repoweb/index.html
+++ b/qa/repoweb/index.html
@@ -1,48 +1,63 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>GNOME-OSTree</title>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="jquery.mobile-1.1.0.css" />
- <link rel="stylesheet" href="repoweb.css"/>
- <script src="jquery-1.7.1.js"></script>
- <script src="jquery.mobile-1.1.0.js"></script>
- <script src="repoweb.js"></script>
- </head>
- <body onload="$(document).ready(function(){repoweb_index_init();})">
-
- <div data-role="page" class="type-interior">
- <div data-role="header">
- <h1>GNOME-OSTree build server</h1>
- </div>
-
- <div data-role="content">
- <div class="content-primary">
- <p>This is
- the <a href="https://live.gnome.org/OSTree/GnomeOSTree">GNOME-OSTree</a>
- build server. It builds from
- the <a href="http://git.gnome.org/browse/gnome-ostree">gnome-ostree</a>
- git module.</p>
-
- <h3>Builds</h3>
- <ul id="build-summary" data-role="listview" data-theme="d" data-divider-theme="d">
- </ul>
-
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <title>
+ </title>
+ <link rel="stylesheet" href="jquery.mobile-1.2.0.css" />
+ <link rel="stylesheet" href="repoweb.css" />
+ <style>
+ /* App custom styles */
+ </style>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">
+ </script>
+ <script src="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile-1.2.0.min.js">
+ </script>
+ <script src="repoweb.js">
+ </script>
+ </head>
+ <body onload="$(document).ready(function(){repoweb_index_init();})">
+ <!-- Home -->
+ <div data-role="page" data-theme="a" id="page1">
+ <div data-theme="" data-role="header">
+ <h3>
+ GNOME-OSTree build server
+ </h3>
+ <div data-role="navbar" data-iconpos="top">
+ <ul>
+ <li>
+ <a href="#page1" data-transition="fade" data-theme="" data-icon="">
+ Home
+ </a>
+ </li>
+ <li>
+ <a href="work/tasks" data-transition="fade" data-theme="" data-icon="">
+ Build logs
+ </a>
+ </li>
+ <li>
+ <a href="work/src" data-transition="fade" data-theme="" data-icon="">
+ Source code
+ </a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div data-role="content">
+ <div class="buildstatus" id="buildstatus">
+ </div>
+<p>This is the <a href="https://live.gnome.org/OSTree/GnomeOSTree" class="ui-link">GNOME-OSTree</a> build server. It builds from the <a href="http://git.gnome.org/browse/gnome-ostree" class="ui-link">gnome-ostree</a> git module.</p>
+ <ul data-role="listview" data-divider-theme="a" data-inset="true" id="build-summary">
+ </ul>
+ </div>
+ <div class="footer">
+ <p>Optimized for standards. Hosted by <a href="" data-transition="fade">Colin Walters</a>. Powered by <a href="http://jquerymobile.com" data-transition="fade">jquery-mobile</a>.</p>
+ </div>
</div>
- <div class="content-secondary">
- <ul data-role="listview" data-theme="c" data-dividertheme="d">
- <li data-role="list-divider">Tools</li>
- <li><a href="work/tasks" rel="external">Build logs</a></li>
- <li><a href="work/src" rel="external">Source code</a></li>
- </ul>
- </div>
- </div> <!-- content -->
- </div>
- </body>
-</html>
-<!--
- Local Variables:
- indent-tabs-mode: nil
- End:
--->
+ <script>
+ //App custom javascript
+ </script>
+ </body>
+</html>
diff --git a/qa/repoweb/repoweb.css b/qa/repoweb/repoweb.css
index dd09e95..e482c0a 100644
--- a/qa/repoweb/repoweb.css
+++ b/qa/repoweb/repoweb.css
@@ -1,369 +1,149 @@
-/* taken from http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.css */
+/* Put your custom CSS here */
-.repoweb-build-failed {
- color: red;
+.ui-body-a, .ui-overlay-a {
+ background: #fff url(images/html-bg.png) 0 10px repeat-x;;
}
-.repoweb-build-success {
- color: green;
+a.ui-link {
+ color: blue;
+ text-shadow: none;
}
-/* jqm docs css
+/* Listview specific styling */
-Beware: lots of last-minute CSS going on in here
-cobblers, shoes,
-*/
-
-body { background: #dddddd; }
-.ui-mobile .type-home .ui-content { margin: 0; background: #e5e5e5 url(../images/jqm-sitebg.png) top center repeat-x; }
-.ui-mobile #jqm-homeheader { padding: 40px 10px 0; text-align: center; margin: 0 auto; }
-.ui-mobile #jqm-homeheader h1 { margin: 0 0 ; }
-.ui-mobile #jqm-homeheader p { margin: .3em 0 0; line-height: 1.3; font-size: .9em; font-weight: bold; color: #666; }
-.ui-mobile #jqm-version { text-indent: -99999px; background: url(../images/version.png) top right no-repeat; width: 119px; height: 122px; overflow: hidden; position: absolute; z-index: 50; top: -11px; right: 0; }
-.ui-mobile .jqm-themeswitcher { margin: 10px 25px 10px 10px; }
-
-h2 { margin:1.2em 0 .4em 0; }
-p code { font-size:1.2em; font-weight:bold; }
-h4 code {font-size:1.2em; font-weight:bold; }
-
-dt { font-weight: bold; margin: 2em 0 .5em; }
-dt code, dd code { font-size:1.3em; line-height:150%; }
-pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
-
-#jqm-homeheader img { width: 235px; }
-img { max-width: 100%; }
-
-/* fluid images moved from jquery.mobile.core.css*/
-.ui-mobile img {
- max-width: 100%;
+.ui-listview .ui-bar-a {
+ border: 1px solid #b1b1b1 /*{a-bar-border}*/;
+ background: #e6e6e6 /*{a-bar-background-color}*/;
+ color: #555555 /*{a-bar-color}*/;
+ font-weight: bold;
+ text-shadow: none;
}
-.ui-header .jqm-home { top: 0; }
-nav { margin: 0; }
-
-
-
-p.intro {
- font-size: .96em;
- line-height: 1.3;
- border-top: 1px solid #75ae18;
- border-bottom: 0;
- background: none;
- margin: 1.5em 0;
- padding: 1.5em 15px 0;
-
+.ui-listview .ui-bar-a .ui-link-inherit {
+ color: #fff /*{a-bar-color}*/;
}
-p.intro strong {
- color: #558e08;
-}
-.footer-docs {
- padding: 5px 0;
+.ui-listview .ui-bar-a a.ui-link {
+ color: #7cc4e7 /*{a-bar-link-color}*/;
+ font-weight: bold;
}
-.footer-docs p {
- margin-left:15px;
- font-weight: normal;
- font-size: .9em;
+.ui-listview .ui-bar-a a.ui-link:visited {
+ color: #2489ce /*{a-bar-link-visited}*/;
}
-
-.type-interior .content-secondary {
- border-right: 0;
- border-left: 0;
- margin: 10px -15px 0;
- background: #fff;
- border-top: 1px solid #ccc;
+.ui-listview .ui-bar-a a.ui-link:hover {
+ color: #2489ce /*{a-bar-link-hover}*/;
}
-.type-home .ui-content {
- margin-top: 5px;
+.ui-listview .ui-bar-a a.ui-link:active {
+ color: #2489ce /*{a-bar-link-active}*/;
}
-.type-interior .ui-content {
- padding-bottom: 0;
-}
-.content-secondary .ui-collapsible {
- padding: 0 15px 10px;
+.ui-listview .ui-btn-up-a {
+ border: 1px solid #fff /*{a-bup-border}*/;
+ border-right: 1px solid #b1b1b1;
+ border-left: 1px solid #b1b1b1;
+ background: #f5f5f4 /*{a-bup-background-color}*/;
+ font-weight: bold;
+ color: #fff /*{a-bup-color}*/;
+ text-shadow: none;
}
-.content-secondary .ui-collapsible-content {
- padding: 0;
- background: none;
- border-bottom: none;
-}
-.content-secondary .ui-listview {
- margin: 0;
-}
-/* new API additions */
-dt {
- margin: 35px 0 15px 0;
- background-color:#ddd;
- font-weight:normal;
-}
-dt code {
- display:inline-block;
- font-weight:bold;
- color:#56A00E;
- padding:3px 7px;
- margin-right:10px;
- background-color:#fff;
-}
-dd {
- margin-bottom:10px;
-}
-dd .default { font-weight:bold; }
-dd pre {
- margin:0 0 0 0;
-}
-dd code { font-weight: normal; }
-dd pre code {
- margin:0;
- border:none;
- font-weight:normal;
- font-size:100%;
- background-color:transparent;
-}
-dd h4 { margin:15px 0 0 0; }
-
-.localnav {
- margin:0 0 20px 0;
- overflow:hidden;
-}
-.localnav li {
- float:left;
-}
-.localnav .ui-btn-inner {
- padding: .6em 10px;
- font-size:80%;
+.ui-listview .ui-li-last, .ui-listview .ui-li-last:hover {
+ border-bottom: 1px solid #b1b1b1;
}
-/* custom dialog for the photos sharing */
-.ui-dialog.dialog-actionsheet .ui-dialog-contain {
- margin-top: 0;
+.ui-listview .ui-btn-up-a:visited,
+.ui-listview .ui-btn-up-a a.ui-link-inherit {
+ color: #555555 /*{a-bup-color}*/;
}
-
-
-/* F bar theme - just for the docs overview headers */
-.ui-bar-f {
- border: 1px solid #56A00E;
- background: #74b042;
- color: #fff;
+.ui-listview .ui-btn-hover-a {
+ border: 1px solid #fff /*{a-bup-border}*/;
+ border-right: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ background: rgba(100%,100%,100%,0.5);
font-weight: bold;
- text-shadow: 0 1px 1px #335413;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#74b042), to(#56A00E)); /* Saf4+, Chrome */
- background-image: -webkit-linear-gradient(#74b042, #56A00E); /* Chrome 10+, Saf5.1+ */
- background-image: -moz-linear-gradient(#74b042, #56A00E); /* FF3.6 */
- background-image: -ms-linear-gradient(#74b042, #56A00E); /* IE10 */
- background-image: -o-linear-gradient(#74b042, #56A00E); /* Opera 11.10+ */
- background-image: linear-gradient(#74b042, #56A00E);
+ color: #3465a4;
+ text-shadow: none;
}
-.ui-bar-f,
-.ui-bar-f input,
-.ui-bar-f select,
-.ui-bar-f textarea,
-.ui-bar-f button {
- font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+.ui-btn-hover-a:visited,
+.ui-btn-hover-a:hover,
+.ui-btn-hover-a a.ui-link-inherit {
+ color: #3465a4; /*{a-bhover-color}*/;
}
-.ui-bar-f,
-.ui-bar-f .ui-link-inherit {
- color: #fff;
-}
-.ui-bar-f .ui-link {
- color: #fff;
- font-weight: bold;
-}
-.ui-btn-up-f {
- border: 1px solid #3B6F07;
- background: #56A00E;
+.ui-listview .ui-btn-active {
+ border: 1px solid #bfcee1 /*{global-active-border}*/;
+ background: #dde5ef url(images/focus-bg.png) top repeat-x;
font-weight: bold;
- color: #fff;
- text-shadow: 0 1px 1px #234403;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#74b042), to(#56A00E)); /* Saf4+, Chrome */
- background-image: -webkit-linear-gradient(#74b042, #56A00E); /* Chrome 10+, Saf5.1+ */
- background-image: -moz-linear-gradient(#74b042, #56A00E); /* FF3.6 */
- background-image: -ms-linear-gradient(#74b042, #56A00E); /* IE10 */
- background-image: -o-linear-gradient(#74b042, #56A00E); /* Opera 11.10+ */
- background-image: linear-gradient(#74b042, #56A00E);
+ color: #fff /*{global-active-color}*/;
+ cursor: pointer;
}
-.ui-btn-up-f a.ui-link-inherit {
- color: #fff;
-}
-.ui-btn-hover-f {
- border: 1px solid #3B6F07;
- background: #6EBC1F;
- font-weight: bold;
- color: #fff;
- text-shadow: 0 1px 1px #234403;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#8FC963), to(#6EBC1F)); /* Saf4+, Chrome */
- background-image: -webkit-linear-gradient(#8FC963, #6EBC1F); /* Chrome 10+, Saf5.1+ */
- background-image: -moz-linear-gradient(#8FC963, #6EBC1F); /* FF3.6 */
- background-image: -ms-linear-gradient(#8FC963, #6EBC1F); /* IE10 */
- background-image: -o-linear-gradient(#8FC963, #6EBC1F); /* Opera 11.10+ */
- background-image: linear-gradient(#8FC963, #6EBC1F);
-}
-.ui-btn-hover-f a.ui-link-inherit {
- color: #fff;
+
+.ui-listview .ui-btn-active:visited,
+.ui-listview .ui-btn-active:hover,
+.ui-listview .ui-btn-active a.ui-link-inherit {
+ color: #000 /*{global-active-color}*/;
}
-.ui-btn-down-f {
- border: 1px solid #3B6F07;
- background: #3d3d3d;
- font-weight: bold;
- color: #fff;
- text-shadow: 0 1px 1px #234403;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#56A00E), to(#64A234)); /* Saf4+, Chrome */
- background-image: -webkit-linear-gradient(#56A00E, #64A234); /* Chrome 10+, Saf5.1+ */
- background-image: -moz-linear-gradient(#56A00E, #64A234); /* FF3.6 */
- background-image: -ms-linear-gradient(#56A00E, #64A234); /* IE10 */
- background-image: -o-linear-gradient(#56A00E, #64A234); /* Opera 11.10+ */
- background-image: linear-gradient(#56A00E, #64A234);
+
+
+/* Switches between buildbot-happy.png and buildbot-sad.png depending on the state of the build server*/
+.buildstatus {
+ margin: auto;
+ width: 288px;
+ height: 200px;
+ position: relative;
+ background-color: #fbfbfb;
+ border: 1px solid #b8b8b8;
}
-.ui-btn-down-f a.ui-link-inherit {
- color: #fff;
+
+.buildstatus-happy {
+ background-image: url('images/buildbot-happy.png');
}
-.ui-btn-up-f,
-.ui-btn-hover-f,
-.ui-btn-down-f {
- font-family: Helvetica, Arial, sans-serif;
- text-decoration: none;
+
+.buildstatus-sad {
+ background-image: url('images/buildbot-sad.png');
}
+.ui-header {
+ background: none;
+ border: none;
+}
+.ui-navbar li:first-child a {
+ border-radius: 10px 0px 0px 10px;
+}
+.ui-navbar li:last-child a {
+ border-radius: 0px 10px 10px 0px;
+}
-/* docs site layout */
+.ui-navbar li a:hover {
+ color: #fff;
+}
- media all and (min-width: 650px){
-
+.ui-navbar li .ui-btn-icon-top .ui-btn-inner {
+ padding: 15px;
+}
- .type-home .ui-content {
- margin-top: 5px;
- }
- .ui-mobile #jqm-homeheader {
- max-width: 340px;
- }
- .ui-mobile .jqm-themeswitcher {
- float: right;
- }
- p.intro {
- margin: 2em 0;
- }
- .type-home .ui-content,
- .type-interior .ui-content {
- padding: 0;
- background: url(../images/px-ccc.gif) 50% 0 repeat-y;
- }
- .type-interior .ui-content {
- background-position: 45%;
- overflow: hidden;
- }
- .content-secondary {
- text-align: left;
- float: left;
- width: 45%;
- background: none;
- }
- .content-secondary,
- .type-interior .content-secondary {
- margin: 30px 0 20px 2%;
- padding: 20px 4% 0 0;
- background: none;
- border-top: none;
- }
- .type-index .content-secondary {
- padding: 0;
- }
- .content-secondary .ui-collapsible {
- margin: 0;
- padding: 0;
- }
- .content-secondary .ui-collapsible-content {
- border: none;
- }
- .type-index .content-secondary .ui-listview {
- margin: 0;
- }
+.ui-header .ui-title {
+ text-shadow: none;
+ color: #000;
+}
- .ui-mobile #jqm-homeheader {
- padding: 0;
- }
- .content-primary {
- width: 45%;
- float: right;
- margin-top: 30px;
- margin-right: 1%;
- padding-right: 1%;
- }
- .content-primary ul:first-child {
- margin-top: 0;
- }
- .content-secondary h2 {
- position: absolute;
- left: -9999px;
- }
- .type-interior .content-primary {
- padding: 1.5em 6% 3em 0;
- margin: 0;
- }
- /* fix up the collapsibles - expanded on desktop */
- .content-secondary .ui-collapsible-heading {
- display: none;
- }
- .content-secondary .ui-collapsible-contain {
- margin:0;
- }
- .content-secondary .ui-collapsible-content {
- display: block;
- margin: 0;
- padding: 0;
- }
- .type-interior .content-secondary .ui-li-divider {
- padding-top: 1em;
- padding-bottom: 1em;
- }
- .type-interior .content-secondary {
- margin: 0;
- padding: 0;
- }
-
+.time {
+ float: right;
}
- media all and (min-width: 750px){
- .type-home .ui-content,
- .type-interior .ui-content {
- background-position: 39%;
- }
- .content-secondary {
- width: 34%;
- }
- .content-primary {
- width: 56%;
- padding-right: 1%;
- }
- .type-interior .ui-content {
- background-position: 34%;
- }
+
+p {
+ text-shadow: none;
+ color: #000;
+ text-align: center;
}
- media all and (min-width: 1200px){
- .type-home .ui-content{
- background-position: 38.5%;
- }
- .type-interior .ui-content {
- background-position: 30%;
- }
- .content-secondary {
- width: 30%;
- padding-right:6%;
- margin: 30px 0 20px 5%;
- }
- .type-interior .content-secondary {
- margin: 0;
- padding: 0;
- }
- .content-primary {
- width: 50%;
- margin-right: 5%;
- padding-right: 3%;
- }
- .type-interior .content-primary {
- width: 60%;
+ media all and (min-width: 960px) {
+ .ui-mobile [data-role="page"], .ui-mobile [data-role="dialog"], .ui-page {
+ padding-top: 50px;
+ width: 960px;
+ margin: auto;
+ position: relative;
}
}
diff --git a/qa/repoweb/repoweb.js b/qa/repoweb/repoweb.js
index 5476a8c..fc3abfb 100644
--- a/qa/repoweb/repoweb.js
+++ b/qa/repoweb/repoweb.js
@@ -100,9 +100,18 @@ function renderBuild(container, build) {
var divider = document.createElement('li');
container.appendChild(divider);
divider.setAttribute('data-role', 'list-divider');
+ divider.setAttribute('role', 'heading');
divider.appendChild(document.createTextNode(version));
+ if (build['timestamp']) {
+ var endTimestamp = new Date(build['timestamp'] * 1000);
+ var span = document.createElement('span');
+ divider.appendChild(span);
+ $(span).addClass("time");
+ span.appendChild(document.createTextNode(timeago(endTimestamp, now)));
+ }
var li = document.createElement('li');
+ li.setAttribute('data-theme', '');
container.appendChild(li);
var a = document.createElement('a');
li.appendChild(a);
@@ -110,39 +119,27 @@ function renderBuild(container, build) {
a.setAttribute('rel', 'external');
var state = build['state'];
+
+ buildDiffAppend(a, build['diff']);
if (state == 'running') {
var p = document.createElement('p');
a.appendChild(p);
- var text = "Build " + version + " running";
var status = build['build-status'];
if (status)
text += ": " + status['description'];
p.appendChild(document.createTextNode(text));
- p = document.createElement('p');
- p.appendChild(document.createTextNode(text));
} else {
- var p = document.createElement('p');
+ var p = document.createElement('span');
a.appendChild(p);
- p.appendChild(document.createTextNode("Build " + version + ": "));
var stateSpan = document.createElement('span');
p.appendChild(stateSpan);
- stateSpan.appendChild(document.createTextNode(build['state']));
if (state == 'success')
- $(stateSpan).addClass("repoweb-build-success");
+ li.setAttribute('data-icon', 'check');
else if (state == 'failed')
- $(stateSpan).addClass("repoweb-build-failed");
+ li.setAttribute('data-icon', 'alert');
}
- buildDiffAppend(a, build['diff']);
-
- if (build['timestamp']) {
- var endTimestamp = new Date(build['timestamp'] * 1000);
- var p = document.createElement('p');
- a.appendChild(p);
- $(p).addClass("ui-li-aside");
- p.appendChild(document.createTextNode(timeago(endTimestamp, now)));
- }
}
function updateResolve() {
@@ -169,6 +166,17 @@ function repoweb_index_init() {
var build = buildData[i];
renderBuild(buildSummary, build);
}
+ if (buildData.length > 0) {
+ var build = buildData[0];
+ $("#buildstatus").removeClass("buildstatus-happy");
+ $("#buildstatus").removeClass("buildstatus-sad");
+ if (build['state'] == 'failed')
+ $("#buildstatus").addClass("buildstatus-sad");
+ else
+ $("#buildstatus").addClass("buildstatus-happy");
+ } else {
+ $("#buildstatus").addClass("buildstatus-happy");
+ }
$(buildSummary).listview('refresh');
});
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]