You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2014/01/22 21:56:54 UTC
[02/26] git commit: [#7059] Improve tarball status UX
[#7059] Improve tarball status UX
* Don't say 'Generating' when we're not
* Fail quickly when we know snapshot isn't being built
Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/39fc30ca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/39fc30ca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/39fc30ca
Branch: refs/heads/db/7062
Commit: 39fc30ca89853a7b2280c14274bbd0328e8aa2d2
Parents: 2d45976
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Thu Jan 16 14:06:42 2014 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 16 14:06:42 2014 +0000
----------------------------------------------------------------------
Allura/allura/templates/repo/tarball.html | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/39fc30ca/Allura/allura/templates/repo/tarball.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/tarball.html b/Allura/allura/templates/repo/tarball.html
index 92b7af4..2338be1 100644
--- a/Allura/allura/templates/repo/tarball.html
+++ b/Allura/allura/templates/repo/tarball.html
@@ -53,8 +53,8 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
left: 10 // Left position relative to parent in px
};
var spinner = new Spinner(opts).spin($('#snapshot_status')[0]);
- var delay = 500, elapsed = 0;
- $('#snapshot_status h2.busy').show();
+ var delay = 500;
+ $('#snapshot_status h2.checking').show();
function check_status() {
$.get('{{commit.url()}}tarball_status?path={{path}}', function(data) {
if (data.status === 'complete') {
@@ -67,13 +67,14 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
} else {
if (data.status === 'ready' || data.status === 'busy') {
// keep waiting
- } else if (data.status === 'error' || elapsed > 5000) {
+ $('#snapshot_status h2').hide();
+ $('#snapshot_status h2.busy').show();
+ } else {
// something went wrong
spinner.stop();
$('#snapshot_status h2').hide();
$('#snapshot_status form').show();
}
- elapsed += delay;
if (delay < 60000){
delay = delay * 2;
}
@@ -90,6 +91,7 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
{% block content %}
{% set path = request.params.get('path', '') %}
<div id='snapshot_status'>
+ <h2 class="checking">Checking snapshot status...</h2>
<h2 class="busy">Generating snapshot...</h2>
<h2 class="complete">Your download will begin shortly, or use this <a href="{{c.app.repo.tarball_url(revision, path)}}">direct link</a>.</h2>
<form action="tarball" method="post">