[ARVADOS] created: 2aa944a3116fc8f23d5de142d62982c314c20204

git at public.curoverse.com git at public.curoverse.com
Wed Feb 12 13:56:05 EST 2014


        at  2aa944a3116fc8f23d5de142d62982c314c20204 (commit)


commit 2aa944a3116fc8f23d5de142d62982c314c20204
Author: Tim Pierce <twp at curoverse.com>
Date:   Wed Feb 12 13:55:52 2014 -0500

    Renamed run.sh -> "arvctl", added options for "stop" and "restart" verbs

diff --git a/docker/run.sh b/docker/arvctl
similarity index 80%
rename from docker/run.sh
rename to docker/arvctl
index f9fef5f..bdd8864 100755
--- a/docker/run.sh
+++ b/docker/arvctl
@@ -4,9 +4,9 @@ ENABLE_SSH=false
 
 function usage {
     echo >&2
-    echo >&2 "usage: $0 (start|stop|test) [options]"
+    echo >&2 "usage: $0 (start|stop|restart|test) [options]"
     echo >&2
-    echo >&2 "$0 start options:"
+    echo >&2 "$0 start/stop/restart options:"
     echo >&2 "  -d [port], --doc[=port]        Start documentation server (default port 9898)"
     echo >&2 "  -w [port], --workbench[=port]  Start workbench server (default port 9899)"
     echo >&2 "  -s [port], --sso[=port]        Start SSO server (default port 9901)"
@@ -15,11 +15,7 @@ function usage {
     echo >&2 "  --ssh                          Enable SSH access to server containers"
     echo >&2 "  -h, --help                     Display this help and exit"
     echo >&2
-    echo >&2 "  If no switches are given, the default is to start all"
-    echo >&2 "  servers on the default ports."
-    echo >&2
-    echo >&2 "$0 stop"
-    echo >&2 "  Stop all servers."
+    echo >&2 "  If no options are given, the action is applied to all servers."
     echo >&2
     echo >&2 "$0 test [testname] [testname] ..."
     echo >&2 "  By default, all tests are run."
@@ -231,19 +227,69 @@ ARVADOS_API_HOST=$(ip_address "api_server")
 ARVADOS_API_HOST_INSECURE=yes
 ARVADOS_API_TOKEN=$(cat api/generated/superuser_token)
 EOF
-
-        echo "To run a test suite:"
-	echo "python -m unittest discover ../sdk/python"
     fi
 }
 
 function do_stop {
-    docker stop doc_server \
-	api_server \
-	sso_server \
-	workbench_server \
-	keep_server_0 \
-	keep_server_1 2>/dev/null
+    local stop_doc=""
+    local stop_sso=""
+    local stop_api=""
+    local stop_workbench=""
+    local stop_keep=""
+
+    # NOTE: This requires GNU getopt (part of the util-linux package on Debian-based distros).
+    local TEMP=`getopt -o d::s::a::w::kh \
+                  --long doc::,sso::,api::,workbench::,keep,help,ssh \
+                  -n "$0" -- "$@"`
+
+    if [ $? != 0 ] ; then echo "Use -h for help"; exit 1 ; fi
+
+    # Note the quotes around `$TEMP': they are essential!
+    eval set -- "$TEMP"
+
+    while [ $# -ge 1 ]
+    do
+        case $1 in
+	    -d | --doc)
+		stop_doc=doc_server ; shift 2 ;;
+	    -s | --sso)
+		stop_sso=sso_server ; shift 2 ;;
+	    -a | --api)
+		stop_api=api_server ; shift 2 ;;
+	    -w | --workbench)
+		stop_workbench=workbench_server ; shift 2 ;;
+	    -k | --keep )
+		stop_keep="keep_server_0 keep_server_1" ; shift ;;
+	    --ssh)
+		shift
+		;;
+	    --)
+		shift
+		break
+		;;
+	    *)
+		usage
+		exit 1
+		;;
+	esac
+    done
+
+    # If no options were selected, then start all servers.
+    if [[ $stop_doc == "" &&
+	  $stop_sso == "" &&
+	  $stop_api == "" &&
+	  $stop_workbench == "" &&
+	  $stop_keep == "" ]]
+    then
+	stop_doc=doc_server
+	stop_sso=sso_server
+	stop_api=api_server
+	stop_workbench=workbench_server
+	stop_keep="keep_server_0 keep_server_1"
+    fi
+
+    docker stop $stop_doc $stop_sso $stop_api $stop_workbench $stop_keep \
+	2>/dev/null
 }
 
 function do_test {
@@ -292,6 +338,11 @@ case $1 in
 	shift
 	do_stop $@
 	;;
+    restart)
+	shift
+	do_stop $@
+	do_start $@
+	;;
     test)
 	shift
 	do_test $@

commit 3df7911feeeea47d43ca9e6394274960910aeb5b
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Feb 12 09:30:17 2014 -0500

    Hack to fix job log links (because crunch still produces identifiers with +K at qr1hi)

diff --git a/apps/workbench/app/views/users/_tables.html.erb b/apps/workbench/app/views/users/_tables.html.erb
index 8d5b84f..2920bca 100644
--- a/apps/workbench/app/views/users/_tables.html.erb
+++ b/apps/workbench/app/views/users/_tables.html.erb
@@ -50,7 +50,8 @@
 <td>
   <small>
     <% if j.log %>
