+++ /dev/null
-#!/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
});
$(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);
-
-
-
$(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">×</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',
display:inline-block;
}
+li.notification {
+ padding: 10px;
+
.arvados-nav-container {
top: 70px;
height: calc(100% - 70px);
-/* 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 ); }
}
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 }
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
<% 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>
<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>
<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>
<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 %>
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');
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>
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>
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.||
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>
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|
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
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'
# 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
ServerName doc.arvados.org
- DocumentRoot /usr/src/arvados/doc/_site/
+ DocumentRoot /usr/src/arvados/doc/.site/
</VirtualHost>
# 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@@'
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
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");
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;
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
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)
end
end
if self.is.nil?
- raise CommitNotFoundError: "Specified commit was not found"
+ raise CommitNotFoundError.new "Specified commit was not found"
end
end
end