From: Tom Clegg Date: Wed, 5 Jul 2017 15:39:13 +0000 (-0400) Subject: Merge branch '8784-dir-listings' X-Git-Tag: 1.1.0~155 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/0eb72b526bf8bbb011551ecf019f604e17a534f1?hp=e59c1d365d9b6e1eff9b5cb030a8b1a3aaf14353 Merge branch '8784-dir-listings' refs #8784 Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- diff --git a/.licenseignore b/.licenseignore index ee5e5fd54e..51980b16c2 100644 --- a/.licenseignore +++ b/.licenseignore @@ -1,12 +1,22 @@ +*agpl-3.0.html *agpl-3.0.txt +apache-2.0.txt apps/workbench/app/assets/javascripts/list.js +apps/workbench/public/webshell/* +AUTHORS +*/bootstrap.css +*/bootstrap.js +*bootstrap-theme.css build/package-test-dockerfiles/centos7/localrepo.repo build/package-test-dockerfiles/ubuntu1604/etc-apt-preferences.d-arvados +*by-sa-3.0.html *by-sa-3.0.txt *COPYING doc/fonts/* */docker_image docker/jobs/apt.arvados.org.list +*/en.bootstrap.yml +*font-awesome.css *.gif .gitignore */.gitignore @@ -17,15 +27,20 @@ docker/jobs/apt.arvados.org.list *.ico *.jpg *.json +*LICENSE*.html +.licenseignore *LICENSE*.txt *.lock *.log *.map +*.min.css +*.min.js *.png */proc_stat */README */robots.txt */runit-docker/* +*/sb-admin.css.scss */script/rails sdk/cwl/tests/input/blorp.txt sdk/cwl/tests/tool/blub.txt diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000000..3933d54c56 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,17 @@ +# Names should be added to this file with this pattern: +# +# For individuals: +# Name +# +# For organizations: +# Organization +# +# See python fnmatch module documentation for more information. + +Curoverse, Inc. <*@curoverse.com> +Adam Savitzky +Colin Nolan +David +Guillermo Carrasco +Joshua Randall +Thomas Mooney diff --git a/COPYING b/COPYING index 2cba2ad20a..61c31397a0 100644 --- a/COPYING +++ b/COPYING @@ -1,15 +1,19 @@ -Server-side components of Arvados contained in the apps/ and services/ -directories, including the API Server, Workbench, and Crunch, are licensed -under the GNU Affero General Public License version 3 (see agpl-3.0.txt). +Unless indicated otherwise in the header of the file, the files in this +repository are distributed under one of three different licenses: AGPL-3.0, +Apache-2.0 or CC-BY-SA-3.0. -The files and directories under the build/, lib/ and tools/ directories are -licensed under the GNU Affero General Public License version 3 (see -agpl-3.0.txt). +Individual files contain an SPDX tag that indicates the license for the file. +These are the three tags in use: -The Arvados client Software Development Kits contained in the sdk/ directory, -example scripts in the crunch_scripts/ directory, the files and directories -under backports/ and docker/, and code samples in the Aravados documentation -are licensed under the Apache License, Version 2.0 (see LICENSE-2.0.txt). + SPDX-License-Identifier: AGPL-3.0 + SPDX-License-Identifier: Apache-2.0 + SPDX-License-Identifier: CC-BY-SA-3.0 -The Arvados Documentation located in the doc/ directory is licensed under the -Creative Commons Attribution-Share Alike 3.0 United States (see by-sa-3.0.txt). +This enables machine processing of license information based on the SPDX +License Identifiers that are available here: http://spdx.org/licenses/ + +The full license text for each license is available in this directory: + + AGPL-3.0: agpl-3.0.txt + Apache-2.0: apache-2.0.txt + CC-BY-SA-3.0: cc-by-sa-3.0.txt diff --git a/Makefile b/Makefile index 45c95477e0..8159f5feee 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + export WORKSPACE?=$(shell pwd) help: @echo >&2 diff --git a/README.md b/README.md index 419ca15957..367c3e8f60 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +[//]: # Copyright (C) The Arvados Authors. All rights reserved. +[//]: # +[//]: # SPDX-License-Identifier: CC-BY-SA-3.0 + [Arvados](https://arvados.org) is a free software distributed computing platform for bioinformatics, data science, and high throughput analysis of massive data sets. Arvados supports a variety of cloud, cluster and HPC environments. diff --git a/LICENSE-2.0.txt b/apache-2.0.txt similarity index 100% rename from LICENSE-2.0.txt rename to apache-2.0.txt diff --git a/apps/workbench/Gemfile b/apps/workbench/Gemfile index eac4fdf601..8e9fcbfed9 100644 --- a/apps/workbench/Gemfile +++ b/apps/workbench/Gemfile @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + source 'https://rubygems.org' gem 'rails', '~> 4.1' diff --git a/apps/workbench/README.textile b/apps/workbench/README.textile index 7991978592..18380ac3fe 100644 --- a/apps/workbench/README.textile +++ b/apps/workbench/README.textile @@ -1,3 +1,7 @@ +###. Copyright (C) The Arvados Authors. All rights reserved. +.... +.... SPDX-License-Identifier: AGPL-3.0 + h1. Developing Workbench This document includes information to help developers who would like to contribute to Workbench. If you just want to install it, please refer to our "Workbench installation guide":http://doc.arvados.org/install/install-workbench-app.html. diff --git a/apps/workbench/Rakefile b/apps/workbench/Rakefile index 752f3d8788..037f9013ac 100644 --- a/apps/workbench/Rakefile +++ b/apps/workbench/Rakefile @@ -1,4 +1,8 @@ #!/usr/bin/env rake +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. diff --git a/apps/workbench/app/assets/javascripts/add_group.js b/apps/workbench/app/assets/javascripts/add_group.js index 16d9c2db62..23de53d408 100644 --- a/apps/workbench/app/assets/javascripts/add_group.js +++ b/apps/workbench/app/assets/javascripts/add_group.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + $(document).on('shown.bs.modal', '#add-group-modal', function(event) { // Disable the submit button on modal loading $submit = $('#add-group-submit'); diff --git a/apps/workbench/app/assets/javascripts/add_repository.js b/apps/workbench/app/assets/javascripts/add_repository.js index 9594f9c8fc..efcd19d32a 100644 --- a/apps/workbench/app/assets/javascripts/add_repository.js +++ b/apps/workbench/app/assets/javascripts/add_repository.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + $(document).on('shown.bs.modal', '#add-repository-modal', function(event) { $('input[type=text]', event.target).val(''); $('#add-repository-error', event.target).hide(); diff --git a/apps/workbench/app/assets/javascripts/ajax_error.js b/apps/workbench/app/assets/javascripts/ajax_error.js index 9012844b17..dd31cc6dbc 100644 --- a/apps/workbench/app/assets/javascripts/ajax_error.js +++ b/apps/workbench/app/assets/javascripts/ajax_error.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + $(document).on('ajax:error', function(e, xhr, status, error) { var errorMessage = '' + status + ': ' + error; // $btn is the element (button/link) that initiated the failed request. diff --git a/apps/workbench/app/assets/javascripts/angular_shim.js b/apps/workbench/app/assets/javascripts/angular_shim.js index 976d09b28e..5da67285b1 100644 --- a/apps/workbench/app/assets/javascripts/angular_shim.js +++ b/apps/workbench/app/assets/javascripts/angular_shim.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Compile any new HTML content that was loaded via jQuery.ajax(). // Currently this only works for tabs, and only because they emit an // arv:pane:loaded event after updating the DOM. diff --git a/apps/workbench/app/assets/javascripts/application.js b/apps/workbench/app/assets/javascripts/application.js index 65e856df3a..c55bda0378 100644 --- a/apps/workbench/app/assets/javascripts/application.js +++ b/apps/workbench/app/assets/javascripts/application.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 +// // This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // diff --git a/apps/workbench/app/assets/javascripts/arvados_client.js b/apps/workbench/app/assets/javascripts/arvados_client.js index 63f1de1538..478dc2901f 100644 --- a/apps/workbench/app/assets/javascripts/arvados_client.js +++ b/apps/workbench/app/assets/javascripts/arvados_client.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + angular. module('Arvados', []). service('ArvadosClient', ArvadosClient); diff --git a/apps/workbench/app/assets/javascripts/bootstrap.js.coffee b/apps/workbench/app/assets/javascripts/bootstrap.js.coffee index c9404a8e2f..441d77fb89 100644 --- a/apps/workbench/app/assets/javascripts/bootstrap.js.coffee +++ b/apps/workbench/app/assets/javascripts/bootstrap.js.coffee @@ -1,4 +1,8 @@ +### Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 ### + jQuery -> $("a[rel=popover]").popover() $(".tooltip").tooltip() - $("a[rel=tooltip]").tooltip() \ No newline at end of file + $("a[rel=tooltip]").tooltip() diff --git a/apps/workbench/app/assets/javascripts/collections.js b/apps/workbench/app/assets/javascripts/collections.js index 865f121e56..0752e053d8 100644 --- a/apps/workbench/app/assets/javascripts/collections.js +++ b/apps/workbench/app/assets/javascripts/collections.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + jQuery(function($){ $(document).on('click', '.toggle-persist button', function() { var toggle_group = $(this).parents('[data-remote-href]').first(); diff --git a/apps/workbench/app/assets/javascripts/dates.js b/apps/workbench/app/assets/javascripts/dates.js index 5e4b804a2d..ed5f28431c 100644 --- a/apps/workbench/app/assets/javascripts/dates.js +++ b/apps/workbench/app/assets/javascripts/dates.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + jQuery(function($){ $(document).on('ajax:complete arv:pane:loaded ready', function() { $('[data-utc-date]').each(function(i, elm) { diff --git a/apps/workbench/app/assets/javascripts/edit_collection.js b/apps/workbench/app/assets/javascripts/edit_collection.js index 5f0c3b415c..9220ac3c54 100644 --- a/apps/workbench/app/assets/javascripts/edit_collection.js +++ b/apps/workbench/app/assets/javascripts/edit_collection.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // On loading of a collection, enable the "lock" button and // disable all file modification controls (upload, rename, delete) $(document). diff --git a/apps/workbench/app/assets/javascripts/edit_collection_tags.js b/apps/workbench/app/assets/javascripts/edit_collection_tags.js new file mode 100644 index 0000000000..e1c15151b6 --- /dev/null +++ b/apps/workbench/app/assets/javascripts/edit_collection_tags.js @@ -0,0 +1,72 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + +jQuery(function($){ + $(document). + on('click', '.collection-tag-save, .collection-tag-cancel', function(event) { + $('.edit-collection-tags').removeClass('disabled'); + $('#edit-collection-tags').attr("title", "Edit tags"); + $('.collection-tag-add').addClass('hide'); + $('.collection-tag-remove').addClass('hide'); + $('.collection-tag-save').addClass('hide'); + $('.collection-tag-cancel').addClass('hide'); + $('.collection-tag-field').prop("contenteditable", false); + }). + on('click', '.edit-collection-tags', function(event) { + $('.edit-collection-tags').addClass('disabled'); + $('#edit-collection-tags').attr("title", ""); + $('.collection-tag-add').removeClass('hide'); + $('.collection-tag-remove').removeClass('hide'); + $('.collection-tag-save').removeClass('hide'); + $('.collection-tag-cancel').removeClass('hide'); + $('.collection-tag-field').prop("contenteditable", true); + $('div').remove('.collection-tags-status-label'); + }). + on('click', '.collection-tag-save', function(event) { + var tag_data = {}; + var has_tags = false; + + var $tags = $(".collection-tags-table"); + $tags.find('tr').each(function (i, el) { + var $tds = $(this).find('td'); + var $key = $tds.eq(1).text(); + if ($key && $key.trim().length > 0) { + has_tags = true; + tag_data[$key.trim()] = $tds.eq(2).text().trim(); + } + }); + + var to_send; + if (has_tags == false) { + to_send = {tag_data: "empty"} + } else { + to_send = {tag_data: tag_data} + } + + $.ajax($(location).attr('pathname')+'/save_tags', { + type: 'POST', + data: to_send + }).success(function(data, status, jqxhr) { + $('.collection-tags-status').append('

