Merge branch '2061-update-docs'
authorPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 12 Feb 2014 19:36:04 +0000 (14:36 -0500)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 12 Feb 2014 19:36:04 +0000 (14:36 -0500)
20 files changed:
apps/admin/list-inactive-users.rb [deleted file]
apps/workbench/app/assets/javascripts/application.js
apps/workbench/app/assets/javascripts/users.js
apps/workbench/app/assets/stylesheets/application.css.scss
apps/workbench/app/assets/stylesheets/loading.css
apps/workbench/app/controllers/application_controller.rb
apps/workbench/app/views/application/_show_metadata.html.erb
apps/workbench/app/views/groups/_show_recent.html.erb
apps/workbench/app/views/layouts/application.html.erb
apps/workbench/app/views/users/_tables.html.erb
apps/workbench/app/views/users/home.js.erb
doc/user/examples/crunch-examples.html.textile.liquid
docker/Makefile
docker/api/production.rb.in
docker/doc/Dockerfile
docker/doc/apache2_vhost
docker/workbench/production.rb.in
sdk/perl/lib/Arvados/ResourceMethod.pm
services/api/app/controllers/static_controller.rb
services/api/app/models/commit_ancestor.rb

diff --git a/apps/admin/list-inactive-users.rb b/apps/admin/list-inactive-users.rb
deleted file mode 100755 (executable)
index 25311b7..0000000
+++ /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
index 4c83198f541e85de3b93ad75da130227ccfb35b1..bb988d7753d98fe6979b06327dc914ff4906f42b 100644 (file)
@@ -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);
-
-
-
index c9c69a0a64529860adf022b6925713b1a454f5bb..ee1c7dda37af86e7eb1719791a29052920b6673d 100644 (file)
@@ -1,8 +1,15 @@
 $(document).
