You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2014/01/16 18:18:30 UTC
[1/2] git commit: [#7059] Improve tarball status UX
Updated Branches:
refs/heads/master 2d4597624 -> 45d4fc0b3
[#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/master
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">
[2/2] git commit: [#7059] Removed unnecessary status check on tarball
download page
Posted by jo...@apache.org.
[#7059] Removed unnecessary status check on tarball download page
Signed-off-by: Cory Johns <cj...@slashdotmedia.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/45d4fc0b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/45d4fc0b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/45d4fc0b
Branch: refs/heads/master
Commit: 45d4fc0b346fb996121f9ed2d767358871bf81d7
Parents: 39fc30c
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Thu Jan 16 17:05:45 2014 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Thu Jan 16 17:05:45 2014 +0000
----------------------------------------------------------------------
Allura/allura/templates/repo/tarball.html | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/45d4fc0b/Allura/allura/templates/repo/tarball.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/tarball.html b/Allura/allura/templates/repo/tarball.html
index 2338be1..04dd5d2 100644
--- a/Allura/allura/templates/repo/tarball.html
+++ b/Allura/allura/templates/repo/tarball.html
@@ -35,7 +35,7 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
window.location.href = '{{c.app.repo.tarball_url(revision, path)}}';
});
{% endif %}
- {% else %}
+ {% elif status in ('ready', 'busy') %}
var opts = {
lines: 9, // The number of lines to draw
length: 4, // The length of each line
@@ -54,7 +54,6 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
};
var spinner = new Spinner(opts).spin($('#snapshot_status')[0]);
var delay = 500;
- $('#snapshot_status h2.checking').show();
function check_status() {
$.get('{{commit.url()}}tarball_status?path={{path}}', function(data) {
if (data.status === 'complete') {
@@ -91,10 +90,9 @@ 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="busy ready">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">
+ <form action="tarball" method="post" class="None">
<p>We're having trouble finding that snapshot. Would you like to resubmit?</p>
<input type="hidden" name="path" value="{{path}}" />
<input type="submit" value="Resubmit Snapshot Request" />