[gnome-continuous] b.g.o: Add link to push log from home, and loading status



commit 9d2e17ec0518d12e83b076ab72de992b1b90f211
Author: Colin Walters <walters verbum org>
Date:   Sun Dec 29 13:06:54 2013 -0500

    b.g.o: Add link to push log from home, and loading status

 extras/build.gnome.org/controllers.js              |   15 ++++++++++++---
 .../partials/gnome-continuous-log.html             |    3 ++-
 .../build.gnome.org/partials/gnome-continuous.html |    2 ++
 3 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/extras/build.gnome.org/controllers.js b/extras/build.gnome.org/controllers.js
index b0e0526..b3efe36 100644
--- a/extras/build.gnome.org/controllers.js
+++ b/extras/build.gnome.org/controllers.js
@@ -102,6 +102,10 @@
             $scope.runningState = text;
         });
 
+       var now = new Date();
+       $scope.pushLogHref = "#/gnome-continuous/log/" + now.getUTCFullYear() + "/" +
+           (now.getUTCMonth()+1) + "/" + now.getUTCDate();
+
         var completedTasks = [];
         taskNames.forEach(function(taskName) {
            var href = ROOT + 'results/tasks/' + taskName + '/' + taskName;
@@ -173,10 +177,15 @@
                var version = relpathToVersion('builds/' + year + '/' + month + '/' + day + '/' + 
children[i]);
                snapshots[i] = {'version': version,
                                'href': baseHref,
-                               'bdiff': null};
+                               'bdiff': null,
+                               'loading': true};
+               var bindData = {'snapshots': snapshots, 'i': i};
                $http.get(baseHref + '/bdiff.json').success(function(data) {
-                   this.snapshots[this.i]['bdiff'] = data;
-               }.bind({'snapshots': snapshots, 'i': i}));
+                   this.snapshots[this.i].bdiff = data;
+                   this.snapshots[this.i].loading = false;
+               }.bind(bindData)).error(function() {
+                   this.snapshots[this.i].loading = false;
+               }.bind(bindData));
            }
        });
     });
diff --git a/extras/build.gnome.org/partials/gnome-continuous-log.html 
b/extras/build.gnome.org/partials/gnome-continuous-log.html
index 9daecd0..5806afc 100644
--- a/extras/build.gnome.org/partials/gnome-continuous-log.html
+++ b/extras/build.gnome.org/partials/gnome-continuous-log.html
@@ -16,7 +16,8 @@
        </span>
       </div>
     </span>
-    <span ng-if="snapshot.bdiff == null">(No bdiff generated)</span>
+    <span ng-if="snapshot.loading">Loading...</span>
+    <span ng-if="snapshot.bdiff == null && !snapshot.loading">(No bdiff generated)</span>
     <br>
   </div>
 </article>
diff --git a/extras/build.gnome.org/partials/gnome-continuous.html 
b/extras/build.gnome.org/partials/gnome-continuous.html
index 11fcc88..d1439b2 100644
--- a/extras/build.gnome.org/partials/gnome-continuous.html
+++ b/extras/build.gnome.org/partials/gnome-continuous.html
@@ -4,6 +4,8 @@
     for more information. </p>
   <p>
     State: <span>{{ runningState }}</span>
+    <br>
+    <a href="{{ pushLogHref }}">Today's resolve log</a>
   </p>
   
   <div>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]