Permalink
Browse files

Merge pull request #354 from mineo/build-state-not-finished

Don't claim the outcome of an unfinished build is 'failed'
  • Loading branch information...
ericholscher committed Mar 18, 2013
2 parents b3056b6 + c2fa36a commit 7b2de2bb6a29330ad71bf3582a15c7d16ff92ab4
Showing with 18 additions and 7 deletions.
  1. +7 −2 media/javascript/build_updater.js
  2. +11 −5 readthedocs/templates/builds/build_detail.html
@@ -30,12 +30,17 @@
var el = $(this.buildDiv + ' span#build-' + prop);
if (prop == 'success') {
- val = val ? "Passed" : "Failed";
+ if (data.hasOwnProperty('state') && data['state'] != 'finished') {
+ val = "Not yet finished";
+ }
+ else {
+ val = val ? "Passed" : "Failed";
+ }
}
if (prop == 'state') {
val = val.charAt(0).toUpperCase() + val.slice(1);
-
+
if (val == 'Finished') {
_this.stopPolling();
}
@@ -17,18 +17,24 @@
<div id="build-{{ build.id }}">
<p>{% blocktrans with build.date|date:"N j, Y. P" as build_date %}Built: {{ build_date }}{% endblocktrans %}</p>
- <p>{% trans "Outcome:" %} <b><span id="build-success">{% if build.success %}{% trans "Passed" %}{% else %}{% trans "Failed" %}{% endif %}</span></b></p>
+ <p>{% trans "State:" %} <b><span id="build-state">{{ build.get_state_display }}</span></b>
+ <img src="{{ MEDIA_URL }}images/loader.gif" class="hide build-loading">
+ </p>
+
+ <p>{% trans "Outcome:" %}
+ <b>
+ <span id="build-success">
+ {% if build.state != 'finished' %}{% trans "Not yet finished" %} {% else %} {% if build.success %}{% trans "Passed" %}{% else %}{% trans "Failed" %}{% endif %}{% endif %}
+ </span>
+ </b>
+ </p>
{% if build.version %}
<p>{% trans "Version:" %} <b>{{ build.version.slug }}</b></p>
{% endif %}
<p>{% trans "Type:" %} <b>{{ build.type }}</b></p>
- <p>{% trans "State:" %} <b><span id="build-state">{{ build.get_state_display }}</span></b>
- <img src="{{ MEDIA_URL }}images/loader.gif" class="hide build-loading">
- </p>
-
<h3>{% trans "Sphinx Standard Output" %}</h3>
<pre class="build-output"><span id="build-output">{{ build.output }}</span></pre>

0 comments on commit 7b2de2b

Please sign in to comment.