-      <% Collection.limit(1).where(uuid: j.log).each do |c| %>
+      <% fixup = /([a-f0-9]{32}\+\d+)(\+.*)/.match(j.log)%>
+      <% Collection.limit(1).where(uuid: fixup[1]).each do |c| %>
         <% c.files.each do |file| %>
           <a href="<%= collection_path(j.log) %>/<%= file[1] %>?disposition=inline&size=<%= file[2] %>">Log</a>
         <% end %>

commit 6f94fbfd5e8c8ed3c00a292ef791a9e96470c995
Author: Ward Vandewege <ward at curoverse.com>
Date:   Wed Feb 12 09:22:19 2014 -0500

    The list-inactive-users.rb script has been moved to the puppet tree for
    now.

diff --git a/apps/admin/list-inactive-users.rb b/apps/admin/list-inactive-users.rb
deleted file mode 100755
index 25311b7..0000000
--- a/apps/admin/list-inactive-users.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env ruby
-
-# usage: list-inactive-users.rb [n-days-old-to-ignore]
-#
-# (default = 7)
-
-abort 'Error: Ruby >= 1.9.3 required.' if RUBY_VERSION < '1.9.3'
-
-threshold = ARGV.shift.to_i rescue 7
-
-require 'arvados'
-arv = Arvados.new(api_version: 'v1')
-
-saidheader = false
-arv.user.list(where: {is_active: false})[:items].each do |user|
-  if Time.now - Time.parse(user[:created_at]) < threshold*86400
-    if !saidheader
-      saidheader = true
-      puts "Inactive users who first logged in <#{threshold} days ago:"
-      puts ""
-    end
-    puts "#{user[:modified_at]} #{user[:uuid]} #{user[:full_name]} <#{user[:email]}>"
-  end
-end

commit a94797a87764094f05c6d88b455d81f2e9fc4c39
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Feb 12 06:20:03 2014 -0800

    Fix git_dir path in CommitAncestor model. Fixes #2089

diff --git a/services/api/app/models/commit_ancestor.rb b/services/api/app/models/commit_ancestor.rb
index c3c6d53..71ea57f 100644
--- a/services/api/app/models/commit_ancestor.rb
+++ b/services/api/app/models/commit_ancestor.rb
@@ -19,7 +19,7 @@ class CommitAncestor < ActiveRecord::Base
       next if repo.match /^\./
       git_dir = repo.match(/\.git$/) ? repo : File.join(repo, '.git')
       repo_name = repo.sub(/\.git$/, '')
-      ENV['GIT_DIR'] = File.join(@gitdirbase, repo, '.git')
+      ENV['GIT_DIR'] = File.join(@gitdirbase, git_dir)
       IO.foreach("|git rev-list --format=oneline '#{self.descendant.gsub /[^0-9a-f]/,""}'") do |line|
         self.is = false
         sha1, message = line.strip.split(" ", 2)
@@ -34,7 +34,7 @@ class CommitAncestor < ActiveRecord::Base
       end
     end
     if self.is.nil?
-      raise CommitNotFoundError: "Specified commit was not found"
+      raise CommitNotFoundError.new "Specified commit was not found"
     end
   end
 end

commit a5c5e3ce90b114539c607dfae02e46c70bc0b634
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Feb 11 21:11:45 2014 -0800

    Fill in missing example locators for crunch wrappers.

diff --git a/doc/user/examples/crunch-examples.html.textile.liquid b/doc/user/examples/crunch-examples.html.textile.liquid
index 65fd316..b657a68 100644
--- a/doc/user/examples/crunch-examples.html.textile.liquid
+++ b/doc/user/examples/crunch-examples.html.textile.liquid
@@ -18,6 +18,7 @@ Run the bwa aligner on a set of paired-end fastq files, producing a BAM file for
 table(table table-bordered table-condensed).
 |_Parameter_|_Description_|_Example_|
 |bwa_tbz|Collection with the bwa source distribution.|@8b6e2c4916133e1d859c9e812861ce13+70@|
+|samtools_tgz|Collection with the samtools source distribution.|@c777e23cf13e5d5906abfdc08d84bfdb+74@|
 |input|Collection with fastq reads (pairs of *_1.fastq.gz and *_2.fastq.gz).|@d0136bc494c21f79fc1b6a390561e6cb+2778@|
 </div>
 
@@ -40,7 +41,7 @@ Using the FixMateInformation, SortSam, ReorderSam, AddOrReplaceReadGroups, and B
 table(table table-bordered table-condensed).
 |_Parameter_|_Description_|_Example_|
 |input|Collection containing aligned bam files.||
-|picard_zip|Collection with the picard binary distribution.||
+|picard_zip|Collection with the picard binary distribution.|@687f74675c6a0e925dec619cc2bec25f+77@|
 |reference|Collection with reference data (*.fasta.gz, *.fasta.fai.gz, *.dict.gz).|@c361dbf46ee3397b0958802b346e9b5a+925@|
 </div>
 
@@ -52,8 +53,8 @@ Run GATK's RealignerTargetCreator and IndelRealigner modules on a set of BAM fil
 table(table table-bordered table-condensed).
 |_Parameter_|_Description_|_Example_|
 |input|Collection containing aligned bam files.||
