[ARVADOS] updated: 5a4863dc935ecccebebc9b166c3c9915121b14d1

git at public.curoverse.com git at public.curoverse.com
Thu Jun 19 08:56:37 EDT 2014


Summary of changes:
 apps/workbench/app/assets/javascripts/log_viewer.js | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

       via  5a4863dc935ecccebebc9b166c3c9915121b14d1 (commit)
      from  9c72375f74e8a251e9f09c8a16dbed9174417292 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 5a4863dc935ecccebebc9b166c3c9915121b14d1
Author: peter <peter at swyman.shell.4xphq.arvadosapi.com>
Date:   Thu Jun 19 12:56:34 2014 +0000

    2883: Fixed variable being used before it was declared, and fixed assignment of
    ids to rows.

diff --git a/apps/workbench/app/assets/javascripts/log_viewer.js b/apps/workbench/app/assets/javascripts/log_viewer.js
index aa6ba79..493975f 100644
--- a/apps/workbench/app/assets/javascripts/log_viewer.js
+++ b/apps/workbench/app/assets/javascripts/log_viewer.js
@@ -10,6 +10,7 @@ function addToLogViewer(logViewer, lines, taskState) {
     var re = /((\d\d\d\d)-(\d\d)-(\d\d))_((\d\d):(\d\d):(\d\d)) ([a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{15}) (\d+) (\d+)? (.*)/;
 
     var items = [];
+    var count = logViewer.items.length;
     for (var a in lines) {
         var v = lines[a].match(re);
         if (v != null) {
@@ -82,7 +83,7 @@ function addToLogViewer(logViewer, lines, taskState) {
             }
 
             items.push({
-                id: logViewer.items.length,
+                id: count,
                 ts: ts,
                 timestamp: ts.toLocaleDateString() + " " + ts.toLocaleTimeString(),
                 taskid: v11,
@@ -91,6 +92,7 @@ function addToLogViewer(logViewer, lines, taskState) {
                 message: message,
                 type: type
             });
+            count += 1;
         } else {
             console.log("Did not parse: " + lines[a]);
         }
@@ -182,9 +184,6 @@ function generateJobOverview(id, logViewer, taskState) {
     var html = "";
 
     if (logViewer.items.length > 2) {
-        html += "<p>";
-        html += "Started at " + first.values().timestamp;
-
         var first = logViewer.items[1];
         var last = logViewer.items[logViewer.items.length-1];
         var duration = (last.values().ts.getTime() - first.values().ts.getTime()) / 1000;
@@ -205,7 +204,9 @@ function generateJobOverview(id, logViewer, taskState) {
 
         var tcount = taskState.task_count;
 
-        html += ".  Ran " + dumbPluralize(tcount, " task") + " over ";
+        html += "<p>";
+        html += "Started at " + first.values().timestamp + ".  ";
+        html += "Ran " + dumbPluralize(tcount, " task") + " over ";
         if (hours > 0) {
             html += dumbPluralize(hours, " hour");
         }

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list