Saved successfully.

'); + }).fail(function(jqxhr, status, error) { + $('.collection-tags-status').append('

We are sorry. There was an error saving tags. Please try again.

'); + }); + }). + on('click', '.collection-tag-cancel', function(event) { + $.ajax($(location).attr('pathname')+'/tags', { + type: 'GET' + }); + }). + on('click', '.collection-tag-remove', function(event) { + $(this).parents('tr').detach(); + }). + on('click', '.collection-tag-add', function(event) { + var $collection_tags = $(this).closest('.collection-tags-container'); + var $clone = $collection_tags.find('tr.hide').clone(true).removeClass('hide'); + $collection_tags.find('table').append($clone); + }). + on('keypress', '.collection-tag-field', function(event){ + return event.which != 13; + }); +}); diff --git a/apps/workbench/app/assets/javascripts/editable.js b/apps/workbench/app/assets/javascripts/editable.js index dc54bda7af..939506c2ec 100644 --- a/apps/workbench/app/assets/javascripts/editable.js +++ b/apps/workbench/app/assets/javascripts/editable.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + $.fn.editable.defaults.ajaxOptions = {type: 'post', dataType: 'json'}; $.fn.editable.defaults.send = 'always'; diff --git a/apps/workbench/app/assets/javascripts/event_log.js b/apps/workbench/app/assets/javascripts/event_log.js index 36361a17d1..e576ba97a3 100644 --- a/apps/workbench/app/assets/javascripts/event_log.js +++ b/apps/workbench/app/assets/javascripts/event_log.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + /* * This js establishes a websockets connection with the API Server. */ diff --git a/apps/workbench/app/assets/javascripts/filterable.js b/apps/workbench/app/assets/javascripts/filterable.js index e3639d0f2b..938ad80b77 100644 --- a/apps/workbench/app/assets/javascripts/filterable.js +++ b/apps/workbench/app/assets/javascripts/filterable.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // filterable.js shows/hides content when the user operates // search/select widgets. For "infinite scroll" content, it passes the // filters to the server and retrieves new content. For other content, diff --git a/apps/workbench/app/assets/javascripts/infinite_scroll.js b/apps/workbench/app/assets/javascripts/infinite_scroll.js index b89ac817cb..3e63858594 100644 --- a/apps/workbench/app/assets/javascripts/infinite_scroll.js +++ b/apps/workbench/app/assets/javascripts/infinite_scroll.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // infinite_scroll.js displays a tab's content using automatic scrolling // when the user scrolls to the bottom of the page and there is more data. // diff --git a/apps/workbench/app/assets/javascripts/job_log_graph.js b/apps/workbench/app/assets/javascripts/job_log_graph.js index a2d3b04314..f47f4f1110 100644 --- a/apps/workbench/app/assets/javascripts/job_log_graph.js +++ b/apps/workbench/app/assets/javascripts/job_log_graph.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + /* Assumes existence of: window.jobGraphData = []; window.jobGraphSeries = []; diff --git a/apps/workbench/app/assets/javascripts/keep_disks.js.coffee b/apps/workbench/app/assets/javascripts/keep_disks.js.coffee index e4aa4b4321..d33312d21c 100644 --- a/apps/workbench/app/assets/javascripts/keep_disks.js.coffee +++ b/apps/workbench/app/assets/javascripts/keep_disks.js.coffee @@ -1,3 +1,7 @@ +### Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 ### + cache_age_in_days = (milliseconds_age) -> ONE_DAY = 1000 * 60 * 60 * 24 milliseconds_age / ONE_DAY diff --git a/apps/workbench/app/assets/javascripts/link_to_remote.js b/apps/workbench/app/assets/javascripts/link_to_remote.js index f4f4f3e1f4..8610ac6d5d 100644 --- a/apps/workbench/app/assets/javascripts/link_to_remote.js +++ b/apps/workbench/app/assets/javascripts/link_to_remote.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + $.rails.href = function(element) { if (element.is('a')) { // data-remote=true links must put their remote targets in diff --git a/apps/workbench/app/assets/javascripts/log_viewer.js b/apps/workbench/app/assets/javascripts/log_viewer.js index 0e12f9cfd4..b201ed7f10 100644 --- a/apps/workbench/app/assets/javascripts/log_viewer.js +++ b/apps/workbench/app/assets/javascripts/log_viewer.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + function newTaskState() { return {"complete_count": 0, "failure_count": 0, diff --git a/apps/workbench/app/assets/javascripts/modal_pager.js b/apps/workbench/app/assets/javascripts/modal_pager.js index 58cf7e49b9..ffa45ee172 100644 --- a/apps/workbench/app/assets/javascripts/modal_pager.js +++ b/apps/workbench/app/assets/javascripts/modal_pager.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Usage: // // 1. Add some buttons to your modal, one with class="pager-next" and diff --git a/apps/workbench/app/assets/javascripts/permission_toggle.js b/apps/workbench/app/assets/javascripts/permission_toggle.js index 00c1718bd8..007a25baf1 100644 --- a/apps/workbench/app/assets/javascripts/permission_toggle.js +++ b/apps/workbench/app/assets/javascripts/permission_toggle.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + $(document). on('click', '[data-toggle-permission] input[type=checkbox]', function() { var data = {}; diff --git a/apps/workbench/app/assets/javascripts/pipeline_instances.js b/apps/workbench/app/assets/javascripts/pipeline_instances.js index ec43747a08..7570b2f8a5 100644 --- a/apps/workbench/app/assets/javascripts/pipeline_instances.js +++ b/apps/workbench/app/assets/javascripts/pipeline_instances.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + function run_pipeline_button_state() { var a = $('a.editable.required.editable-empty,input.form-control.required[value=""]'); if ((a.length > 0) || ($('.unreadable-inputs-present').length)) { diff --git a/apps/workbench/app/assets/javascripts/report_issue.js b/apps/workbench/app/assets/javascripts/report_issue.js index 539489d5fb..0285693e88 100644 --- a/apps/workbench/app/assets/javascripts/report_issue.js +++ b/apps/workbench/app/assets/javascripts/report_issue.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + $(document). on('click', "#report-issue-submit", function(e){ $(this).html('Sending'); diff --git a/apps/workbench/app/assets/javascripts/request_shell_access.js b/apps/workbench/app/assets/javascripts/request_shell_access.js index 792ab31312..eb4fbc3901 100644 --- a/apps/workbench/app/assets/javascripts/request_shell_access.js +++ b/apps/workbench/app/assets/javascripts/request_shell_access.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + $(document).on('ready ajax:success storage', function() { // Update the "shell access requested" info box according to the // current state of localStorage. diff --git a/apps/workbench/app/assets/javascripts/select_modal.js b/apps/workbench/app/assets/javascripts/select_modal.js index d31cb45dba..19cf3cd927 100644 --- a/apps/workbench/app/assets/javascripts/select_modal.js +++ b/apps/workbench/app/assets/javascripts/select_modal.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + $(document).on('click', '.selectable', function() { var any; var $this = $(this); diff --git a/apps/workbench/app/assets/javascripts/selection.js.erb b/apps/workbench/app/assets/javascripts/selection.js.erb index a8e2738fe0..e8f21eefd5 100644 --- a/apps/workbench/app/assets/javascripts/selection.js.erb +++ b/apps/workbench/app/assets/javascripts/selection.js.erb @@ -1,3 +1,7 @@ +<%# Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 %> + //= require jquery //= require jquery_ujs diff --git a/apps/workbench/app/assets/javascripts/sizing.js b/apps/workbench/app/assets/javascripts/sizing.js index 2341628fa7..569956fd3a 100644 --- a/apps/workbench/app/assets/javascripts/sizing.js +++ b/apps/workbench/app/assets/javascripts/sizing.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + function graph_zoom(divId, svgId, scale) { var pg = document.getElementById(divId); vcenter = (pg.scrollTop + (pg.scrollHeight - pg.scrollTopMax)/2.0) / pg.scrollHeight; diff --git a/apps/workbench/app/assets/javascripts/tab_panes.js b/apps/workbench/app/assets/javascripts/tab_panes.js index ddc5576d43..b19a277ef7 100644 --- a/apps/workbench/app/assets/javascripts/tab_panes.js +++ b/apps/workbench/app/assets/javascripts/tab_panes.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Load tab panes on demand. See app/views/application/_content.html.erb // Fire when a tab is selected/clicked. diff --git a/apps/workbench/app/assets/javascripts/upload_to_collection.js b/apps/workbench/app/assets/javascripts/upload_to_collection.js index 55f562d936..d66be63853 100644 --- a/apps/workbench/app/assets/javascripts/upload_to_collection.js +++ b/apps/workbench/app/assets/javascripts/upload_to_collection.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + var app = angular.module('Workbench', ['Arvados']); app.controller('UploadToCollection', UploadToCollection); app.directive('arvUuid', arvUuid); diff --git a/apps/workbench/app/assets/javascripts/user_agreements.js b/apps/workbench/app/assets/javascripts/user_agreements.js index 1b9ce4b684..7ce534239b 100644 --- a/apps/workbench/app/assets/javascripts/user_agreements.js +++ b/apps/workbench/app/assets/javascripts/user_agreements.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + function enable_okbutton() { var $div = $('#open_user_agreement'); var allchecked = $('input[name="checked[]"]', $div).not(':checked').length == 0; diff --git a/apps/workbench/app/assets/javascripts/users.js b/apps/workbench/app/assets/javascripts/users.js index 481f46f721..565ea9cbd6 100644 --- a/apps/workbench/app/assets/javascripts/users.js +++ b/apps/workbench/app/assets/javascripts/users.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + $(document). on('notifications:recount', function() { diff --git a/apps/workbench/app/assets/javascripts/work_unit_component.js b/apps/workbench/app/assets/javascripts/work_unit_component.js index e63aecde70..a84a2e71b8 100644 --- a/apps/workbench/app/assets/javascripts/work_unit_component.js +++ b/apps/workbench/app/assets/javascripts/work_unit_component.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + $(document). on('click', '.component-detail-panel', function(event) { var href = $($(event.target).attr('href')); diff --git a/apps/workbench/app/assets/javascripts/work_unit_log.js b/apps/workbench/app/assets/javascripts/work_unit_log.js index d81637e091..543690b200 100644 --- a/apps/workbench/app/assets/javascripts/work_unit_log.js +++ b/apps/workbench/app/assets/javascripts/work_unit_log.js @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + $(document).on('arv-log-event', '.arv-log-event-handler-append-logs', function(event, eventData){ var wasatbottom, txt; if (this != event.target) { diff --git a/apps/workbench/app/assets/stylesheets/api_client_authorizations.css.scss b/apps/workbench/app/assets/stylesheets/api_client_authorizations.css.scss index fd2c9d86b0..ec87eb255f 100644 --- a/apps/workbench/app/assets/stylesheets/api_client_authorizations.css.scss +++ b/apps/workbench/app/assets/stylesheets/api_client_authorizations.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the ApiClientAuthorizations controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/application.css.scss b/apps/workbench/app/assets/stylesheets/application.css.scss index a09de69c1f..31f06e9e58 100644 --- a/apps/workbench/app/assets/stylesheets/application.css.scss +++ b/apps/workbench/app/assets/stylesheets/application.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + /* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. diff --git a/apps/workbench/app/assets/stylesheets/authorized_keys.css.scss b/apps/workbench/app/assets/stylesheets/authorized_keys.css.scss index 390576b164..73cfd5bf8a 100644 --- a/apps/workbench/app/assets/stylesheets/authorized_keys.css.scss +++ b/apps/workbench/app/assets/stylesheets/authorized_keys.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the AuthorizedKeys controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/badges.css.scss b/apps/workbench/app/assets/stylesheets/badges.css.scss index 82c4ab0e02..ddaf5b9ea5 100644 --- a/apps/workbench/app/assets/stylesheets/badges.css.scss +++ b/apps/workbench/app/assets/stylesheets/badges.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + /* Colors * Contextual variations of badges * Bootstrap 3.0 removed contexts for badges, we re-introduce them, based on what is done for labels diff --git a/apps/workbench/app/assets/stylesheets/cards.css.scss b/apps/workbench/app/assets/stylesheets/cards.css.scss index c9560adf86..3cf29c56fb 100644 --- a/apps/workbench/app/assets/stylesheets/cards.css.scss +++ b/apps/workbench/app/assets/stylesheets/cards.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + .card { padding-top: 20px; margin: 10px 0 20px 0; diff --git a/apps/workbench/app/assets/stylesheets/collections.css.scss b/apps/workbench/app/assets/stylesheets/collections.css.scss index 2d2d0f25d1..c5cc699b33 100644 --- a/apps/workbench/app/assets/stylesheets/collections.css.scss +++ b/apps/workbench/app/assets/stylesheets/collections.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + /* Style for _show_files tree view. */ ul#collection_files { @@ -70,3 +74,7 @@ $active-bg: #39b3d7; padding: .5em 2em; margin: 0 1em; } + +.collection-tag-field * { + display: inline-block; +} diff --git a/apps/workbench/app/assets/stylesheets/groups.css.scss b/apps/workbench/app/assets/stylesheets/groups.css.scss index 679563657b..905e72add9 100644 --- a/apps/workbench/app/assets/stylesheets/groups.css.scss +++ b/apps/workbench/app/assets/stylesheets/groups.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the Groups controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/humans.css.scss b/apps/workbench/app/assets/stylesheets/humans.css.scss index f8afcdfeeb..29668c2737 100644 --- a/apps/workbench/app/assets/stylesheets/humans.css.scss +++ b/apps/workbench/app/assets/stylesheets/humans.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the Humans controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/job_tasks.css.scss b/apps/workbench/app/assets/stylesheets/job_tasks.css.scss index ab340e918b..0d4d2607bb 100644 --- a/apps/workbench/app/assets/stylesheets/job_tasks.css.scss +++ b/apps/workbench/app/assets/stylesheets/job_tasks.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the JobTasks controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/jobs.css.scss b/apps/workbench/app/assets/stylesheets/jobs.css.scss index cf93f20350..9b1ea659a1 100644 --- a/apps/workbench/app/assets/stylesheets/jobs.css.scss +++ b/apps/workbench/app/assets/stylesheets/jobs.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + .arv-job-log-window { height: 40em; white-space: pre; diff --git a/apps/workbench/app/assets/stylesheets/keep_disks.css.scss b/apps/workbench/app/assets/stylesheets/keep_disks.css.scss index e7a1b12c96..0985d8c8d4 100644 --- a/apps/workbench/app/assets/stylesheets/keep_disks.css.scss +++ b/apps/workbench/app/assets/stylesheets/keep_disks.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the KeepDisks controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/links.css.scss b/apps/workbench/app/assets/stylesheets/links.css.scss index 220eb7091f..cf4c4e70cf 100644 --- a/apps/workbench/app/assets/stylesheets/links.css.scss +++ b/apps/workbench/app/assets/stylesheets/links.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the Links controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/loading.css.scss.erb b/apps/workbench/app/assets/stylesheets/loading.css.scss.erb index 9f74866f53..ee6ca34308 100644 --- a/apps/workbench/app/assets/stylesheets/loading.css.scss.erb +++ b/apps/workbench/app/assets/stylesheets/loading.css.scss.erb @@ -1,3 +1,7 @@ +<%# Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 %> + .loading { opacity: 0; } diff --git a/apps/workbench/app/assets/stylesheets/log_viewer.scss b/apps/workbench/app/assets/stylesheets/log_viewer.scss index 318f6e7792..c3fa8b96c6 100644 --- a/apps/workbench/app/assets/stylesheets/log_viewer.scss +++ b/apps/workbench/app/assets/stylesheets/log_viewer.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + .log-viewer-table { width: 100%; font-family: "Lucida Console", Monaco, monospace; diff --git a/apps/workbench/app/assets/stylesheets/logs.css.scss b/apps/workbench/app/assets/stylesheets/logs.css.scss index 4aaccac1b8..c8b22f9f5f 100644 --- a/apps/workbench/app/assets/stylesheets/logs.css.scss +++ b/apps/workbench/app/assets/stylesheets/logs.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the Logs controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/nodes.css.scss b/apps/workbench/app/assets/stylesheets/nodes.css.scss index 721060242b..a7b08612d7 100644 --- a/apps/workbench/app/assets/stylesheets/nodes.css.scss +++ b/apps/workbench/app/assets/stylesheets/nodes.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the Nodes controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/pipeline_instances.css.scss b/apps/workbench/app/assets/stylesheets/pipeline_instances.css.scss index c89e93d670..135685c27c 100644 --- a/apps/workbench/app/assets/stylesheets/pipeline_instances.css.scss +++ b/apps/workbench/app/assets/stylesheets/pipeline_instances.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the PipelineInstances controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/pipeline_templates.css.scss b/apps/workbench/app/assets/stylesheets/pipeline_templates.css.scss index c70377a6ff..329f0ed813 100644 --- a/apps/workbench/app/assets/stylesheets/pipeline_templates.css.scss +++ b/apps/workbench/app/assets/stylesheets/pipeline_templates.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the PipelineTemplates controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/projects.css.scss b/apps/workbench/app/assets/stylesheets/projects.css.scss index cf1d15e6e0..10c2ed0591 100644 --- a/apps/workbench/app/assets/stylesheets/projects.css.scss +++ b/apps/workbench/app/assets/stylesheets/projects.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + .arv-project-list > .row { padding-top: 5px; padding-bottom: 5px; diff --git a/apps/workbench/app/assets/stylesheets/repositories.css.scss b/apps/workbench/app/assets/stylesheets/repositories.css.scss index 85e38d231e..1dd9a16603 100644 --- a/apps/workbench/app/assets/stylesheets/repositories.css.scss +++ b/apps/workbench/app/assets/stylesheets/repositories.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the Repositories controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/scaffolds.css.scss b/apps/workbench/app/assets/stylesheets/scaffolds.css.scss index d3915bd59b..23e0f76ca3 100644 --- a/apps/workbench/app/assets/stylesheets/scaffolds.css.scss +++ b/apps/workbench/app/assets/stylesheets/scaffolds.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + /* We don't want the default Rails CSS, so the rules are deleted. This empty file is left here so Rails doesn't re-add it next time it diff --git a/apps/workbench/app/assets/stylesheets/select_modal.css.scss b/apps/workbench/app/assets/stylesheets/select_modal.css.scss index 425793a2aa..bd7ff92a41 100644 --- a/apps/workbench/app/assets/stylesheets/select_modal.css.scss +++ b/apps/workbench/app/assets/stylesheets/select_modal.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + .selectable-container > .row { padding-top: 5px; padding-bottom: 5px; diff --git a/apps/workbench/app/assets/stylesheets/sessions.css.scss b/apps/workbench/app/assets/stylesheets/sessions.css.scss index ccb1ed25b2..e08b086209 100644 --- a/apps/workbench/app/assets/stylesheets/sessions.css.scss +++ b/apps/workbench/app/assets/stylesheets/sessions.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the Sessions controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/specimens.css.scss b/apps/workbench/app/assets/stylesheets/specimens.css.scss index 460e42e180..60d630c8ab 100644 --- a/apps/workbench/app/assets/stylesheets/specimens.css.scss +++ b/apps/workbench/app/assets/stylesheets/specimens.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the Specimens controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/traits.css.scss b/apps/workbench/app/assets/stylesheets/traits.css.scss index 5f30857c97..7d2f7133e1 100644 --- a/apps/workbench/app/assets/stylesheets/traits.css.scss +++ b/apps/workbench/app/assets/stylesheets/traits.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the Traits controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/user_agreements.css.scss b/apps/workbench/app/assets/stylesheets/user_agreements.css.scss index 98edb295ee..d9eb5eb48e 100644 --- a/apps/workbench/app/assets/stylesheets/user_agreements.css.scss +++ b/apps/workbench/app/assets/stylesheets/user_agreements.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the user_agreements controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/users.css.scss b/apps/workbench/app/assets/stylesheets/users.css.scss index 31a2eacb84..a087ca3bb6 100644 --- a/apps/workbench/app/assets/stylesheets/users.css.scss +++ b/apps/workbench/app/assets/stylesheets/users.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the Users controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/assets/stylesheets/virtual_machines.css.scss b/apps/workbench/app/assets/stylesheets/virtual_machines.css.scss index 5532eb999e..4a94d45111 100644 --- a/apps/workbench/app/assets/stylesheets/virtual_machines.css.scss +++ b/apps/workbench/app/assets/stylesheets/virtual_machines.css.scss @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Place all the styles related to the VirtualMachines controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/apps/workbench/app/controllers/actions_controller.rb b/apps/workbench/app/controllers/actions_controller.rb index 55e4e9aa4a..beeae0760c 100644 --- a/apps/workbench/app/controllers/actions_controller.rb +++ b/apps/workbench/app/controllers/actions_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + require "arvados/collection" class ActionsController < ApplicationController diff --git a/apps/workbench/app/controllers/api_client_authorizations_controller.rb b/apps/workbench/app/controllers/api_client_authorizations_controller.rb index 85f52f20ab..c7ff560773 100644 --- a/apps/workbench/app/controllers/api_client_authorizations_controller.rb +++ b/apps/workbench/app/controllers/api_client_authorizations_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class ApiClientAuthorizationsController < ApplicationController def index_pane_list diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb index 0a40f58f21..5acf9a7351 100644 --- a/apps/workbench/app/controllers/application_controller.rb +++ b/apps/workbench/app/controllers/application_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class ApplicationController < ActionController::Base include ArvadosApiClientHelper include ApplicationHelper diff --git a/apps/workbench/app/controllers/authorized_keys_controller.rb b/apps/workbench/app/controllers/authorized_keys_controller.rb index 6eaec1ee59..ac47ce7592 100644 --- a/apps/workbench/app/controllers/authorized_keys_controller.rb +++ b/apps/workbench/app/controllers/authorized_keys_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class AuthorizedKeysController < ApplicationController def index_pane_list %w(Recent Help) diff --git a/apps/workbench/app/controllers/collections_controller.rb b/apps/workbench/app/controllers/collections_controller.rb index 625a6a8f61..f8fcf5108f 100644 --- a/apps/workbench/app/controllers/collections_controller.rb +++ b/apps/workbench/app/controllers/collections_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + require "arvados/keep" require "arvados/collection" require "uri" @@ -20,7 +24,7 @@ class CollectionsController < ApplicationController RELATION_LIMIT = 5 def show_pane_list - panes = %w(Files Upload Provenance_graph Used_by Advanced) + panes = %w(Files Upload Tags Provenance_graph Used_by Advanced) panes = panes - %w(Upload) unless (@object.editable? rescue false) panes end @@ -354,6 +358,30 @@ class CollectionsController < ApplicationController end end + def tags + render + end + + def save_tags + tags_param = params['tag_data'] + if tags_param + if tags_param.is_a?(String) && tags_param == "empty" + tags = {} + else + tags = tags_param + end + end + + if tags + if @object.update_attributes properties: tags + @saved_tags = true + render + else + self.render_error status: 422 + end + end + end + protected def find_usable_token(token_list) diff --git a/apps/workbench/app/controllers/container_requests_controller.rb b/apps/workbench/app/controllers/container_requests_controller.rb index a507139225..f61596ecc7 100644 --- a/apps/workbench/app/controllers/container_requests_controller.rb +++ b/apps/workbench/app/controllers/container_requests_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class ContainerRequestsController < ApplicationController skip_around_filter :require_thread_api_token, if: proc { |ctrl| Rails.configuration.anonymous_user_token and diff --git a/apps/workbench/app/controllers/containers_controller.rb b/apps/workbench/app/controllers/containers_controller.rb index 1df2c3acb0..f0e31644f1 100644 --- a/apps/workbench/app/controllers/containers_controller.rb +++ b/apps/workbench/app/controllers/containers_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class ContainersController < ApplicationController skip_around_filter :require_thread_api_token, if: proc { |ctrl| Rails.configuration.anonymous_user_token and diff --git a/apps/workbench/app/controllers/groups_controller.rb b/apps/workbench/app/controllers/groups_controller.rb index 080386ea5c..aa78feb9a0 100644 --- a/apps/workbench/app/controllers/groups_controller.rb +++ b/apps/workbench/app/controllers/groups_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class GroupsController < ApplicationController def index @groups = Group.filter [['group_class', '!=', 'project']] diff --git a/apps/workbench/app/controllers/humans_controller.rb b/apps/workbench/app/controllers/humans_controller.rb index e141655951..dd08b3064a 100644 --- a/apps/workbench/app/controllers/humans_controller.rb +++ b/apps/workbench/app/controllers/humans_controller.rb @@ -1,2 +1,6 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class HumansController < ApplicationController end diff --git a/apps/workbench/app/controllers/job_tasks_controller.rb b/apps/workbench/app/controllers/job_tasks_controller.rb index 5e8662b3ba..67b31adde7 100644 --- a/apps/workbench/app/controllers/job_tasks_controller.rb +++ b/apps/workbench/app/controllers/job_tasks_controller.rb @@ -1,2 +1,6 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class JobTasksController < ApplicationController end diff --git a/apps/workbench/app/controllers/jobs_controller.rb b/apps/workbench/app/controllers/jobs_controller.rb index c39b7c4317..204dbb76df 100644 --- a/apps/workbench/app/controllers/jobs_controller.rb +++ b/apps/workbench/app/controllers/jobs_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class JobsController < ApplicationController skip_around_filter :require_thread_api_token, if: proc { |ctrl| Rails.configuration.anonymous_user_token and diff --git a/apps/workbench/app/controllers/keep_disks_controller.rb b/apps/workbench/app/controllers/keep_disks_controller.rb index bbf18e591b..c95ebdc255 100644 --- a/apps/workbench/app/controllers/keep_disks_controller.rb +++ b/apps/workbench/app/controllers/keep_disks_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class KeepDisksController < ApplicationController def create defaults = { is_readable: true, is_writable: true } diff --git a/apps/workbench/app/controllers/keep_services_controller.rb b/apps/workbench/app/controllers/keep_services_controller.rb index eac2e226a8..361d4002c6 100644 --- a/apps/workbench/app/controllers/keep_services_controller.rb +++ b/apps/workbench/app/controllers/keep_services_controller.rb @@ -1,2 +1,6 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class KeepServicesController < ApplicationController end diff --git a/apps/workbench/app/controllers/links_controller.rb b/apps/workbench/app/controllers/links_controller.rb index fd51fb1616..b79fad4a6c 100644 --- a/apps/workbench/app/controllers/links_controller.rb +++ b/apps/workbench/app/controllers/links_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class LinksController < ApplicationController def show if @object.link_class == 'name' and diff --git a/apps/workbench/app/controllers/logs_controller.rb b/apps/workbench/app/controllers/logs_controller.rb index 48ad4edf08..512f0a32e7 100644 --- a/apps/workbench/app/controllers/logs_controller.rb +++ b/apps/workbench/app/controllers/logs_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class LogsController < ApplicationController before_filter :ensure_current_user_is_admin end diff --git a/apps/workbench/app/controllers/nodes_controller.rb b/apps/workbench/app/controllers/nodes_controller.rb index 36348d67b5..72bde698e4 100644 --- a/apps/workbench/app/controllers/nodes_controller.rb +++ b/apps/workbench/app/controllers/nodes_controller.rb @@ -1,2 +1,6 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class NodesController < ApplicationController end diff --git a/apps/workbench/app/controllers/pipeline_instances_controller.rb b/apps/workbench/app/controllers/pipeline_instances_controller.rb index a7b9142f0d..93bb869613 100644 --- a/apps/workbench/app/controllers/pipeline_instances_controller.rb +++ b/apps/workbench/app/controllers/pipeline_instances_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class PipelineInstancesController < ApplicationController skip_before_filter :find_object_by_uuid, only: :compare before_filter :find_objects_by_uuid, only: :compare diff --git a/apps/workbench/app/controllers/pipeline_templates_controller.rb b/apps/workbench/app/controllers/pipeline_templates_controller.rb index 83ab88f612..7d94e3469a 100644 --- a/apps/workbench/app/controllers/pipeline_templates_controller.rb +++ b/apps/workbench/app/controllers/pipeline_templates_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class PipelineTemplatesController < ApplicationController skip_around_filter :require_thread_api_token, if: proc { |ctrl| Rails.configuration.anonymous_user_token and diff --git a/apps/workbench/app/controllers/projects_controller.rb b/apps/workbench/app/controllers/projects_controller.rb index 2cd668a28d..c010123ea0 100644 --- a/apps/workbench/app/controllers/projects_controller.rb +++ b/apps/workbench/app/controllers/projects_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class ProjectsController < ApplicationController before_filter :set_share_links, if: -> { defined? @object and @object} skip_around_filter :require_thread_api_token, if: proc { |ctrl| diff --git a/apps/workbench/app/controllers/repositories_controller.rb b/apps/workbench/app/controllers/repositories_controller.rb index c5b3501b32..5ca6f22b02 100644 --- a/apps/workbench/app/controllers/repositories_controller.rb +++ b/apps/workbench/app/controllers/repositories_controller.rb @@ -1,8 +1,12 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class RepositoriesController < ApplicationController before_filter :set_share_links, if: -> { defined? @object } def index_pane_list - %w(recent help) + %w(repositories help) end def show_pane_list @@ -32,4 +36,72 @@ class RepositoriesController < ApplicationController def show_commit @commit = params[:commit] end + + def all_repos + limit = params[:limit].andand.to_i || 100 + offset = params[:offset].andand.to_i || 0 + @filters = params[:filters] || [] + + if @filters.any? + owner_filter = @filters.select do |attr, op, val| + (attr == 'owner_uuid') + end + end + + if !owner_filter.andand.any? + filters = @filters + [["owner_uuid", "=", current_user.uuid]] + my_repos = Repository.all.order("name ASC").limit(limit).offset(offset).filter(filters).results + else # done fetching all owned repositories + my_repos = [] + end + + if !owner_filter.andand.any? # if this is next page request, the first page was still fetching "own" repos + @filters = @filters.reject do |attr, op, val| + (attr == 'owner_uuid') or + (attr == 'name') or + (attr == 'uuid') + end + end + + filters = @filters + [["owner_uuid", "!=", current_user.uuid]] + other_repos = Repository.all.order("name ASC").limit(limit).offset(offset).filter(filters).results + + @objects = (my_repos + other_repos).first(limit) + end + + def find_objects_for_index + return if !params[:partial] + + all_repos + + if @objects.any? + @next_page_filters = next_page_filters('>=') + @next_page_href = url_for(partial: :repositories_rows, + filters: @next_page_filters.to_json) + else + @next_page_href = nil + end + end + + def next_page_href with_params={} + @next_page_href + end + + def next_page_filters nextpage_operator + next_page_filters = @filters.reject do |attr, op, val| + (attr == 'owner_uuid') or + (attr == 'name' and op == nextpage_operator) or + (attr == 'uuid' and op == 'not in') + end + + if @objects.any? + last_obj = @objects.last + next_page_filters += [['name', nextpage_operator, last_obj.name]] + next_page_filters += [['uuid', 'not in', [last_obj.uuid]]] + # if not-owned, it means we are done with owned repos and fetching other repos + next_page_filters += [['owner_uuid', '!=', last_obj.uuid]] if last_obj.owner_uuid != current_user.uuid + end + + next_page_filters + end end diff --git a/apps/workbench/app/controllers/search_controller.rb b/apps/workbench/app/controllers/search_controller.rb index 3fa78365b9..40e484ea06 100644 --- a/apps/workbench/app/controllers/search_controller.rb +++ b/apps/workbench/app/controllers/search_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class SearchController < ApplicationController def find_objects_for_index search_what = Group diff --git a/apps/workbench/app/controllers/sessions_controller.rb b/apps/workbench/app/controllers/sessions_controller.rb index 97c8d5a9dd..d4986538d8 100644 --- a/apps/workbench/app/controllers/sessions_controller.rb +++ b/apps/workbench/app/controllers/sessions_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class SessionsController < ApplicationController skip_around_filter :require_thread_api_token, :only => [:destroy, :index] skip_around_filter :set_thread_api_token, :only => [:destroy, :index] diff --git a/apps/workbench/app/controllers/specimens_controller.rb b/apps/workbench/app/controllers/specimens_controller.rb index 47dd8a2358..76a12715a7 100644 --- a/apps/workbench/app/controllers/specimens_controller.rb +++ b/apps/workbench/app/controllers/specimens_controller.rb @@ -1,2 +1,6 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class SpecimensController < ApplicationController end diff --git a/apps/workbench/app/controllers/traits_controller.rb b/apps/workbench/app/controllers/traits_controller.rb index 38f33a3363..81bded480f 100644 --- a/apps/workbench/app/controllers/traits_controller.rb +++ b/apps/workbench/app/controllers/traits_controller.rb @@ -1,2 +1,6 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class TraitsController < ApplicationController end diff --git a/apps/workbench/app/controllers/trash_items_controller.rb b/apps/workbench/app/controllers/trash_items_controller.rb index 5f91a60ca1..3604e789de 100644 --- a/apps/workbench/app/controllers/trash_items_controller.rb +++ b/apps/workbench/app/controllers/trash_items_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class TrashItemsController < ApplicationController def model_class Collection diff --git a/apps/workbench/app/controllers/user_agreements_controller.rb b/apps/workbench/app/controllers/user_agreements_controller.rb index bec11f2dc6..2797c4c682 100644 --- a/apps/workbench/app/controllers/user_agreements_controller.rb +++ b/apps/workbench/app/controllers/user_agreements_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class UserAgreementsController < ApplicationController skip_before_filter :check_user_agreements skip_before_filter :find_object_by_uuid diff --git a/apps/workbench/app/controllers/users_controller.rb b/apps/workbench/app/controllers/users_controller.rb index 1a1c5f8021..2e3ced69a5 100644 --- a/apps/workbench/app/controllers/users_controller.rb +++ b/apps/workbench/app/controllers/users_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class UsersController < ApplicationController skip_around_filter :require_thread_api_token, only: :welcome skip_before_filter :check_user_agreements, only: [:welcome, :inactive] @@ -256,32 +260,6 @@ class UsersController < ApplicationController end end - def repositories - repo_links = Link. - filter([['head_uuid', 'is_a', 'arvados#repository'], - ['tail_uuid', '=', current_user.uuid], - ['link_class', '=', 'permission'], - ]) - - owned_repositories = Repository.where(owner_uuid: @object.uuid) - - @my_repositories = (Repository.where(uuid: repo_links.collect(&:head_uuid)) | - owned_repositories). - uniq { |repo| repo.uuid } - - - @repo_writable = {} - repo_links.each do |link| - if link.name.in? ['can_write', 'can_manage'] - @repo_writable[link.head_uuid] = link.name - end - end - - owned_repositories.each do |repo| - @repo_writable[repo.uuid] = 'can_manage' - end - end - def virtual_machines @my_vm_logins = {} Link.where(tail_uuid: @object.uuid, diff --git a/apps/workbench/app/controllers/virtual_machines_controller.rb b/apps/workbench/app/controllers/virtual_machines_controller.rb index 73231f8cc0..19763b926c 100644 --- a/apps/workbench/app/controllers/virtual_machines_controller.rb +++ b/apps/workbench/app/controllers/virtual_machines_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class VirtualMachinesController < ApplicationController def index @objects ||= model_class.all diff --git a/apps/workbench/app/controllers/websocket_controller.rb b/apps/workbench/app/controllers/websocket_controller.rb index a49c15f5bc..e6fa5afade 100644 --- a/apps/workbench/app/controllers/websocket_controller.rb +++ b/apps/workbench/app/controllers/websocket_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class WebsocketController < ApplicationController skip_before_filter :find_objects_for_index diff --git a/apps/workbench/app/controllers/work_unit_templates_controller.rb b/apps/workbench/app/controllers/work_unit_templates_controller.rb index fe53ac403c..1dba520a7a 100644 --- a/apps/workbench/app/controllers/work_unit_templates_controller.rb +++ b/apps/workbench/app/controllers/work_unit_templates_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class WorkUnitTemplatesController < ApplicationController def find_objects_for_index return if !params[:partial] diff --git a/apps/workbench/app/controllers/work_units_controller.rb b/apps/workbench/app/controllers/work_units_controller.rb index 550bdb7e95..1e57e7caab 100644 --- a/apps/workbench/app/controllers/work_units_controller.rb +++ b/apps/workbench/app/controllers/work_units_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class WorkUnitsController < ApplicationController skip_around_filter :require_thread_api_token, if: proc { |ctrl| Rails.configuration.anonymous_user_token and diff --git a/apps/workbench/app/controllers/workflows_controller.rb b/apps/workbench/app/controllers/workflows_controller.rb index 49dd7ac055..3b98413e23 100644 --- a/apps/workbench/app/controllers/workflows_controller.rb +++ b/apps/workbench/app/controllers/workflows_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class WorkflowsController < ApplicationController skip_around_filter :require_thread_api_token, if: proc { |ctrl| Rails.configuration.anonymous_user_token and diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb index 0f60bcd65b..57b8d8780c 100644 --- a/apps/workbench/app/helpers/application_helper.rb +++ b/apps/workbench/app/helpers/application_helper.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + module ApplicationHelper def current_user controller.current_user diff --git a/apps/workbench/app/helpers/arvados_api_client_helper.rb b/apps/workbench/app/helpers/arvados_api_client_helper.rb index b6c29a9070..5901de40b8 100644 --- a/apps/workbench/app/helpers/arvados_api_client_helper.rb +++ b/apps/workbench/app/helpers/arvados_api_client_helper.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + module ArvadosApiClientHelper def arvados_api_client ArvadosApiClient.new_or_current diff --git a/apps/workbench/app/helpers/collections_helper.rb b/apps/workbench/app/helpers/collections_helper.rb index 25f2cb53e6..e249eaa8ac 100644 --- a/apps/workbench/app/helpers/collections_helper.rb +++ b/apps/workbench/app/helpers/collections_helper.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + module CollectionsHelper def d3ify_links(links) links.collect do |x| diff --git a/apps/workbench/app/helpers/pipeline_components_helper.rb b/apps/workbench/app/helpers/pipeline_components_helper.rb index 8f5dba1a87..702772ce98 100644 --- a/apps/workbench/app/helpers/pipeline_components_helper.rb +++ b/apps/workbench/app/helpers/pipeline_components_helper.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + module PipelineComponentsHelper def render_pipeline_components(template_suffix, fallback=nil, locals={}) begin diff --git a/apps/workbench/app/helpers/pipeline_instances_helper.rb b/apps/workbench/app/helpers/pipeline_instances_helper.rb index 8bd04b09e8..2142375226 100644 --- a/apps/workbench/app/helpers/pipeline_instances_helper.rb +++ b/apps/workbench/app/helpers/pipeline_instances_helper.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + module PipelineInstancesHelper def pipeline_jobs object=nil diff --git a/apps/workbench/app/helpers/provenance_helper.rb b/apps/workbench/app/helpers/provenance_helper.rb index 0b83975426..94092a12ea 100644 --- a/apps/workbench/app/helpers/provenance_helper.rb +++ b/apps/workbench/app/helpers/provenance_helper.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + module ProvenanceHelper class GenerateGraph diff --git a/apps/workbench/app/helpers/version_helper.rb b/apps/workbench/app/helpers/version_helper.rb index 5c15986601..915c3a9d38 100644 --- a/apps/workbench/app/helpers/version_helper.rb +++ b/apps/workbench/app/helpers/version_helper.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + module VersionHelper # Get the source_version given in the API server's discovery # document. diff --git a/apps/workbench/app/mailers/issue_reporter.rb b/apps/workbench/app/mailers/issue_reporter.rb index 212dd7dbf9..de07122c2f 100644 --- a/apps/workbench/app/mailers/issue_reporter.rb +++ b/apps/workbench/app/mailers/issue_reporter.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class IssueReporter < ActionMailer::Base default from: Rails.configuration.issue_reporter_email_from default to: Rails.configuration.issue_reporter_email_to diff --git a/apps/workbench/app/mailers/request_shell_access_reporter.rb b/apps/workbench/app/mailers/request_shell_access_reporter.rb index 019557309d..8615cea3a8 100644 --- a/apps/workbench/app/mailers/request_shell_access_reporter.rb +++ b/apps/workbench/app/mailers/request_shell_access_reporter.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class RequestShellAccessReporter < ActionMailer::Base default from: Rails.configuration.email_from default to: Rails.configuration.support_email_address diff --git a/apps/workbench/app/models/api_client_authorization.rb b/apps/workbench/app/models/api_client_authorization.rb index 6d1558cc6e..b78cb286ec 100644 --- a/apps/workbench/app/models/api_client_authorization.rb +++ b/apps/workbench/app/models/api_client_authorization.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class ApiClientAuthorization < ArvadosBase def editable_attributes %w(expires_at default_owner_uuid) diff --git a/apps/workbench/app/models/arvados_api_client.rb b/apps/workbench/app/models/arvados_api_client.rb index eb93dfcfaa..8638b0aa51 100644 --- a/apps/workbench/app/models/arvados_api_client.rb +++ b/apps/workbench/app/models/arvados_api_client.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + require 'httpclient' require 'thread' diff --git a/apps/workbench/app/models/arvados_base.rb b/apps/workbench/app/models/arvados_base.rb index 58e3fb7a5c..8e1cfae8a2 100644 --- a/apps/workbench/app/models/arvados_base.rb +++ b/apps/workbench/app/models/arvados_base.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class ArvadosBase < ActiveRecord::Base self.abstract_class = true attr_accessor :attribute_sortkey diff --git a/apps/workbench/app/models/arvados_resource_list.rb b/apps/workbench/app/models/arvados_resource_list.rb index dea2f30d1d..9ba61eaba0 100644 --- a/apps/workbench/app/models/arvados_resource_list.rb +++ b/apps/workbench/app/models/arvados_resource_list.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class ArvadosResourceList include ArvadosApiClientHelper include Enumerable diff --git a/apps/workbench/app/models/authorized_key.rb b/apps/workbench/app/models/authorized_key.rb index b0c2fa2f02..9809eef0e3 100644 --- a/apps/workbench/app/models/authorized_key.rb +++ b/apps/workbench/app/models/authorized_key.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class AuthorizedKey < ArvadosBase def attribute_editable?(attr, ever=nil) if (attr.to_s == 'authorized_user_uuid') and (not ever) diff --git a/apps/workbench/app/models/collection.rb b/apps/workbench/app/models/collection.rb index 305ea01530..09af60fb9c 100644 --- a/apps/workbench/app/models/collection.rb +++ b/apps/workbench/app/models/collection.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + require "arvados/keep" class Collection < ArvadosBase @@ -99,6 +103,6 @@ class Collection < ArvadosBase end def untrash - arvados_api_client.api(self.class, "/#{self.uuid}/untrash", {}) + arvados_api_client.api(self.class, "/#{self.uuid}/untrash", {"ensure_unique_name" => true}) end end diff --git a/apps/workbench/app/models/container.rb b/apps/workbench/app/models/container.rb index cf1de691c3..8de28ae41f 100644 --- a/apps/workbench/app/models/container.rb +++ b/apps/workbench/app/models/container.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class Container < ArvadosBase def self.creatable? false diff --git a/apps/workbench/app/models/container_request.rb b/apps/workbench/app/models/container_request.rb index 7cbd91e866..3c08d94989 100644 --- a/apps/workbench/app/models/container_request.rb +++ b/apps/workbench/app/models/container_request.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class ContainerRequest < ArvadosBase def self.creatable? false diff --git a/apps/workbench/app/models/container_work_unit.rb b/apps/workbench/app/models/container_work_unit.rb index ed34196790..a5b26f0d6d 100644 --- a/apps/workbench/app/models/container_work_unit.rb +++ b/apps/workbench/app/models/container_work_unit.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class ContainerWorkUnit < ProxyWorkUnit attr_accessor :container attr_accessor :child_proxies diff --git a/apps/workbench/app/models/group.rb b/apps/workbench/app/models/group.rb index 0d358603a8..523e5e94f6 100644 --- a/apps/workbench/app/models/group.rb +++ b/apps/workbench/app/models/group.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class Group < ArvadosBase def self.goes_in_projects? true diff --git a/apps/workbench/app/models/human.rb b/apps/workbench/app/models/human.rb index 7c2d3e4396..c1acef5645 100644 --- a/apps/workbench/app/models/human.rb +++ b/apps/workbench/app/models/human.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class Human < ArvadosBase def self.goes_in_projects? true diff --git a/apps/workbench/app/models/job.rb b/apps/workbench/app/models/job.rb index 128440d526..7c55d9e857 100644 --- a/apps/workbench/app/models/job.rb +++ b/apps/workbench/app/models/job.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class Job < ArvadosBase def self.goes_in_projects? true diff --git a/apps/workbench/app/models/job_task.rb b/apps/workbench/app/models/job_task.rb index 654e0a37e0..b10a2b0fd6 100644 --- a/apps/workbench/app/models/job_task.rb +++ b/apps/workbench/app/models/job_task.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class JobTask < ArvadosBase def work_unit(label=nil) JobTaskWorkUnit.new(self, label, self.uuid) diff --git a/apps/workbench/app/models/job_task_work_unit.rb b/apps/workbench/app/models/job_task_work_unit.rb index 47d53ca6a4..f5cd526c55 100644 --- a/apps/workbench/app/models/job_task_work_unit.rb +++ b/apps/workbench/app/models/job_task_work_unit.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class JobTaskWorkUnit < ProxyWorkUnit def title "job task" diff --git a/apps/workbench/app/models/job_work_unit.rb b/apps/workbench/app/models/job_work_unit.rb index 5b1d1b7e35..83825a5338 100644 --- a/apps/workbench/app/models/job_work_unit.rb +++ b/apps/workbench/app/models/job_work_unit.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class JobWorkUnit < ProxyWorkUnit def children return @my_children if @my_children diff --git a/apps/workbench/app/models/keep_disk.rb b/apps/workbench/app/models/keep_disk.rb index 6438fc72d6..f4fea2ce9b 100644 --- a/apps/workbench/app/models/keep_disk.rb +++ b/apps/workbench/app/models/keep_disk.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class KeepDisk < ArvadosBase def self.creatable? false diff --git a/apps/workbench/app/models/keep_service.rb b/apps/workbench/app/models/keep_service.rb index 0c998c4591..2fea18aecf 100644 --- a/apps/workbench/app/models/keep_service.rb +++ b/apps/workbench/app/models/keep_service.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class KeepService < ArvadosBase def self.creatable? false diff --git a/apps/workbench/app/models/link.rb b/apps/workbench/app/models/link.rb index b1bbcff126..920b4bdcc5 100644 --- a/apps/workbench/app/models/link.rb +++ b/apps/workbench/app/models/link.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class Link < ArvadosBase attr_accessor :head attr_accessor :tail diff --git a/apps/workbench/app/models/log.rb b/apps/workbench/app/models/log.rb index 39d585bf90..6bbefa19d8 100644 --- a/apps/workbench/app/models/log.rb +++ b/apps/workbench/app/models/log.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class Log < ArvadosBase attr_accessor :object def self.creatable? diff --git a/apps/workbench/app/models/node.rb b/apps/workbench/app/models/node.rb index 8bf98c6dec..785cc4fcfe 100644 --- a/apps/workbench/app/models/node.rb +++ b/apps/workbench/app/models/node.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class Node < ArvadosBase def self.creatable? false diff --git a/apps/workbench/app/models/pipeline_instance.rb b/apps/workbench/app/models/pipeline_instance.rb index 1c14efffa6..dd2cc0ab77 100644 --- a/apps/workbench/app/models/pipeline_instance.rb +++ b/apps/workbench/app/models/pipeline_instance.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + require "arvados/keep" class PipelineInstance < ArvadosBase diff --git a/apps/workbench/app/models/pipeline_instance_work_unit.rb b/apps/workbench/app/models/pipeline_instance_work_unit.rb index 293a77c099..517dbc7a35 100644 --- a/apps/workbench/app/models/pipeline_instance_work_unit.rb +++ b/apps/workbench/app/models/pipeline_instance_work_unit.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class PipelineInstanceWorkUnit < ProxyWorkUnit def children return @my_children if @my_children diff --git a/apps/workbench/app/models/pipeline_template.rb b/apps/workbench/app/models/pipeline_template.rb index 6e79775397..bce0f08d6b 100644 --- a/apps/workbench/app/models/pipeline_template.rb +++ b/apps/workbench/app/models/pipeline_template.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class PipelineTemplate < ArvadosBase def self.goes_in_projects? true diff --git a/apps/workbench/app/models/proxy_work_unit.rb b/apps/workbench/app/models/proxy_work_unit.rb index 8d1c1e30ec..f570563b75 100644 --- a/apps/workbench/app/models/proxy_work_unit.rb +++ b/apps/workbench/app/models/proxy_work_unit.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class ProxyWorkUnit < WorkUnit require 'time' diff --git a/apps/workbench/app/models/repository.rb b/apps/workbench/app/models/repository.rb index 7f9513a5a9..6e8b68bd6e 100644 --- a/apps/workbench/app/models/repository.rb +++ b/apps/workbench/app/models/repository.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class Repository < ArvadosBase def self.creatable? false diff --git a/apps/workbench/app/models/specimen.rb b/apps/workbench/app/models/specimen.rb index 7c611e47ff..4418f7c947 100644 --- a/apps/workbench/app/models/specimen.rb +++ b/apps/workbench/app/models/specimen.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class Specimen < ArvadosBase def self.goes_in_projects? true diff --git a/apps/workbench/app/models/trait.rb b/apps/workbench/app/models/trait.rb index e7a6ceb70a..421a107665 100644 --- a/apps/workbench/app/models/trait.rb +++ b/apps/workbench/app/models/trait.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class Trait < ArvadosBase def self.goes_in_projects? true diff --git a/apps/workbench/app/models/user.rb b/apps/workbench/app/models/user.rb index 8df16f29a4..10da22db69 100644 --- a/apps/workbench/app/models/user.rb +++ b/apps/workbench/app/models/user.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class User < ArvadosBase def initialize(*args) super(*args) diff --git a/apps/workbench/app/models/user_agreement.rb b/apps/workbench/app/models/user_agreement.rb index d77038cdd5..fbba426899 100644 --- a/apps/workbench/app/models/user_agreement.rb +++ b/apps/workbench/app/models/user_agreement.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class UserAgreement < ArvadosBase def self.signatures res = arvados_api_client.api self, '/signatures' diff --git a/apps/workbench/app/models/virtual_machine.rb b/apps/workbench/app/models/virtual_machine.rb index e1a208c53d..a81d76fd79 100644 --- a/apps/workbench/app/models/virtual_machine.rb +++ b/apps/workbench/app/models/virtual_machine.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class VirtualMachine < ArvadosBase attr_accessor :current_user_logins diff --git a/apps/workbench/app/models/work_unit.rb b/apps/workbench/app/models/work_unit.rb index 37554469c3..f0c4230f2a 100644 --- a/apps/workbench/app/models/work_unit.rb +++ b/apps/workbench/app/models/work_unit.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class WorkUnit # This is an abstract class that documents the WorkUnit interface diff --git a/apps/workbench/app/models/workflow.rb b/apps/workbench/app/models/workflow.rb index c59125fd08..31d433e912 100644 --- a/apps/workbench/app/models/workflow.rb +++ b/apps/workbench/app/models/workflow.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class Workflow < ArvadosBase def self.goes_in_projects? true diff --git a/apps/workbench/app/views/api_client_authorizations/_show_help.html.erb b/apps/workbench/app/views/api_client_authorizations/_show_help.html.erb index 1481721535..0118390e5b 100644 --- a/apps/workbench/app/views/api_client_authorizations/_show_help.html.erb +++ b/apps/workbench/app/views/api_client_authorizations/_show_help.html.erb @@ -1,3 +1,7 @@ +<%# Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 %> +
 ### Pasting the following lines at a shell prompt will allow Arvados SDKs
 ### to authenticate to your account, <%= current_user.email %>
