[ARVADOS] updated: 4ff61dd25a70e6467bbafeaaf794cc381f684384

git at public.curoverse.com git at public.curoverse.com
Wed Oct 1 17:02:32 EDT 2014


Summary of changes:
 .../app/controllers/collections_controller.rb      |  3 +-
 apps/workbench/app/views/jobs/_show_log.html.erb   | 38 +++++++++++-----------
 apps/workbench/test/integration/jobs_test.rb       |  8 ++---
 services/api/test/fixtures/collections.yml         |  4 +--
 services/api/test/fixtures/jobs.yml                |  2 +-
 5 files changed, 27 insertions(+), 28 deletions(-)

       via  4ff61dd25a70e6467bbafeaaf794cc381f684384 (commit)
      from  196b4b55725db26af4000162329421c73ca893af (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 4ff61dd25a70e6467bbafeaaf794cc381f684384
Author: Tim Pierce <twp at curoverse.com>
Date:   Wed Oct 1 16:52:17 2014 -0400

    3782: code review feedback
    
    * Fixed whitespace, JavaScript style in _show_log.html.erb
    * Removed unused bytecount variable from file_enumerator
    * Changed the new job and collection fixtures to have the job uuid match
      the uuid listed in the log.

diff --git a/apps/workbench/app/controllers/collections_controller.rb b/apps/workbench/app/controllers/collections_controller.rb
index 3606ef0..3c24875 100644
--- a/apps/workbench/app/controllers/collections_controller.rb
+++ b/apps/workbench/app/controllers/collections_controller.rb
@@ -326,8 +326,7 @@ class CollectionsController < ApplicationController
       bytesleft = @opts[:maxbytes].andand.to_i || 2**16
       IO.popen([env, 'arv-get', "#{@opts[:uuid]}/#{@opts[:file]}"],
                'rb') do |io|
-        bytecount = 0
-        while bytesleft > 0 && buf = io.read(bytesleft)
+        while bytesleft > 0 && (buf = io.read(bytesleft)) != nil
           # shrink the bytesleft count, if we were given a
           # maximum byte count to read
           if @opts.include? :maxbytes
diff --git a/apps/workbench/app/views/jobs/_show_log.html.erb b/apps/workbench/app/views/jobs/_show_log.html.erb
index 01d2167..7324104 100644
--- a/apps/workbench/app/views/jobs/_show_log.html.erb
+++ b/apps/workbench/app/views/jobs/_show_log.html.erb
@@ -57,34 +57,34 @@ var makeFilter = function() {
     log_maxbytes = <%= Rails.configuration.log_viewer_max_bytes %>;
     logcollection_url = '<%=j url_for logcollection %>/<%=j logcollection.files[0][1] %>';
     $("#log-viewer-download-url").attr('href', logcollection_url);
-    $("#log-viewer-download-pane").css('display', 'inline');
+    $("#log-viewer-download-pane").show();
     if (log_size > log_maxbytes) {
       range_header = { 'Range': 'bytes=0-' + log_maxbytes };
     } else {
       range_header = null;
     }
     $.ajax(logcollection_url, { headers: range_header }).
-	done(function(data, status, jqxhr) {
-	    logViewer.filter();
-	    addToLogViewer(logViewer, data.split("\n"), taskState);
-	    logViewer.filter(makeFilter());
+        done(function(data, status, jqxhr) {
+            logViewer.filter();
+            addToLogViewer(logViewer, data.split("\n"), taskState);
+            logViewer.filter(makeFilter());
             content_range_hdr = jqxhr.getResponseHeader('Content-Range');
-	    var v = content_range_hdr && content_range_hdr.match(/bytes \d+-(\d+)\/(.+)/);
+            var v = content_range_hdr && content_range_hdr.match(/bytes \d+-(\d+)\/(.+)/);
             short_log = v && (v[2] == '*' || parseInt(v[1]) + 1 < v[2]);
-	    if (jqxhr.status == 206 && short_log) {
-	      $("#log-viewer-overview").html(
-		'<p>Showing only ' + data.length + ' bytes of this log.' +
-		' Timing information is unavailable since' +
-		' the full log was not retrieved.</p>'
-	      );
+            if (jqxhr.status == 206 && short_log) {
+              $("#log-viewer-overview").html(
+                '<p>Showing only ' + data.length + ' bytes of this log.' +
+                ' Timing information is unavailable since' +
+                ' the full log was not retrieved.</p>'
+              );
             } else {
-	      generateJobOverview("#log-viewer-overview", logViewer, taskState);
-	    }
-	    $("#log-viewer .spinner").detach();
-	}).
-	fail(function(jqxhr, status, error) {
-	    $("#log-viewer .spinner").detach();
-	});
+              generateJobOverview("#log-viewer-overview", logViewer, taskState);
+            }
+            $("#log-viewer .spinner").detach();
+        }).
+        fail(function(jqxhr, status, error) {
+            $("#log-viewer .spinner").detach();
+        });
   <% end %>
 <% else %>
   <%# Live log loading not implemented yet. %>
diff --git a/apps/workbench/test/integration/jobs_test.rb b/apps/workbench/test/integration/jobs_test.rb
index 8ecff4d..f84ab77 100644
--- a/apps/workbench/test/integration/jobs_test.rb
+++ b/apps/workbench/test/integration/jobs_test.rb
@@ -13,10 +13,10 @@ class JobsTest < ActionDispatch::IntegrationTest
     #
     ENV['KEEP_LOCAL_STORE'] ||= Dir.mktmpdir
     keepdir = ENV['KEEP_LOCAL_STORE']
-    open(File.join(keepdir, 'b9f7e25b33844d816d8531686f8bf360'), 'w') do |f|
-      f.write("2014-01-01_12:00:01 zzzzz-8i9sb-abcdefghijklmno 0  log message 1\n")
-      f.write("2014-01-01_12:00:02 zzzzz-8i9sb-abcdefghijklmno 0  log message 2\n")
-      f.write("2014-01-01_12:00:03 zzzzz-8i9sb-abcdefghijklmno 0  log message 3\n")
+    open(File.join(keepdir, 'cdd549ae79fe6640fa3d5c6261d8303c'), 'w') do |f|
+      f.write("2014-01-01_12:00:01 zzzzz-8i9sb-0vsrcqi7whchuil 0  log message 1\n")
+      f.write("2014-01-01_12:00:02 zzzzz-8i9sb-0vsrcqi7whchuil 0  log message 2\n")
+      f.write("2014-01-01_12:00:03 zzzzz-8i9sb-0vsrcqi7whchuil 0  log message 3\n")
     end
 
     @log_viewer_max_bytes = Rails.configuration.log_viewer_max_bytes
diff --git a/services/api/test/fixtures/collections.yml b/services/api/test/fixtures/collections.yml
index d7b2d16..860bb98 100644
--- a/services/api/test/fixtures/collections.yml
+++ b/services/api/test/fixtures/collections.yml
@@ -222,8 +222,8 @@ real_log_collection:
   uuid: zzzzz-4zz18-op4e2lbej01tcvu
   owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
   created_at: 2014-09-01 12:00:00
-  portable_data_hash: 3399cbb0953a7823618f3e288a85ee26+81
-  manifest_text: ". b9f7e25b33844d816d8531686f8bf360+195 0:195:zzzzz-8i9sb-abcdefghijklmno.log.txt\n"
+  portable_data_hash: 0b9a7787660e1fce4a93f33e01376ba6+81
+  manifest_text: ". cdd549ae79fe6640fa3d5c6261d8303c+195 0:195:zzzzz-8i9sb-0vsrcqi7whchuil.log.txt\n"
   name: real_log_collection
 
 collection_in_home_project_with_same_name_as_in_aproject:
diff --git a/services/api/test/fixtures/jobs.yml b/services/api/test/fixtures/jobs.yml
index fa1fc95..5df4fbf 100644
--- a/services/api/test/fixtures/jobs.yml
+++ b/services/api/test/fixtures/jobs.yml
@@ -229,6 +229,6 @@ job_with_real_log:
   uuid: zzzzz-8i9sb-0vsrcqi7whchuil
   created_at: 2014-09-01 12:00:00
   owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
-  log: 3399cbb0953a7823618f3e288a85ee26+81
+  log: 0b9a7787660e1fce4a93f33e01376ba6+81
   script_version: 7def43a4d3f20789dda4700f703b5514cc3ed250
   state: Complete

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list