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 2013/09/05 20:20:41 UTC

[16/50] git commit: [#6595] Show resubmit option if snapshot not found

[#6595] Show resubmit option if snapshot not found

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/839e624e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/839e624e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/839e624e

Branch: refs/heads/cj/6596
Commit: 839e624ea2610a0494865e0844b706e2f8754ab4
Parents: f967955
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Wed Aug 28 17:24:58 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Aug 28 19:40:32 2013 +0000

----------------------------------------------------------------------
 Allura/allura/templates/repo/tarball.html | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/839e624e/Allura/allura/templates/repo/tarball.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/tarball.html b/Allura/allura/templates/repo/tarball.html
index 805293c..f929433 100644
--- a/Allura/allura/templates/repo/tarball.html
+++ b/Allura/allura/templates/repo/tarball.html
@@ -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;
-        // Check tarball status every 5 seconds
         function check_status() {
             $.get('{{commit.url()}}tarball_status?path={{path}}', function(data) {
                 if (data.status !== 'na') {
@@ -65,8 +64,12 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
                         window.location.href = '{{c.app.repo.tarball_url(revision, path)}}';
                     {% endif %}
                 } else {
-                    if (delay < 600000){
-                        delay = delay * 2
+                    if (delay < 60000){
+                        delay = delay * 2;
+                    }
+                    if (delay >= 16000) {
+                      // we've been waiting at least 15 seconds
+                      $('#snapshot_status form').show();
                     }
                     window.setTimeout(check_status, delay);
                 }
@@ -84,6 +87,11 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
     <h2 class="busy">Generating snapshot...</h2>
     <h2 class="ready">Your download will begin shortly, or use this <a href="{{c.app.repo.tarball_url(revision, path)}}">direct link</a>.</h2>
     <h2 class="na">Checking snapshot status...</h2>
+    <form action="tarball" method="post">
+      <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" />
+    </form>
 </div>
 {% endblock %}
 
@@ -96,5 +104,12 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
     #snapshot_status .{{ status }} {
         display: block;
     }
+    #snapshot_status form {
+      display: none;
+      margin-left: 20px;
+    }
+    #snapshot_status form p {
+      padding-left: 0;
+    }
 </style>
 {% endblock %}