diff --git a/apps/workbench/app/views/application/404.html.erb b/apps/workbench/app/views/application/404.html.erb
index ea6e7033cb..e02d0b3bd7 100644
--- a/apps/workbench/app/views/application/404.html.erb
+++ b/apps/workbench/app/views/application/404.html.erb
@@ -1,3 +1,7 @@
+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
+
 <%
    if (controller.andand.action_name == 'show') and params[:uuid]
      class_name = controller.model_class.to_s.underscore
diff --git a/apps/workbench/app/views/application/404.json.erb b/apps/workbench/app/views/application/404.json.erb
index 8371ff9c0e..a69749050d 100644
--- a/apps/workbench/app/views/application/404.json.erb
+++ b/apps/workbench/app/views/application/404.json.erb
@@ -1 +1,5 @@
+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
+
 {"errors":<%= raw @errors.to_json %>}
\ No newline at end of file
diff --git a/apps/workbench/app/views/application/_arvados_attr_value.html.erb b/apps/workbench/app/views/application/_arvados_attr_value.html.erb
index 3df892fd5a..98732dc3bf 100644
--- a/apps/workbench/app/views/application/_arvados_attr_value.html.erb
+++ b/apps/workbench/app/views/application/_arvados_attr_value.html.erb
@@ -1,3 +1,7 @@
+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
+
 <% if attrvalue.is_a? Array and attrvalue.collect(&:class).uniq.compact == [String] %>
   <% attrvalue.each do |message| %>
     <%= message %>
