incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [04/29] git commit: [#6595] Show resubmit option if snapshot not found
Date Thu, 12 Sep 2013 20:51:54 GMT
[#6595] Show resubmit option if snapshot not found

Signed-off-by: Tim Van Steenburgh <tvansteenburgh@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/tv/6457
Commit: 839e624ea2610a0494865e0844b706e2f8754ab4
Parents: f967955
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Wed Aug 28 17:24:58 2013 +0000
Committer: Dave Brondsema <dbrondsema@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 %}


Mime
View raw message