[gnome-ostree] repoweb: Add smoketest status display



commit 934565d130d36124ee67136af54be0f4b78c100f
Author: Colin Walters <walters verbum org>
Date:   Wed Feb 27 18:43:12 2013 -0500

    repoweb: Add smoketest status display

 qa/repoweb/index.html |    3 +++
 qa/repoweb/repoweb.js |   27 +++++++++++++++++++++++++--
 2 files changed, 28 insertions(+), 2 deletions(-)
---
diff --git a/qa/repoweb/index.html b/qa/repoweb/index.html
index 5e9722e..0a28870 100644
--- a/qa/repoweb/index.html
+++ b/qa/repoweb/index.html
@@ -52,6 +52,9 @@
           <p>Current build: 
          <span id="build-meta"></span>
           </p>
+          <p>Current smoketest: 
+         <span id="smoketest-meta"></span>
+          </p>
         </div>
       </div>
       <div class="footer">
diff --git a/qa/repoweb/repoweb.js b/qa/repoweb/repoweb.js
index 711713d..959e9ee 100644
--- a/qa/repoweb/repoweb.js
+++ b/qa/repoweb/repoweb.js
@@ -27,13 +27,19 @@ function get_page_arg(key) {
 
 var repoDataSignal = {};
 var currentBuildMeta = null;
+var currentSmoketestMeta = null;
 
 function repowebInit() {
     var url;
     url = "work/tasks/build/current/meta.json";
     $.getJSON(url, function(data) {
         currentBuildMeta = data;
-        $(repoDataSignal).trigger("current-buildmeta-loaded");
+        $(repoDataSignal).trigger("current-build-meta-loaded");
+    });
+    url = "work/tasks/smoketest/current/meta.json";
+    $.getJSON(url, function(data) {
+        currentSmoketestMeta = data;
+        $(repoDataSignal).trigger("current-smoketest-meta-loaded");
     });
 }
 
@@ -118,7 +124,7 @@ function renderBuild(container, build) {
 
 function repowebIndexInit() {
     repowebInit();
-    $(repoDataSignal).on("current-buildmeta-loaded", function () {
+    $(repoDataSignal).on("current-build-meta-loaded", function () {
        var buildMetaNode = $("#build-meta").get(0);
 
         $(buildMetaNode).empty();
@@ -143,4 +149,21 @@ function repowebIndexInit() {
             $("#build-icon").addClass("buildstatus-sad");
         }
     });
+    $(repoDataSignal).on("current-smoketest-meta-loaded", function () {
+       var node = $("#smoketest-meta").get(0);
+
+        $(node).empty();
+        var ref = 'work/tasks/smoketest/';
+        if (currentSmoketestMeta.success)
+            ref += '/successful';
+        else
+            ref += '/failed';
+        ref += '/' + currentSmoketestMeta.taskVersion;
+        var a = document.createElement('a');
+        a.setAttribute('href', ref);
+        a.setAttribute('rel', 'external');
+        a.appendChild(document.createTextNode(currentSmoketestMeta.taskVersion));
+        node.appendChild(a);
+        node.appendChild(document.createTextNode(': ' + (currentSmoketestMeta.success ? "success" : "failed 
")));
+    });
 }


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