[ARVADOS] created: 1e2393533f678d4f50e3e98ba03a15e802f397bb

git at public.curoverse.com git at public.curoverse.com
Mon Jun 16 10:17:09 EDT 2014


        at  1e2393533f678d4f50e3e98ba03a15e802f397bb (commit)


commit 1e2393533f678d4f50e3e98ba03a15e802f397bb
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Jun 16 09:56:38 2014 -0400

    some refactoring and added detection of task success or failure

diff --git a/apps/workbench/app/assets/javascripts/log_viewer.js b/apps/workbench/app/assets/javascripts/log_viewer.js
index e152c6f..d6c611b 100644
--- a/apps/workbench/app/assets/javascripts/log_viewer.js
+++ b/apps/workbench/app/assets/javascripts/log_viewer.js
@@ -1,4 +1,4 @@
-function addToLogViewer(logViewer, lines) {
+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+)? (.*)/;
     for (var a in lines) {
         var v = lines[a].match(re);
@@ -15,20 +15,22 @@ function addToLogViewer(logViewer, lines) {
             var type = "";
             if (v11 != ' ') {
                 if (/^stderr /.test(message)) {
-                    if (/^stderr crunchstat: /.test(message)) {
+                    message = message.substr(7);
+                    if (/^crunchstat: /.test(message)) {
                         type = "crunchstat";
-                        message = message.substr(19);
-                    } else if (/^stderr srun: /.test(message)) {
+                        message = message.substr(12);
+                    } else if (/^srun: /.test(message) || /^slurmd/.test(message)) {
                         type = "task-dispatch";
-                        message = message.substr(7);
-                    } else if (/^stderr slurmd/.test(message)) {
-                        type = "task-dispatch";
-                        message = message.substr(7);
                     } else {
                         type = "task-output";
-                        message = message.substr(7);
                     }
                 } else {
+                    if (/^success in (\d+)/) {
+                        taskState[v11] = "success";
+                    }
+                    if (/^failure \([^)]+\) (\d+)/) {
+                        taskState[v11] = "failure";
+                    }
                     type = "task-dispatch";
                 }
             } else {
diff --git a/apps/workbench/app/views/jobs/_show_log.html.erb b/apps/workbench/app/views/jobs/_show_log.html.erb
index 717eb71..cead801 100644
--- a/apps/workbench/app/views/jobs/_show_log.html.erb
+++ b/apps/workbench/app/views/jobs/_show_log.html.erb
@@ -68,6 +68,17 @@ $("#sort-by-task").on("change", function() {
     <div class="radio-inline">
       <label><input id="sort-by-task" type="radio" name="sort-radio" > Sort by task</label>
     </div>
+
+<br>
+    <div class="radio-inline">
+      <label><input id="filter-tasks-all" type="radio" name="tasks-radio" checked> Show all tasks</label>
+    </div>
+    <div class="radio-inline">
+      <label><input id="filter-tasks-successes" type="radio" name="tasks-radio" > Show successes only</label>
+    </div>
+    <div class="radio-inline">
+      <label><input id="filter-tasks-failures" type="radio" name="tasks-radio" > Show failures only</label>
+    </div>
 <br>
   <div class="checkbox-inline">
     <label><input id="show-crunch" type="checkbox" checked="true" class="toggle-filter"> Show crunch output</label>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list