+    on('notifications:recount',
+       function() {
+           var menu = $('.notification-menu');
+           n = $('.notification', menu).not('.empty').length;
+           $('.notification-count', menu).html(n>0 ? n : '');
+       }).
     on('ajax:success', 'form.new_authorized_key',
        function(e, data, status, xhr) {
-           $(e.target).parents('div.daxalert').fadeOut('slow', function() {
-               $('<div class="alert alert-success daxalert"><button type="button" class="close" data-dismiss="alert">&times;</button><p>Key added.</p></div>').hide().replaceAll(this).fadeIn('slow');
+           $(e.target).parents('.notification').eq(0).fadeOut('slow', function() {
+               $('<li class="alert alert-success daxalert">SSH key added.</li>').hide().replaceAll(this).fadeIn('slow');
+               $(document).trigger('notifications:recount');
            });
        }).
     on('ajax:complete', 'form.new_authorized_key',
index 580be64bc4e0881ebae3845cbfeac99b75262603..55263c78a8ecb7136a39471ed7c41d2d70cac0d2 100644 (file)
@@ -126,6 +126,9 @@ ul.arvados-nav li ul li {
     display:inline-block;
 }
 
+li.notification {
+    padding: 10px;
+
 .arvados-nav-container {
     top: 70px; 
     height: calc(100% - 70px); 
index c76f104b4068aca91aa538fa170c8c4ff1a00cfb..7a0736ad1f3ba015060691672aa0d7d822832b3c 100644 (file)
-/* 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;
-}
-
-
-@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);
-    }
+@keyframes rotateThis {
+  from { transform: rotate( 0deg );   }
+  to   { transform: rotate( 360deg ); }
 }
 
-@keyframes fade{
-    0%{
-       background: #ABF8FF;
-    }
-    
-    50%{
-       background: #90BBBF;
-    }
-    
-    100%{
-       background: #ABF8FF;
-    }
+@-webkit-keyframes rotateThis {
+  from { -webkit-transform: rotate( 0deg );   }
+  to   { -webkit-transform: rotate( 360deg ); }
 }
 
-@-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);
-    }
+@-moz-keyframes rotateThis {
+  from { -moz-transform: rotate( 0deg );   }
+  to   { -moz-transform: rotate( 360deg ); }
 }
 
-@-webkit-keyframes fade{
-    0%{
-       background: #ABF8FF;
-    }
-    
-    50%{
-       background: #389CA6;
-    }
-    
-    100%{
-       background: #ABF8FF;
-    }
+@-ms-keyframes rotateThis {
+  from { -ms-transform: rotate( 0deg );   }
+  to   { -ms-transform: rotate( 360deg ); }
 }
index cc452b93cbf6b3c4dfceac5bc533b6a2523038cf..02ebc8b3a198090c83fe98e5c3f99f18c0993c9d 100644 (file)
@@ -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 }
@@ -109,7 +109,12 @@ class ApplicationController < ActionController::Base
   def create
     @object ||= model_class.new params[model_class.to_s.singularize.to_sym]
     @object.save!
-    redirect_to(params[:return_to] || @object)
+    respond_to do |f|
+      f.html {
+        redirect_to(params[:return_to] || @object)
+      }
+      f.js { render }
+    end
   end
 
   def destroy
index 3972da0c342f6fcb3a209eb760c80652b050e50c..f36240bd1059f7bda33e277bdb8e1b68d823d686 100644 (file)
@@ -30,7 +30,7 @@ No metadata.
 <% end %>
 
 <h3>Metadata that refers to this object</h3>
-<% if outgoing.items_available > 0 %>
+<% if incoming.items_available > 0 %>
 <table class="table topalign">
   <thead>
     <tr>
index 117ddb65da08d07e507151a31f2fbb86b3b3b645..c372b885926664d6e0cbcd4af31e39d683fb6edb 100644 (file)
@@ -20,7 +20,7 @@
 
     <tr>
       <td>
-        <%= g.friendly_link_name %>
+        <%= link_to_if_arvados_object g, friendly_name: true %>
       </td><td>
         <%= link_to_if_arvados_object g.owner_uuid, friendly_name: true %>
       </td><td>
index 00178a8697496fead4e9a00dbfdc639b0c9156c5..220f1cf00d5b489fc3d8008da036ea373340f288 100644 (file)
   
       <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">
         </li>        
         -->
 
-        <li class="dropdown">
+        <li class="dropdown notification-menu">
           <a href="#" class="dropdown-toggle" data-toggle="dropdown">
             <span class="glyphicon glyphicon-envelope"></span>
-            <span class="badge badge-alert"><%= @notification_count %></span>
+            <span class="badge badge-alert notification-count"><%= @notification_count %></span>
             <span class="caret"></span>
           </a>
           <ul class="dropdown-menu" role="menu">
             <% if @notifications.length > 0 %>
               <% @notifications.each_with_index do |n, i| %>
                 <% if i > 0 %><li class="divider"></li><% end %>
-                <li style="padding: 10px"><%= n.call(self) %></li>
+                <li class="notification"><%= n.call(self) %></li>
               <% end %>
             <% else %>
-              <li style="padding: 10px">No notifications.</li>
+              <li class="notification empty">No notifications.</li>
             <% end %>
           </ul>
         </li>        
   <%= javascript_tag do %>
   <%= yield :footer_js %>
   <% end %>
+
 </body>
 </html>
index 8d5b84f6ebe40f624cd3d0abe12f461172654938..2920bcaac02f0243ded218d888974807747d4e9a 100644 (file)
@@ -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 %>
index 401c6b1b0be335c130e86b8b4d1772fec32b3b5d..b67a933b784ac435c79b6086b7bfd08ec6a84f55 100644 (file)
@@ -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');
index 65fd316c107d8f39cc5cf6191aedad7706c1f093..b657a68c9f042926e94f6f5e63889d51aadf3906 100644 (file)
@@ -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|
index 6248e0a5c64964348aecdab035341771dbd885f2..c6f3dd7d120decd8f83cd7dda8c67e86a3f5fbe0 100644 (file)
@@ -139,6 +139,6 @@ base-image: debian-image $(BASE_DEPS)
        echo -n "Built at $(date)" > base-image
 
 debian-image:
-       ./mkimage-debootstrap.sh arvados/debian wheezy http://debian.lcs.mit.edu/debian/
+       ./mkimage-debootstrap.sh arvados/debian wheezy ftp://ftp.us.debian.org/debian/
        echo -n "Built at $(date)" > debian-image
 
index 417b915d70f75e603821e9c19b6ea5c055e5f829..8d52babc5f19d45c11edda76d09014c2741ca7d2 100644 (file)
@@ -65,6 +65,10 @@ Server::Application.configure do
   config.crunch_job_wrapper = :slurm_immediate
   config.crunch_job_user = 'crunch' # if false, do not set uid when running jobs
 
+  # The web service must be able to create/write this file, and
+  # crunch-job must be able to stat() it.
+  config.crunch_refresh_trigger = '/tmp/crunch_refresh_trigger'
+
   # config.dnsmasq_conf_dir = '/etc/dnsmasq.d'
 
   # config.compute_node_ami = 'ami-cbca41a2'
index 5ae4bb273b34cbae22f63f3a1c005bb0fb05c6c0..39c87a88a1ca211b02966084144899538f2e29a2 100644 (file)
@@ -13,7 +13,7 @@ ADD generated/doc.tar.gz /usr/src/arvados/
 # Build static site
 RUN /bin/sed -ri 's/^baseurl: .*$/baseurl: /' /usr/src/arvados/doc/_config.yml && \
     cd /usr/src/arvados/doc && \
-    LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" jekyll build
+    LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" rake
 
 # Configure Apache
 ADD apache2_vhost /etc/apache2/sites-available/doc
index f3d4ff28ae7c0ce2d0517e3390fc34699409152a..bf9c18bb2090b67202b84218acb58ab771e88736 100644 (file)
@@ -6,7 +6,7 @@ ServerName doc.arvados.org
 
   ServerName doc.arvados.org
 
-  DocumentRoot /usr/src/arvados/doc/_site/
+  DocumentRoot /usr/src/arvados/doc/.site/
 
 </VirtualHost>
 
index 0e5005d21f292f25db942e5cadc349b9ca18dd23..bc3bd33dd6c43ba9d681c0a2abef0e5de8d89a38 100644 (file)
@@ -65,9 +65,11 @@ ArvadosWorkbench::Application.configure do
   # with SQLite, MySQL, and PostgreSQL)
   # config.active_record.auto_explain_threshold_in_seconds = 0.5
 
+  # Log timing data for API transactions
+  config.profiling_enabled = false
+
   config.arvados_login_base = 'https://' + ENV['API_PORT_443_TCP_ADDR'].to_s + '/login'
   config.arvados_v1_base = 'https://' + ENV['API_PORT_443_TCP_ADDR'].to_s + '/arvados/v1'
-
   config.arvados_insecure_https = @@WORKBENCH_INSECURE_HTTPS@@ # true = do not check server certificate
 
   config.data_import_dir = '@@WORKBENCH_DATA_IMPORT_DIR@@'
@@ -81,4 +83,9 @@ ArvadosWorkbench::Application.configure do
 
   config.site_name = '@@WORKBENCH_SITE_NAME@@'
   config.activation_contact_link = '@@WORKBENCH_ACTIVATION_CONTACT_LINK@@'
+  config.arvados_docsite = 'http://doc.arvados.org'
+
+  config.arvados_theme = 'default'
+
+  config.show_user_agreement_inline = false
 end
index fd577752b2c706324e1cd4c688ace24ff333938a..649d779c6755256ed4624315ab7e61897fd92b1b 100644 (file)
@@ -28,7 +28,16 @@ sub execute
     my %body_params;
     my %given_params = @_;
     my %extra_params = %given_params;
-    while (my ($param_name, $param) = each %{$method->{'parameters'}}) {
+    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'}) {
+                $method_params{$prop_name} = { 'type' => 'object' };
+            }
+        }
+    }
+    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");
@@ -67,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;
index ba69b8464f7407a4e1b1473a99c506b0a86c596d..fda088095e9f5e075f4fd52eaeea711e025280e7 100644 (file)
@@ -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
index c3c6d5376b8cbdbc41869ab3a4b5fb1a5b682c52..71ea57fb95ce15f1d3c9d95479a0c3ddf145b446 100644 (file)
@@ -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