-|picard_zip|Collection with the picard binary distribution.||
-|gatk_tbz|Collection with the GATK2 binary distribution.||
+|picard_zip|Collection with the picard binary distribution.|@687f74675c6a0e925dec619cc2bec25f+77@|
+|gatk_tbz|Collection with the GATK2 binary distribution.|@7e0a277d6d2353678a11f56bab3b13f2+87@|
 |gatk_bundle|Collection with the GATK data bundle.|@d237a90bae3870b3b033aea1e99de4a9+10820@|
 |known_sites|List of files in the data bundle to use as GATK @-known@ arguments. Optional. |@["dbsnp_137.b37.vcf","Mills_and_1000G_gold_standard.indels.b37.vcf"]@ (this is the default value)|
 |regions|Collection with .bed files indicating sequencing target regions. Optional.||
@@ -68,7 +69,7 @@ Run GATK's BaseQualityScoreRecalibration module on a set of BAM files. "View sou
 table(table table-bordered table-condensed).
 |_Parameter_|_Description_|_Example_|
 |input|Collection containing bam files.||
-|gatk_tbz|Collection with the GATK2 binary distribution.||
+|gatk_tbz|Collection with the GATK2 binary distribution.|@7e0a277d6d2353678a11f56bab3b13f2+87@|
 |gatk_bundle|Collection with the GATK data bundle.|@d237a90bae3870b3b033aea1e99de4a9+10820@|
 </div>
 
@@ -80,8 +81,8 @@ Merge a set of BAM files using picard, and run GATK's UnifiedGenotyper module on
 table(table table-bordered table-condensed).
 |_Parameter_|_Description_|_Example_|
 |input|Collection containing bam files.||
-|picard_zip|Collection with the picard binary distribution.||
-|gatk_tbz|Collection with the GATK2 binary distribution.||
+|picard_zip|Collection with the picard binary distribution.|@687f74675c6a0e925dec619cc2bec25f+77@|
+|gatk_tbz|Collection with the GATK2 binary distribution.|@7e0a277d6d2353678a11f56bab3b13f2+87@|
 |gatk_bundle|Collection with the GATK data bundle.|@d237a90bae3870b3b033aea1e99de4a9+10820@|
 |regions|Collection with .bed files indicating sequencing target regions. Optional.||
 |region_padding|Corresponds to GATK @--interval_padding@ argument. Required if a regions parameter is given.|10|

commit a37f9dae5711f7f634e6ecf8099d7718f62e2288
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Feb 11 21:07:52 2014 -0800

    Allow passing hashes as resource attributes. This lets crunch-job keep
    jobs.tasks_summary up to date.

diff --git a/sdk/perl/lib/Arvados/ResourceMethod.pm b/sdk/perl/lib/Arvados/ResourceMethod.pm
index 0aaf994..649d779 100644
--- a/sdk/perl/lib/Arvados/ResourceMethod.pm
+++ b/sdk/perl/lib/Arvados/ResourceMethod.pm
@@ -76,6 +76,12 @@ sub execute
                     if (ref $property eq '' || $property eq undef) {
                         $param_value{$property_name} = $property;
                     }
+                    elsif (ref $property eq 'HASH') {
+                        $param_value{$property_name} = {};
+                        while (my ($k, $v) = each %$property) {
+                            $param_value{$property_name}->{$k} = $v;
+                        }
+                    }
                 }
             }
             $body_params{$param_name} = \%param_value;

commit 83619910548de06e73b70cad27cff5c9b799cb88
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Feb 11 17:07:39 2014 -0800

    Show first 200 items on index page, not 1000.

diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index 843cf0d..02ebc8b 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -57,7 +57,7 @@ class ApplicationController < ActionController::Base
   end
 
   def index
-    @objects ||= model_class.limit(1000).all
+    @objects ||= model_class.limit(200).all
     respond_to do |f|
       f.json { render json: @objects }
       f.html { render }

commit b9560845bb9fb77cfcc5666e00de069c2fd48c8b
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Feb 11 16:56:55 2014 -0800

    Apply usual parameter encoding logic to method[request] parameter too.
    
    Amends fbd62569bca926fc12917eb60eada82a6d8a83b0
    
    Fixes:
    
    encountered object 'Arvados::ResourceProxy=HASH(0x31fb2f8)', but neither allow_blessed nor convert_blessed settings are enabled at arvados/sdk/perl/lib/Arvados/Request.pm line 42.

diff --git a/sdk/perl/lib/Arvados/ResourceMethod.pm b/sdk/perl/lib/Arvados/ResourceMethod.pm
index cfcc34a..0aaf994 100644
--- a/sdk/perl/lib/Arvados/ResourceMethod.pm
+++ b/sdk/perl/lib/Arvados/ResourceMethod.pm
@@ -28,16 +28,16 @@ sub execute
     my %body_params;
     my %given_params = @_;
     my %extra_params = %given_params;