diff --git a/apps/workbench/app/views/application/_arvados_object.html.erb b/apps/workbench/app/views/application/_arvados_object.html.erb index b4bf70dd23..6d59e0eb59 100644 --- a/apps/workbench/app/views/application/_arvados_object.html.erb +++ b/apps/workbench/app/views/application/_arvados_object.html.erb @@ -1,3 +1,7 @@ +<%# Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 %> + <% content_for :arvados_object_table do %> <% end %> diff --git a/apps/workbench/app/views/application/_arvados_object_attr.html.erb b/apps/workbench/app/views/application/_arvados_object_attr.html.erb index b06dd8c756..9b9c39f809 100644 --- a/apps/workbench/app/views/application/_arvados_object_attr.html.erb +++ b/apps/workbench/app/views/application/_arvados_object_attr.html.erb @@ -1,3 +1,7 @@ +<%# Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 %> + <% object ||= @object %> <% if attrvalue.is_a? Hash then attrvalue.each do |infokey, infocontent| %> diff --git a/apps/workbench/app/views/application/_breadcrumb_page_name.html.erb b/apps/workbench/app/views/application/_breadcrumb_page_name.html.erb index 8b13789179..0ff635b44c 100644 --- a/apps/workbench/app/views/application/_breadcrumb_page_name.html.erb +++ b/apps/workbench/app/views/application/_breadcrumb_page_name.html.erb @@ -1 +1,5 @@ +<%# Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 %> + diff --git a/apps/workbench/app/views/application/_breadcrumbs.html.erb b/apps/workbench/app/views/application/_breadcrumbs.html.erb index 1ead5787b8..fb4a1462a1 100644 --- a/apps/workbench/app/views/application/_breadcrumbs.html.erb +++ b/apps/workbench/app/views/application/_breadcrumbs.html.erb @@ -1,3 +1,7 @@ +<%# Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 %> +