Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't claim the outcome of an unfinished build is 'failed'

This moves the 'build-state' span before the 'build-success' one to make
it more obvious that the build is still running. It also changes the
text of the 'build-success' span to 'Not yet finished' if the build
state is not 'finished'.
  • Loading branch information...
commit c2fa36a0485132d356e1b694450031aafed74b8a 1 parent b304eb9
@mineo mineo authored
View
9 media/javascript/build_updater.js
@@ -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();
}
View
16 readthedocs/templates/builds/build_detail.html
@@ -17,7 +17,17 @@
<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>
@@ -25,10 +35,6 @@
<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>
Please sign in to comment.
Something went wrong with that request. Please try again.