+    my %method_params = %{$method->{'parameters'}};
     if ($method->{'request'}->{'properties'}) {
-       while (my ($prop_name, $prop_value) =
-              each %{$method->{'request'}->{'properties'}}) {
-           if (ref($prop_value) eq 'HASH' && $prop_value->{'$ref'}) {
-               $body_params{$prop_name} = $given_params{$prop_name};
-               delete $extra_params{$prop_name};
-           }
-       }
+        while (my ($prop_name, $prop_value) =
+               each %{$method->{'request'}->{'properties'}}) {
+            if (ref($prop_value) eq 'HASH' && $prop_value->{'$ref'}) {
+                $method_params{$prop_name} = { 'type' => 'object' };
+            }
+        }
     }
-    while (my ($param_name, $param) = each %{$method->{'parameters'}}) {
+    while (my ($param_name, $param) = each %method_params) {
         delete $extra_params{$param_name};
         if ($param->{'required'} && !exists $given_params{$param_name}) {
             croak("Required parameter not supplied: $param_name");

commit 21f6cc3f07a957928cda5cb76b1c8b2bff2182e6
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Feb 11 15:58:57 2014 -0800

    Replace weird "loading" animation with a nice plain glyphicon.

diff --git a/apps/workbench/app/assets/javascripts/application.js b/apps/workbench/app/assets/javascripts/application.js
index 4c83198..bb988d7 100644
--- a/apps/workbench/app/assets/javascripts/application.js
+++ b/apps/workbench/app/assets/javascripts/application.js
@@ -43,12 +43,9 @@ jQuery(function($){
     });
     $(document).
         on('ajax:send', function(e, xhr) {
-            $('.loading').show();
+            $('.loading').fadeTo('fast', 1);
         }).
         on('ajax:complete', function(e, status) {
-            $('.loading').hide();
+            $('.loading').fadeOut('fast', 0);
         });
 })(jQuery);
-
-
-
diff --git a/apps/workbench/app/assets/stylesheets/loading.css b/apps/workbench/app/assets/stylesheets/loading.css
index c76f104..7a0736a 100644
--- a/apps/workbench/app/assets/stylesheets/loading.css
+++ b/apps/workbench/app/assets/stylesheets/loading.css
@@ -1,374 +1,46 @@
-/* http://codepen.io/alucard11/pen/IxLDJ */
-
 .loading {
-    background: #1b1b1b;
-}
-
-.loading .socket{
-    width: 200px;
-    height: 200px;
-    position: absolute;
-    left: 50%;
-    margin-left: -100px;
-    top: 50%;
-    margin-top: -100px;
-}
-
-.loading .hex-brick{
-    background: #ABF8FF;
-    width: 30px;
-    height: 17px;
-    position: absolute;
-    top: 5px;
-    animation-name: fade;
-    animation-duration: 2s;
-    animation-iteration-count: infinite;
-    -webkit-animation-name: fade;
-    -webkit-animation-duration: 2s;
-    -webkit-animation-iteration-count: infinite;
-}
-
-.loading .h2{
-    transform: rotate(60deg);
-    -webkit-transform: rotate(60deg);
-}
-
-.loading .h3{
-    transform: rotate(-60deg);
-    -webkit-transform: rotate(-60deg);
-}
-
-.loading .gel{
-    height: 30px;
-    width: 30px;	
-    transition: all .3s;
-    -webkit-transition: all .3s;
-    position: absolute;
-    top: 50%;
-    left: 50%;
-}
-
-.loading .center-gel{
-    margin-left: -15px;
-    margin-top: -15px;
-    
-    animation-name: pulse;
-    animation-duration: 2s;
-    animation-iteration-count: infinite;
-    -webkit-animation-name: pulse;
-    -webkit-animation-duration: 2s;
-    -webkit-animation-iteration-count: infinite;
-}
-
-.loading .c1{
-    margin-left: -47px;
-    margin-top: -15px;
-}
-
-.loading .c2{
-    margin-left: -31px;
-    margin-top: -43px;
-}
-
-.loading .c3{
-    margin-left: 1px;
-    margin-top: -43px;
-}
-
-.loading .c4{
-    margin-left: 17px;
-    margin-top: -15px;
-}
-.loading .c5{
-    margin-left: -31px;
-    margin-top: 13px;
-}
-
-.loading .c6{
-    margin-left: 1px;
-    margin-top: 13px;
-}
-
-.loading .c7{
-    margin-left: -63px;
-    margin-top: -43px;
-}
-
-.loading .c8{
-    margin-left: 33px;
-    margin-top: -43px;
-}
-
-.loading .c9{
-    margin-left: -15px;
-    margin-top: 41px;
-}
-
-.loading .c10{
-    margin-left: -63px;
-    margin-top: 13px;
-}
-
-.loading .c11{
-    margin-left: 33px;
-    margin-top: 13px;
-}
-
-.loading .c12{
-    margin-left: -15px;
-    margin-top: -71px;
-}
-
-.loading .c13{
-    margin-left: -47px;
-    margin-top: -71px;
-}
-
-.loading .c14{
-    margin-left: 17px;
-    margin-top: -71px;
-}
-
-.loading .c15{
-    margin-left: -47px;
-    margin-top: 41px;
-}
-
-.loading .c16{
-    margin-left: 17px;
-    margin-top: 41px;
-}
-
-.c17{
-    margin-left: -79px;
-    margin-top: -15px;
-}
-
-.loading .c18{
-    margin-left: 49px;
-    margin-top: -15px;
-}
-
-.loading .c19{
-    margin-left: -63px;
-    margin-top: -99px;
-}
-
-.loading .c20{
-    margin-left: 33px;
-    margin-top: -99px;
-}
-
-.loading .c21{
-    margin-left: 1px;
-    margin-top: -99px;
-}
-
-.loading .c22{
-    margin-left: -31px;
-    margin-top: -99px;
-}
-
-.loading .c23{
-    margin-left: -63px;
-    margin-top: 69px;
-}
-
-.loading .c24{
-    margin-left: 33px;
-    margin-top: 69px;
-}
-
-.loading .c25{
-    margin-left: 1px;
-    margin-top: 69px;
-}
-
-.loading .c26{
-    margin-left: -31px;
-    margin-top: 69px;
-}
-
-.loading .c27{
-    margin-left: -79px;
-    margin-top: -15px;
-}
-
-.loading .c28{
-    margin-left: -95px;
-    margin-top: -43px;
-}
-
-.loading .c29{
-    margin-left: -95px;
-    margin-top: 13px;
-}
-
-.loading .c30{
-    margin-left: 49px;
-    margin-top: 41px;
+    opacity: 0;
 }
 
-.loading .c31{
-    margin-left: -79px;
-    margin-top: -71px;
-}
-
-.loading .c32{
-    margin-left: -111px;
-    margin-top: -15px;
-}
-
-.loading .c33{
-    margin-left: 65px;
-    margin-top: -43px;
-}
-
-.loading .c34{
-    margin-left: 65px;
-    margin-top: 13px;
-}
-
-.loading .c35{
-    margin-left: -79px;
-    margin-top: 41px;
-}
-
-.loading .c36{
-    margin-left: 49px;
-    margin-top: -71px;
-}
-
-.loading .c37{
-    margin-left: 81px;
-    margin-top: -15px;
-}
-
-.loading .r1{
-    animation-name: pulse;
+.rotating {
+    animation-name: rotateThis;
     animation-duration: 2s;
     animation-iteration-count: infinite;
-    animation-delay: .2s;
-    -webkit-animation-name: pulse;
-    -webkit-animation-duration: 2s;
-    -webkit-animation-iteration-count: infinite;
-    -webkit-animation-delay: .2s;
-}
+    animation-timing-function: linear;
+    -moz-animation-name: rotateThis;
+    -moz-animation-duration: 2s;
+    -moz-animation-iteration-count: infinite;
+    -moz-animation-timing-function: linear;
+    -ms-animation-name: rotateThis;
+    -ms-animation-duration: 2s;
+    -ms-animation-iteration-count: infinite;
+    -ms-animation-timing-function: linear;
+    /* Chrome, at least in Linux, renders a horrible shaky mess -- better
+       not to bother.
 
-.loading .r2{
-    animation-name: pulse;
-    animation-duration: 2s;
-    animation-iteration-count: infinite;
-    animation-delay: .4s;
-    -webkit-animation-name: pulse;
-    -webkit-animation-duration: 2s;
-    -webkit-animation-iteration-count: infinite;
-    -webkit-animation-delay: .4s;
-}
-
-.loading .r3{
-    animation-name: pulse;
-    animation-duration: 2s;
-    animation-iteration-count: infinite;
-    animation-delay: .6s;
-    -webkit-animation-name: pulse;
-    -webkit-animation-duration: 2s;
-    -webkit-animation-iteration-count: infinite;
-    -webkit-animation-delay: .6s;
+      -webkit-animation-name: rotateThis;
+      -webkit-animation-duration: 2s;
+      -webkit-animation-iteration-count: infinite;
+      -webkit-animation-timing-function: linear;
+      */
 }
 
-.loading .r1 > .hex-brick{
-    animation-name: fade;
-    animation-duration: 2s;
-    animation-iteration-count: infinite;
-    animation-delay: .2s;
-    -webkit-animation-name: fade;
-    -webkit-animation-duration: 2s;
-    -webkit-animation-iteration-count: infinite;
-    -webkit-animation-delay: .2s;
-}
-
-.loading .r2 > .hex-brick{
-    animation-name: fade;
-    animation-duration: 2s;
-    animation-iteration-count: infinite;
-    animation-delay: .4s;
-    -webkit-animation-name: fade;
-    -webkit-animation-duration: 2s;
-    -webkit-animation-iteration-count: infinite;
-    -webkit-animation-delay: .4s;
-}
-
-.loading .r3 > .hex-brick{
-    animation-name: fade;
-    animation-duration: 2s;
-    animation-iteration-count: infinite;
-    animation-delay: .6s;
-    -webkit-animation-name: fade;
-    -webkit-animation-duration: 2s;
-    -webkit-animation-iteration-count: infinite;
-    -webkit-animation-delay: .6s;
-}
-
-
- at keyframes pulse{
-    0%{
-	-webkit-transform: scale(1);
-	transform: scale(1);
-    }
-    
-    50%{
-	-webkit-transform: scale(0.01);
-	transform: scale(0.01);
-    }
-    
-    100%{
-	-webkit-transform: scale(1);
-	transform: scale(1);
-    }
+ at keyframes rotateThis {
+  from { transform: rotate( 0deg );   }
+  to   { transform: rotate( 360deg ); }
 }
 
- at keyframes fade{
-    0%{
-	background: #ABF8FF;
-    }
-    
-    50%{
-	background: #90BBBF;
-    }
-    
-    100%{
-	background: #ABF8FF;
-    }
+ at -webkit-keyframes rotateThis {
+  from { -webkit-transform: rotate( 0deg );   }
+  to   { -webkit-transform: rotate( 360deg ); }
 }
 
- at -webkit-keyframes pulse{
-    0%{
-	-webkit-transform: scale(1);
-	transform: scale(1);
-    }
-    
-    50%{
-	-webkit-transform: scale(0.01);
-	transform: scale(0.01);
-    }
-    
-    100%{
-	-webkit-transform: scale(1);
-	transform: scale(1);
-    }
+ at -moz-keyframes rotateThis {
+  from { -moz-transform: rotate( 0deg );   }
+  to   { -moz-transform: rotate( 360deg ); }
 }
 
- at -webkit-keyframes fade{
-    0%{
-	background: #ABF8FF;
-    }
-    
-    50%{
-	background: #389CA6;
-    }
-    
-    100%{
-	background: #ABF8FF;
-    }
+ at -ms-keyframes rotateThis {
+  from { -ms-transform: rotate( 0deg );   }
+  to   { -ms-transform: rotate( 360deg ); }
 }
diff --git a/apps/workbench/app/views/layouts/application.html.erb b/apps/workbench/app/views/layouts/application.html.erb
index 30d454e..24991cd 100644
--- a/apps/workbench/app/views/layouts/application.html.erb
+++ b/apps/workbench/app/views/layouts/application.html.erb
@@ -114,13 +114,11 @@
   
       <ul class="nav navbar-nav navbar-right">
 
-        <% if current_user %>
         <li>
-          <div class="loading" style="transform: translate(-20px,20px) scale(0.1,0.1); -ms-transform: translate(-20px,20px) scale(0.1,0.1); -webkit-transform: translate(-20px,20px) scale(0.1,0.1); display: none">
-            <%= render partial: 'loading' %>
-          </div>
+          <a><i class="rotating loading glyphicon glyphicon-refresh"></i></a>
         </li>
 
+        <% if current_user %>
         <!-- XXX placeholder for this when search is implemented
         <li>
           <form class="navbar-form" role="search">
@@ -247,5 +245,6 @@
   <%= javascript_tag do %>
   <%= yield :footer_js %>
   <% end %>
+
 </body>
 </html>
diff --git a/apps/workbench/app/views/users/home.js.erb b/apps/workbench/app/views/users/home.js.erb
index 401c6b1..b67a933 100644
--- a/apps/workbench/app/views/users/home.js.erb
+++ b/apps/workbench/app/views/users/home.js.erb
@@ -1,4 +1,4 @@
 var new_content = "<%= escape_javascript(render partial: 'tables') %>";
 if ($('div#home-tables').html() != new_content)
    $('div#home-tables').html(new_content);
-$('.loading').hide();
+$(document).trigger('ajax:complete');

commit ca85734b886cea9ccd76a7933e836a73912f51a1
Author: Ward Vandewege <ward at curoverse.com>
Date:   Tue Feb 11 17:42:44 2014 -0500

    Handle the situation where config.workbench_address is unset more
    gracefully: do not try to redirect and blow up, instead send a
    json-encoded error message.

diff --git a/services/api/app/controllers/static_controller.rb b/services/api/app/controllers/static_controller.rb
index ba69b84..fda0880 100644
--- a/services/api/app/controllers/static_controller.rb
+++ b/services/api/app/controllers/static_controller.rb
@@ -6,7 +6,13 @@ class StaticController < ApplicationController
   skip_before_filter :require_auth_scope_all, :only => [ :home, :login_failure ]
 
   def home
-    redirect_to Rails.configuration.workbench_address
+    if Rails.configuration.respond_to? :workbench_address
+      redirect_to Rails.configuration.workbench_address
+    else
+      render json: {
+        error: ('This is the API server; you probably want to be at the workbench for this installation. Unfortunately, config.workbench_address is not set so I can not redirect you there automatically')
+      }
+    end
   end
 
 end

commit c0cb009f74981198ff697b77ea24400978e2ae4d
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Feb 11 14:28:32 2014 -0800

    Look in method[request][properties][$ref] for resource object
    argument.
    
    Fixes #2084

diff --git a/sdk/perl/lib/Arvados/ResourceMethod.pm b/sdk/perl/lib/Arvados/ResourceMethod.pm
index fd57775..cfcc34a 100644
--- a/sdk/perl/lib/Arvados/ResourceMethod.pm
+++ b/sdk/perl/lib/Arvados/ResourceMethod.pm
@@ -28,6 +28,15 @@ sub execute
     my %body_params;
     my %given_params = @_;
     my %extra_params = %given_params;
+    if ($method->{'request'}->{'properties'}) {
+       while (my ($prop_name, $prop_value) =
+              each %{$method->{'request'}->{'properties'}}) {
+           if (ref($prop_value) eq 'HASH' && $prop_value->{'$ref'}) {
+               $body_params{$prop_name} = $given_params{$prop_name};
+               delete $extra_params{$prop_name};
+           }
+       }
+    }
     while (my ($param_name, $param) = each %{$method->{'parameters'}}) {
         delete $extra_params{$param_name};
         if ($param->{'required'} && !exists $given_params{$param_name}) {

commit 5c0e4c6b87b263c5b08d1c1197876497e58863a5
Author: Tim Pierce <twp at curoverse.com>
Date:   Mon Feb 10 16:15:51 2014 -0500

    Added ArvadosModel.search_for_user to perform full-text search on a model.

diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb
index 5cbfd58..4e406de 100644
--- a/services/api/app/models/arvados_model.rb
+++ b/services/api/app/models/arvados_model.rb
@@ -45,13 +45,31 @@ class ArvadosModel < ActiveRecord::Base
     end.compact
   end
 
-  # is_searchable returns 'true' if a model is subject to full-text
-  # search through the workbench.  Models which are searchable should
-  # return true.
-  def is_searchable
+  # searchable? indicates whether a model is subject to full-text
+  # search through the workbench.  Models which include data that is
+  # interesting to a full-text search (e.g. Collection, Specimen, Trait)
+  # should override this to return 'true'.
+  def self.searchable?
     false
   end
 
+  # search all "searchable" columns of this table for query_str.
+  def self.search_for_user(user, query_str)
+    return [] unless self.searchable?
+    ilikes = []
+    ilike_params = []
+    self.searchable_columns.each do |column|
+      ilikes << "#{table_name}.#{column} ilike ?"
+      ilike_params << "%#{query_str}%"
+    end
+    if ilikes.empty?
+      return []
+    else
+      query_conditions = [ ilikes.join(' or ') ] + ilike_params
+      return self.readable_by(user).where(query_conditions)
+    end
+  end
+
   def eager_load_associations
     self.class.columns.each do |col|
       re = col.name.match /^(.*)_kind$/
diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb
index c6ecee3..76bc3a0 100644
--- a/services/api/app/models/collection.rb
+++ b/services/api/app/models/collection.rb
@@ -8,7 +8,7 @@ class Collection < ArvadosModel
     t.add :files
   end
 
-  def is_searchable
+  def self.searchable?
     true
   end
 
diff --git a/services/api/app/models/group.rb b/services/api/app/models/group.rb
index 7a1c9fb..e989218 100644
--- a/services/api/app/models/group.rb
+++ b/services/api/app/models/group.rb
@@ -8,7 +8,7 @@ class Group < ArvadosModel
     t.add :description
   end
 
-  def is_searchable
+  def self.searchable?
     true
   end
 end
diff --git a/services/api/app/models/human.rb b/services/api/app/models/human.rb
index a87a041..5e0abb5 100644
--- a/services/api/app/models/human.rb
+++ b/services/api/app/models/human.rb
@@ -8,7 +8,7 @@ class Human < ArvadosModel
     t.add :properties
   end
 
-  def is_searchable
+  def self.searchable?
     true
   end
 end
diff --git a/services/api/app/models/job.rb b/services/api/app/models/job.rb
index 7c06142..a483418 100644
--- a/services/api/app/models/job.rb
+++ b/services/api/app/models/job.rb
@@ -38,7 +38,7 @@ class Job < ArvadosModel
     t.add :log_buffer
   end
 
-  def is_searchable
+  def self.searchable?
     true
   end
 
diff --git a/services/api/app/models/job_task.rb b/services/api/app/models/job_task.rb
index 03310cc..611848d 100644
--- a/services/api/app/models/job_task.rb
+++ b/services/api/app/models/job_task.rb
@@ -17,7 +17,7 @@ class JobTask < ArvadosModel
     t.add :success
   end
 
-  def is_searchable
+  def self.searchable?
     true
   end
 
diff --git a/services/api/app/models/link.rb b/services/api/app/models/link.rb
index 3c701bf..0db41c7 100644
--- a/services/api/app/models/link.rb
+++ b/services/api/app/models/link.rb
@@ -29,7 +29,7 @@ class Link < ArvadosModel
     super
   end
 
-  def is_searchable
+  def self.searchable?
     true
   end
 
diff --git a/services/api/app/models/log.rb b/services/api/app/models/log.rb
index 3e52395..5b2e027 100644
--- a/services/api/app/models/log.rb
+++ b/services/api/app/models/log.rb
@@ -16,7 +16,7 @@ class Log < ArvadosModel
     t.add :info
   end
 
-  def is_searchable
+  def self.searchable?
     true
   end
 
diff --git a/services/api/app/models/pipeline_instance.rb b/services/api/app/models/pipeline_instance.rb
index 5df8756..a46085e 100644
--- a/services/api/app/models/pipeline_instance.rb
+++ b/services/api/app/models/pipeline_instance.rb
@@ -21,7 +21,7 @@ class PipelineInstance < ArvadosModel
     t.add :properties
   end
 
-  def is_searchable
+  def self.searchable?
     true
   end
 
diff --git a/services/api/app/models/specimen.rb b/services/api/app/models/specimen.rb
index 37de071..5b9e819 100644
--- a/services/api/app/models/specimen.rb
+++ b/services/api/app/models/specimen.rb
@@ -9,7 +9,7 @@ class Specimen < ArvadosModel
     t.add :properties
   end
 
-  def is_searchable
+  def self.searchable?
     true
   end
 
diff --git a/services/api/app/models/trait.rb b/services/api/app/models/trait.rb
index ff3db80..53c62a7 100644
--- a/services/api/app/models/trait.rb
+++ b/services/api/app/models/trait.rb
@@ -9,7 +9,7 @@ class Trait < ArvadosModel
     t.add :properties
   end
 
-  def is_searchable
+  def self.searchable?
     true
   end
 end

commit d8fc47b4db91246f56bd3b94e19f3f109c968aa3
Author: Tim Pierce <twp at curoverse.com>
Date:   Fri Feb 7 17:22:43 2014 -0500

    Adding 'is_searchable' status for tables which should be full-text searchable.

diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb
index 4f2aa72..5cbfd58 100644
--- a/services/api/app/models/arvados_model.rb
+++ b/services/api/app/models/arvados_model.rb
@@ -45,6 +45,13 @@ class ArvadosModel < ActiveRecord::Base
     end.compact
   end
 
+  # is_searchable returns 'true' if a model is subject to full-text
+  # search through the workbench.  Models which are searchable should
+  # return true.
+  def is_searchable
+    false
+  end
+
   def eager_load_associations
     self.class.columns.each do |col|
       re = col.name.match /^(.*)_kind$/
diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb
index 03e5e4e..c6ecee3 100644
--- a/services/api/app/models/collection.rb
+++ b/services/api/app/models/collection.rb
@@ -8,6 +8,10 @@ class Collection < ArvadosModel
     t.add :files
   end
 
+  def is_searchable
+    true
+  end
+
   def redundancy_status
     if redundancy_confirmed_as.nil?
       'unconfirmed'
diff --git a/services/api/app/models/group.rb b/services/api/app/models/group.rb
index 9666257..7a1c9fb 100644
--- a/services/api/app/models/group.rb
+++ b/services/api/app/models/group.rb
@@ -7,4 +7,8 @@ class Group < ArvadosModel
     t.add :name
     t.add :description
   end
+
+  def is_searchable
+    true
+  end
 end
diff --git a/services/api/app/models/human.rb b/services/api/app/models/human.rb
index 3717f81..a87a041 100644
--- a/services/api/app/models/human.rb
+++ b/services/api/app/models/human.rb
@@ -7,4 +7,8 @@ class Human < ArvadosModel
   api_accessible :user, extend: :common do |t|
     t.add :properties
   end
+
+  def is_searchable
+    true
+  end
 end
diff --git a/services/api/app/models/job.rb b/services/api/app/models/job.rb
index f32f001..7c06142 100644
--- a/services/api/app/models/job.rb
+++ b/services/api/app/models/job.rb
@@ -38,6 +38,10 @@ class Job < ArvadosModel
     t.add :log_buffer
   end
 
+  def is_searchable
+    true
+  end
+
   def assert_finished
     update_attributes(finished_at: finished_at || Time.now,
                       success: success.nil? ? false : success,
diff --git a/services/api/app/models/job_task.rb b/services/api/app/models/job_task.rb
index 7d568e9..03310cc 100644
--- a/services/api/app/models/job_task.rb
+++ b/services/api/app/models/job_task.rb
@@ -17,6 +17,10 @@ class JobTask < ArvadosModel
     t.add :success
   end
 
+  def is_searchable
+    true
+  end
+
   protected
 
   def delete_created_job_tasks_if_failed
diff --git a/services/api/app/models/link.rb b/services/api/app/models/link.rb
index 1d4e13d..3c701bf 100644
--- a/services/api/app/models/link.rb
+++ b/services/api/app/models/link.rb
@@ -29,6 +29,10 @@ class Link < ArvadosModel
     super
   end
 
+  def is_searchable
+    true
+  end
+
   protected
 
   def permission_to_attach_to_objects
diff --git a/services/api/app/models/log.rb b/services/api/app/models/log.rb
index 29efc9d..3e52395 100644
--- a/services/api/app/models/log.rb
+++ b/services/api/app/models/log.rb
@@ -16,6 +16,10 @@ class Log < ArvadosModel
     t.add :info
   end
 
+  def is_searchable
+    true
+  end
+
   protected
 
   def set_default_event_at
diff --git a/services/api/app/models/pipeline_instance.rb b/services/api/app/models/pipeline_instance.rb
index 43497da..5df8756 100644
--- a/services/api/app/models/pipeline_instance.rb
+++ b/services/api/app/models/pipeline_instance.rb
@@ -21,6 +21,10 @@ class PipelineInstance < ArvadosModel
     t.add :properties
   end
 
+  def is_searchable
+    true
+  end
+
   def dependencies
     dependency_search(self.components).keys
   end
diff --git a/services/api/app/models/specimen.rb b/services/api/app/models/specimen.rb
index bcfcd7a..37de071 100644
--- a/services/api/app/models/specimen.rb
+++ b/services/api/app/models/specimen.rb
@@ -9,6 +9,10 @@ class Specimen < ArvadosModel
     t.add :properties
   end
 
+  def is_searchable
+    true
+  end
+
   def properties
     @properties ||= Hash.new
     super
diff --git a/services/api/app/models/trait.rb b/services/api/app/models/trait.rb
index 85ab236..ff3db80 100644
--- a/services/api/app/models/trait.rb
+++ b/services/api/app/models/trait.rb
@@ -8,4 +8,8 @@ class Trait < ArvadosModel
     t.add :name
     t.add :properties
   end
+
+  def is_searchable
+    true
+  end
 end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list