[ARVADOS] updated: 1701a77ed3bfbdf226d5877153f0ec393a8ec2e7
git at public.curoverse.com
git at public.curoverse.com
Thu Dec 4 15:08:16 EST 2014
Summary of changes:
apps/workbench/Gemfile | 5 +-
apps/workbench/Gemfile.lock | 166 +++++------
.../app/assets/javascripts/application.js | 3 +
apps/workbench/app/assets/javascripts/event_log.js | 312 +++++++++++++++++++++
.../app/assets/javascripts/pipeline_instances.js | 43 +--
.../app/assets/javascripts/report_issue.js | 4 +-
.../app/assets/javascripts/upload_to_collection.js | 89 +++---
.../app/assets/stylesheets/application.css.scss | 1 +
.../workbench/app/assets/stylesheets/jobs.css.scss | 5 +
.../app/controllers/collections_controller.rb | 16 +-
apps/workbench/app/controllers/jobs_controller.rb | 15 +
apps/workbench/app/helpers/provenance_helper.rb | 5 +-
apps/workbench/app/models/collection.rb | 14 +-
.../views/application/report_issue_popup.js.erb | 8 +-
.../app/views/collections/_index_tbody.html.erb | 15 +-
.../app/views/collections/_sharing_button.html.erb | 36 ++-
.../app/views/collections/_show_files.html.erb | 6 +-
.../app/views/collections/_show_recent.html.erb | 2 +-
.../app/views/collections/_show_upload.html.erb | 10 +-
apps/workbench/app/views/jobs/_show_log.html.erb | 6 +-
.../app/views/keep_disks/_content_layout.html.erb | 3 -
apps/workbench/app/views/layouts/body.html.erb | 2 +-
.../views/pipeline_instances/_show_recent.html.erb | 2 +-
.../app/views/pipeline_instances/index.html.erb | 3 +-
.../views/pipeline_templates/_show_recent.html.erb | 2 +-
.../app/views/pipeline_templates/show.html.erb | 2 +-
.../app/views/projects/_show_dashboard.html.erb | 14 +-
.../app/views/projects/_show_sharing.html.erb | 2 +-
.../app/views/projects/_show_tab_contents.html.erb | 12 +-
apps/workbench/app/views/projects/show.html.erb | 18 +-
.../app/views/user_agreements/index.html.erb | 2 +-
.../app/views/users/_add_ssh_key_popup.html.erb | 6 +-
.../app/views/users/_manage_ssh_keys.html.erb | 8 +-
.../workbench/app/views/users/_show_admin.html.erb | 2 +-
apps/workbench/app/views/users/_tables.html.erb | 6 +-
apps/workbench/app/views/users/setup_popup.js.erb | 6 +-
apps/workbench/config/routes.rb | 1 +
.../actions_controller_test.rb | 0
.../api_client_authorizations_controller_test.rb | 0
.../application_controller_test.rb | 4 +
.../authorized_keys_controller_test.rb | 0
.../controllers/collections_controller_test.rb | 247 ++++++++++++++++
.../groups_controller_test.rb | 0
.../humans_controller_test.rb | 0
.../job_tasks_controller_test.rb | 0
.../jobs_controller_test.rb | 0
.../keep_disks_controller_test.rb | 0
.../links_controller_test.rb | 0
.../logs_controller_test.rb | 0
.../nodes_controller_test.rb | 0
.../pipeline_instances_controller_test.rb | 171 +++++++++--
.../pipeline_templates_controller_test.rb | 0
.../projects_controller_test.rb | 0
.../repositories_controller_test.rb | 0
.../sessions_controller_test.rb | 0
.../specimens_controller_test.rb | 0
.../traits_controller_test.rb | 0
.../user_agreements_controller_test.rb | 0
.../users_controller_test.rb | 2 +-
.../virtual_machines_controller_test.rb | 0
apps/workbench/test/diagnostics_test_helper.rb | 5 +
apps/workbench/test/functional/.gitkeep | 0
.../test/functional/collections_controller_test.rb | 229 ---------------
.../pipeline_instances_controller_test.rb | 157 -----------
.../test/helpers/pipeline_instances_helper_test.rb | 38 +++
.../test/integration/application_layout_test.rb | 5 +
.../workbench/test/integration/collections_test.rb | 31 +-
apps/workbench/test/integration/projects_test.rb | 38 ++-
apps/workbench/test/integration/websockets_test.rb | 41 +++
apps/workbench/test/test_helper.rb | 72 ++++-
.../vendor/assets/javascripts/jquery.number.min.js | 2 +
doc/sdk/cli/subcommands.html.textile.liquid | 2 +-
doc/user/topics/arv-run.html.textile.liquid | 4 +-
docker/passenger/Dockerfile | 2 +-
sdk/cli/bin/crunch-job | 75 ++---
sdk/python/arvados/collection.py | 36 ++-
sdk/python/tests/test_collections.py | 14 +
services/api/Gemfile | 4 +-
services/api/Gemfile.lock | 18 +-
.../app/controllers/arvados/v1/nodes_controller.rb | 13 +-
.../api/app/controllers/database_controller.rb | 62 ++++
services/api/app/models/database_seeds.rb | 11 +
services/api/config/routes.rb | 6 +
services/api/db/seeds.rb | 10 +-
services/api/lib/current_api_client.rb | 3 +-
services/api/lib/eventbus.rb | 27 +-
services/api/lib/simulate_job_log.rb | 49 ++++
services/api/lib/tasks/replay_job_log.rake | 7 +
services/api/script/crunch-dispatch.rb | 12 +-
.../test/fixtures/api_client_authorizations.yml | 6 +
services/api/test/fixtures/groups.yml | 4 +-
services/api/test/fixtures/users.yml | 16 ++
.../functional/arvados/v1/nodes_controller_test.rb | 8 +
.../test/functional/database_controller_test.rb | 47 ++++
.../api/test/integration/database_reset_test.rb | 75 +++++
services/api/test/integration/errors_test.rb | 2 +-
services/api/test/job_logs/crunchstatshort.log | 1 +
services/api/test/test_helper.rb | 4 +
services/fuse/arvados_fuse/__init__.py | 99 ++++---
services/fuse/setup.py | 2 +-
services/fuse/tests/test_mount.py | 178 +++++-------
101 files changed, 1747 insertions(+), 944 deletions(-)
rename apps/workbench/test/{functional => controllers}/actions_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/api_client_authorizations_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/application_controller_test.rb (98%)
rename apps/workbench/test/{functional => controllers}/authorized_keys_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/groups_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/humans_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/job_tasks_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/jobs_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/keep_disks_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/links_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/logs_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/nodes_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/pipeline_templates_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/projects_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/repositories_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/sessions_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/specimens_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/traits_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/user_agreements_controller_test.rb (100%)
rename apps/workbench/test/{functional => controllers}/users_controller_test.rb (96%)
rename apps/workbench/test/{functional => controllers}/virtual_machines_controller_test.rb (100%)
delete mode 100644 apps/workbench/test/functional/.gitkeep
delete mode 100644 apps/workbench/test/functional/collections_controller_test.rb
delete mode 100644 apps/workbench/test/functional/pipeline_instances_controller_test.rb
create mode 100644 apps/workbench/test/helpers/pipeline_instances_helper_test.rb
create mode 100644 apps/workbench/vendor/assets/javascripts/jquery.number.min.js
create mode 100644 services/api/app/controllers/database_controller.rb
create mode 100644 services/api/app/models/database_seeds.rb
create mode 100644 services/api/lib/simulate_job_log.rb
create mode 100644 services/api/lib/tasks/replay_job_log.rake
create mode 100644 services/api/test/functional/database_controller_test.rb
create mode 100644 services/api/test/integration/database_reset_test.rb
create mode 100644 services/api/test/job_logs/crunchstatshort.log
via 1701a77ed3bfbdf226d5877153f0ec393a8ec2e7 (commit)
via 7bc525d5a14a19c4dbbe89e71516372a5190c4b3 (commit)
via fd20255387eccdcc9bf05f61131dca4835f1a57d (commit)
via 1c8feea9305ca6fa78ddf1875f893304c3739db8 (commit)
via a7027755c735dcc063337fd3480606560c9783c2 (commit)
via dba925a5f1f7b566033bc993dacc0e9ec4e6dc57 (commit)
via db09f10caad8043d73834e5cad99f9235ec4fb4b (commit)
via f59d6d76acf9c6f5bb95c5902b2c9a1cca427e93 (commit)
via 1f48e58568dc961fd1e606c1d9bc250de8c010f7 (commit)
via 9ea14a3e491b80ade4c7faadda723d9ccc1dd535 (commit)
via 543d39eadf7ac0157cc79ecf8c09d3a61dd5c4fe (commit)
via 34d7bf56de6e43ff7f787e112ee88ffbc3056880 (commit)
via 994fa4569b8da43486719ce0da770ab1887b24b9 (commit)
via 743394c6ec6c9bd10a434e1b79afa5edc20a71ba (commit)
via 34a7e1ea48470ba540bc7d18de4836b0bb9197f8 (commit)
via 96106abd75ae0e6edff91939ab412bde22b1dd66 (commit)
via 43036ec0489dff57d62e67dfeeaf58ce6dae35f6 (commit)
via dd446f12e7539d7e7acc295f96a6b90b4d2c2902 (commit)
via b870e7c0be3457257ea445fe54a1893e874530e1 (commit)
via 0cc93f8d08a343e61575eace0e76e1a243412504 (commit)
via aacc78d5403686ea326eda6bae3896f9725f9506 (commit)
via 19e02c2bbb7f9d8db25d0b670124e29a08145843 (commit)
via 39b166626a00b68780526ae4607bbbcf34d24a04 (commit)
via e7439285d7a7b8d5deff066264b1207c311331d8 (commit)
via 8f5e45c6617beb7151b6f10779713290c4d05c1a (commit)
via e08f41fd388d9aca6f34a72c1ac011f6e87a1029 (commit)
via 1af2d4f71f6a7ba4374f8490ef1b4f0b972e2dec (commit)
via bce68441123f4081e63b3fbefc82b60ee071b457 (commit)
via d51224880c6524fd1b47543f3f312c3a000805c1 (commit)
via 0ecbb08536d02433272e62cf1878edd7927f66e1 (commit)
via 59a100ec439092d24dd918cc4e9ed875b52797b5 (commit)
via 6c36016f708ce91a4287bd2723827d009ba93a1d (commit)
via 6cd08f799a2feb762ec8dc031675ea815726d755 (commit)
via a06d87af46cb235b9764d9383e46c3e02823c49c (commit)
via 7f83b8600e45216c2de47cad06b7eaff4ad5c9cd (commit)
via 5c1e1fb0f579ef02272002409dc2607608885ab6 (commit)
via ce9f11911e57b6d79e44f510d47703ca8a3fcd9c (commit)
via 0e24e2fd257b7aa27e04fa4376b5297d331a6a99 (commit)
via 11bfce50c0ed1519d764ede1538bcfb72c244019 (commit)
via 46aee7d3bec5676e054bddc38633b2775f3a0fd6 (commit)
via eee13aa7003afff6ccf390ac92fe2b4a525d16f9 (commit)
via 6b7f891f5a2d313837fbe59149f0f4f8c3b16443 (commit)
via cedbb7fc9b07c25ccd57e991c61f5730ebf8c4bb (commit)
via 3270fbf5a3cbd121dad7327513d5a5866c3583c4 (commit)
via d4fa74e36661d22e998dd5a59c21e384284769c7 (commit)
via 72aa70eec7693bfb5d46a4bdac3619b3c6b1f79c (commit)
via 24c8862af669479c83cc340f0ba061489dec677f (commit)
via 95fd4dd7f982a343ec45d188bdbdcc9950df6e93 (commit)
via ed0067ee9964c70f646a5f4f72c1302cc19c007c (commit)
via af3d57d7eeb458e598c9d3954942db7e1d28b780 (commit)
via efc3cdc7eb9f5c90c71edcf4d3f27667a8fce5e9 (commit)
via fc2824f30bd7e87e85b6329cbb44d3c7259c2676 (commit)
via 4b0934a2bb95509468fc4b6132177d47cc7988a8 (commit)
via 98fd0639a6703084ad9877d9713b8fa4a8dfb03d (commit)
via f20ae9938c84f48954246a732be7c2f02ff848af (commit)
via 2bca6945ae26ff552979838ea4db379e6ab3dca6 (commit)
via 76d462c11597c4e2def7bc812bc2276b25e3ae5c (commit)
via 5f7b9f0177ca5a045eddb791116f5e6ff823f7fc (commit)
via 874c563b85eaa144930dd0c25dcc0b455003a867 (commit)
via 968526e233fede288bf332aab724c170fe88345c (commit)
via f4804e16eadabb6fa601449ef332a4235358c503 (commit)
via 9d281577e42c6f8411cc3ee9954134b771499624 (commit)
via f3460b2f2e8088e861d1852e4f26784b3c96ded8 (commit)
via 7e828d4672d2b306bccacfed309123c81846d565 (commit)
via 437d4225617df22b4e6d9c245f854620cdc09bc7 (commit)
via e3914c4981a48d086562bcdc45f0d385f95fc083 (commit)
via a69a1cb084e6feb9e4e9c6538a52289e7c56700b (commit)
via 1af3397c28837ff61d3538e14b7358281b38097a (commit)
via 7ab6b64c5fa3b958752ecb22751630b6e1016bd1 (commit)
via 76eaaac9fed4e74b8073ee08f99b84fc7922ac9f (commit)
via 64756c0a3ef66cb37969f2bb594a56fb1a5ab40c (commit)
via dc706977b754f7b5b0e5835ef80a2b59bc1773f8 (commit)
via e65d698ab39cb44cf12630498ac75b475bedec44 (commit)
via 244dddbbee9db8bc6fbc186462de9fe1986ea99d (commit)
via cbd9b9702b30ff610403c3f8630144630cdaafba (commit)
via 5aecf0f1c591bc1f473b6bb56715ce8db5013268 (commit)
via f8991d36180bf9c2c261dee519b0c878306a35d5 (commit)
via bc206979ee82a00374838fff3044dcaf33338f02 (commit)
via 8f8a99ce94818a5dbe372d8704ab396bff897489 (commit)
via 45e0087ddae93d37206e539296e2ccd84391d46b (commit)
via 23616a315b032181958ef05772870caa2eaf1277 (commit)
via 6b49793347e98146ec96373a6b48f56fac46b881 (commit)
via 5ac72e336a49d5a07e9ee36ba1f50473c57c45ec (commit)
via caaa4ae5c95c0f4b7a62702a4371bc9838661e72 (commit)
via eb26344db7daf2a595fa98fc72aee00b88e1633f (commit)
via 75634adbcd7caebd58fad84f74feb5e1152a1254 (commit)
via 13efb6304b9fcbe0fd3b496c751184c7aa1cc4d0 (commit)
via 37a96c457032ea9660c6342790667dcdb54b9609 (commit)
via 5ea9de16b0500d7006ce5c7afd8e0776c4c588ca (commit)
via 551258ddbe76b3ba8a9e741e42b3ae85914adb86 (commit)
via 9f1c3e8177ffee8503a885bbb6786e7e42d3e257 (commit)
via e9835b9e368b23c4c2d8a0e0395456254ae1257d (commit)
via 80649ee8eb1138e7a44ebb750ae62c675b193000 (commit)
via 0e7cfa403cb80fc68d6c10c4c912e4d618fa085a (commit)
via 84ff06d37f920ef6cf400189ea19edcf6158993c (commit)
via a65acb3945d8646c616b4f8a2654d1a346fdaf2d (commit)
via e9a19734c359fa52ec07a3ea4bb81b6382864596 (commit)
via 7b9112dbc270ea338fee756f583bb76870f2e391 (commit)
via 854af8067c6486193eb00917e2515f81ba776770 (commit)
via 057d1e8a92c1333b6bd666d4d56c7d0e305265ae (commit)
via f2652e70c70db7a9a068c5a9bc8c6ec6566a14c6 (commit)
via e5d3458808720f0b2ad25ba2b2be6a867b9d836e (commit)
via b40e379090ff9a01db439a7d4b3b2162d150f89a (commit)
via 3167e5659918f4679d48bcc7f1fda4c3e4ef096f (commit)
via 8bb852474590b57c2476b0972100c4659dc60815 (commit)
via c0d9c656eefcb684c72fd2a1bca20b8b9c60df96 (commit)
via 14f2906a390d957bc17a9951667daf1eada37e47 (commit)
via 524fba52b54d45e905d0b6603d45b6442f7813fe (commit)
via d99ef829ba0fce58c3ba928ad2a2aefeb7f9a0ac (commit)
via 9d4b0f36a978111fbd67fceb0ffb9e28d32aec14 (commit)
via 26321ce3b54a0696982d55dabec7ff8082b146b9 (commit)
via 07ad3d1e604624893a945d08666046cc69568dab (commit)
via 73a8436194e335cfa3e208b2cc86350a2c35ae57 (commit)
via 7139cabb0d75c946b53c128676d0597881ae2700 (commit)
via ec988adb09485a9d2c9c0315300b0ad52afc07ef (commit)
via e9ccda58ac1b7334cfeee8ab23dd37d9bf3f534d (commit)
via 8aad5da5ec6c5fb29b513fbd340b64ce886127e0 (commit)
via c8d0498d60f99c1564a68fb6f613875840ca270c (commit)
via 05c6711bac76f5270a2979c9d2ff767a686797d5 (commit)
via f2cf5a532e7dee1ab68948db89272a0e2579e781 (commit)
via cb03f98d530626bc31c55acdcf6e60f9596fc759 (commit)
via 768f5281784b419e4d5617cb34e89298d1899a59 (commit)
via bce765931ead12469cb1d363a7974c3380191df6 (commit)
via 23cebe864f7fe128aa784ef31fc14d0f3455aea5 (commit)
via 708772bcec89c9abe02ceb3ed977a0f15091033d (commit)
via 73c02220c31cd631b75b707d93709c8a60c21207 (commit)
from 29b0dccdf90d3cf1e7472f0653cc9a38cbbadc26 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 1701a77ed3bfbdf226d5877153f0ec393a8ec2e7
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Dec 4 15:04:44 2014 -0500
3781: Use $.each for simple loops.
diff --git a/apps/workbench/app/assets/javascripts/upload_to_collection.js b/apps/workbench/app/assets/javascripts/upload_to_collection.js
index 89c6c3d..5e93d4e 100644
--- a/apps/workbench/app/assets/javascripts/upload_to_collection.js
+++ b/apps/workbench/app/assets/javascripts/upload_to_collection.js
@@ -401,9 +401,7 @@ function UploadToCollection($scope, $filter, $q, $timeout,
{ uuid: $scope.uuid }).
then(function(collection) {
var manifestText = '';
- var upload, i;
- for (i=0; i<uploads.length; i++) {
- upload = uploads[i];
+ $.each(uploads, function(_, upload) {
filename = ArvadosClient.uniqueNameForManifest(
collection.manifest_text,
'.', upload.file.name);
@@ -412,7 +410,7 @@ function UploadToCollection($scope, $filter, $q, $timeout,
' 0:' + upload.file.size.toString() + ':' +
filename +
'\n';
- }
+ });
return ArvadosClient.apiPromise(
'collections', 'update',
{ uuid: $scope.uuid,
@@ -422,10 +420,9 @@ function UploadToCollection($scope, $filter, $q, $timeout,
}).
then(deferred.resolve);
}, onQueueReject).then(function() {
- var i;
- for(i=0; i<uploads.length; i++) {
- uploads[i].committed = true;
- }
+ $.each(uploads, function(_, upload) {
+ upload.committed = true;
+ });
});
return deferred.promise.then(doQueueWork);
}
commit 7bc525d5a14a19c4dbbe89e71516372a5190c4b3
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Dec 4 14:59:57 2014 -0500
3781: Deobfuscate.
diff --git a/apps/workbench/app/assets/javascripts/upload_to_collection.js b/apps/workbench/app/assets/javascripts/upload_to_collection.js
index 67c1b98..89c6c3d 100644
--- a/apps/workbench/app/assets/javascripts/upload_to_collection.js
+++ b/apps/workbench/app/assets/javascripts/upload_to_collection.js
@@ -23,13 +23,18 @@ function UploadToCollection($scope, $filter, $q, $timeout,
// Angular binding doesn't work its usual magic for file
// inputs, so we need to $scope.$apply() this update.
$scope.$apply(function(){
- var i;
- var insertAt;
- for (insertAt=0; (insertAt<$scope.uploadQueue.length &&
- $scope.uploadQueue[insertAt].state !== 'Done');
- insertAt++);
+ var i, nItemsTodo;
+ // Add these new files after the items already waiting
+ // in the queue -- but before the items that are
+ // 'Done' and have therefore been pushed to the
+ // bottom.
+ for (nItemsTodo = 0;
+ (nItemsTodo < $scope.uploadQueue.length &&
+ $scope.uploadQueue[nItemsTodo].state !== 'Done'); ) {
+ nItemsTodo++;
+ }
for (i=0; i<files.length; i++) {
- $scope.uploadQueue.splice(insertAt+i, 0,
+ $scope.uploadQueue.splice(nItemsTodo+i, 0,
new FileUploader(files[i]));
}
});
@@ -340,14 +345,21 @@ function UploadToCollection($scope, $filter, $q, $timeout,
return doQueueWork();
}
function doQueueWork() {
- var i;
+ var nItemsDone;
that.state = 'Running';
that.stateReason = null;
- // Push the done things to the bottom of the queue.
- for (i=0; (i<$scope.uploadQueue.length &&
- $scope.uploadQueue[i].state === 'Done'); i++);
- if (i>0)
- $scope.uploadQueue.push.apply($scope.uploadQueue, $scope.uploadQueue.splice(0, i));
+ // Are there any Done things at the top of the queue?
+ for (nItemsDone = 0;
+ (nItemsDone < $scope.uploadQueue.length &&
+ $scope.uploadQueue[nItemsDone].state === 'Done'); ) {
+ nItemsDone++;
+ }
+ // If so, push them down to the bottom of the queue.
+ if (nItemsDone > 0) {
+ $scope.uploadQueue.push.apply(
+ $scope.uploadQueue,
+ $scope.uploadQueue.splice(0, nItemsDone));
+ }
// If anything is not-done, do it.
if ($scope.uploadQueue.length > 0 &&
$scope.uploadQueue[0].state !== 'Done') {
commit fd20255387eccdcc9bf05f61131dca4835f1a57d
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Dec 4 14:34:23 2014 -0500
3781: Use ===, !== instead of ==, !=
diff --git a/apps/workbench/app/assets/javascripts/upload_to_collection.js b/apps/workbench/app/assets/javascripts/upload_to_collection.js
index 027c54e..67c1b98 100644
--- a/apps/workbench/app/assets/javascripts/upload_to_collection.js
+++ b/apps/workbench/app/assets/javascripts/upload_to_collection.js
@@ -26,7 +26,7 @@ function UploadToCollection($scope, $filter, $q, $timeout,
var i;
var insertAt;
for (insertAt=0; (insertAt<$scope.uploadQueue.length &&
- $scope.uploadQueue[insertAt].state != 'Done');
+ $scope.uploadQueue[insertAt].state !== 'Done');
insertAt++);
for (i=0; i<files.length; i++) {
$scope.uploadQueue.splice(insertAt+i, 0,
@@ -81,7 +81,7 @@ function UploadToCollection($scope, $filter, $q, $timeout,
return _deferred.promise();
}
function resolve() {
- if (that._reader.result.length != that._slice.size) {
+ if (that._reader.result.length !== that._slice.size) {
// Sometimes we get an onload event even if the read
// did not return the desired number of bytes. We
// treat that as a fail.
@@ -237,7 +237,7 @@ function UploadToCollection($scope, $filter, $q, $timeout,
}
function onUploaderResolve(locator, dataSize) {
var sizeHint = (''+locator).split('+')[1];
- if (!locator || parseInt(sizeHint) != dataSize) {
+ if (!locator || parseInt(sizeHint) !== dataSize) {
console.log("onUploaderResolve, but locator '" + locator +
"' with size hint '" + sizeHint +
"' does not look right for dataSize=" + dataSize);
@@ -265,7 +265,7 @@ function UploadToCollection($scope, $filter, $q, $timeout,
_maxBlobSize,
that.file.size - _readPos);
setProgress(_readPos);
- if (size == 0) {
+ if (size === 0) {
return false;
}
var blob = that.file.slice(
@@ -282,9 +282,9 @@ function UploadToCollection($scope, $filter, $q, $timeout,
that.statistics = (
'' + $filter('number')(bytesDone/1024, '0') + ' KiB ' +
'at ~' + $filter('number')(kBps, '0') + ' KiB/s')
- if (that.state == 'Paused') {
+ if (that.state === 'Paused') {
that.statistics += ', paused';
- } else if (that.state == 'Uploading') {
+ } else if (that.state === 'Uploading') {
that.statistics += ', ETA ' +
$filter('date')(
new Date(
@@ -314,7 +314,7 @@ function UploadToCollection($scope, $filter, $q, $timeout,
var that = this;
var _deferred;
function go() {
- if (that.state == 'Running') return _deferred.promise;
+ if (that.state === 'Running') return _deferred.promise;
_deferred = $.Deferred();
that.state = 'Running';
ArvadosClient.apiPromise(
@@ -345,12 +345,12 @@ function UploadToCollection($scope, $filter, $q, $timeout,
that.stateReason = null;
// Push the done things to the bottom of the queue.
for (i=0; (i<$scope.uploadQueue.length &&
- $scope.uploadQueue[i].state == 'Done'); i++);
+ $scope.uploadQueue[i].state === 'Done'); i++);
if (i>0)
$scope.uploadQueue.push.apply($scope.uploadQueue, $scope.uploadQueue.splice(0, i));
// If anything is not-done, do it.
if ($scope.uploadQueue.length > 0 &&
- $scope.uploadQueue[0].state != 'Done') {
+ $scope.uploadQueue[0].state !== 'Done') {
return $scope.uploadQueue[0].go().
then(appendToCollection, null, onQueueProgress).
then(doQueueWork, onQueueReject);
commit 1c8feea9305ca6fa78ddf1875f893304c3739db8
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Dec 4 14:03:13 2014 -0500
3781: Fix error message, and add actual error detection.
diff --git a/apps/workbench/app/assets/javascripts/upload_to_collection.js b/apps/workbench/app/assets/javascripts/upload_to_collection.js
index 82331bc..027c54e 100644
--- a/apps/workbench/app/assets/javascripts/upload_to_collection.js
+++ b/apps/workbench/app/assets/javascripts/upload_to_collection.js
@@ -236,9 +236,11 @@ function UploadToCollection($scope, $filter, $q, $timeout,
onUploaderProgress);
}
function onUploaderResolve(locator, dataSize) {
- if (!locator || _currentSlice.size != dataSize) {
- console.log("onUploaderResolve but locator=" + locator +
- " and " + _currentSlice.size + " != " + dataSize);
+ var sizeHint = (''+locator).split('+')[1];
+ if (!locator || parseInt(sizeHint) != dataSize) {
+ console.log("onUploaderResolve, but locator '" + locator +
+ "' with size hint '" + sizeHint +
+ "' does not look right for dataSize=" + dataSize);
return onUploaderReject({
textStatus: "error",
err: "Bad response from slice upload"
commit a7027755c735dcc063337fd3480606560c9783c2
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Dec 4 13:39:04 2014 -0500
3781: Fix up comments.
diff --git a/apps/workbench/app/assets/javascripts/upload_to_collection.js b/apps/workbench/app/assets/javascripts/upload_to_collection.js
index f3ae5d8..82331bc 100644
--- a/apps/workbench/app/assets/javascripts/upload_to_collection.js
+++ b/apps/workbench/app/assets/javascripts/upload_to_collection.js
@@ -57,7 +57,7 @@ function UploadToCollection($scope, $filter, $q, $timeout,
return found;
}
});
- // TODO: watch uploadQueue, abort uploads if entries disappear
+ ////////////////////////////////
var keepProxy;
diff --git a/apps/workbench/app/views/collections/_show_upload.html.erb b/apps/workbench/app/views/collections/_show_upload.html.erb
index 13e409d..d0ef730 100644
--- a/apps/workbench/app/views/collections/_show_upload.html.erb
+++ b/apps/workbench/app/views/collections/_show_upload.html.erb
@@ -1,5 +1,5 @@
<div class="arv-log-refresh-control"
- data-load-throttle="86486400000" <%# 1001 nights %>
+ data-load-throttle="86486400000" <%# 1001 nights (in milliseconds) %>
></div>
<div ng-cloak ng-controller="UploadToCollection" arv-uuid="<%= @object.uuid %>">
<div class="panel panel-primary">
commit dba925a5f1f7b566033bc993dacc0e9ec4e6dc57
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Dec 4 13:34:59 2014 -0500
3781: Disable start button when there is nothing to do.
diff --git a/apps/workbench/app/assets/javascripts/upload_to_collection.js b/apps/workbench/app/assets/javascripts/upload_to_collection.js
index 107e03e..f3ae5d8 100644
--- a/apps/workbench/app/assets/javascripts/upload_to_collection.js
+++ b/apps/workbench/app/assets/javascripts/upload_to_collection.js
@@ -47,14 +47,14 @@ function UploadToCollection($scope, $filter, $q, $timeout,
if (wasRunning)
$scope.go();
},
- countDone: function() {
- var done=0;
- for (var i=0; i<$scope.uploadQueue.length; i++) {
- if ($scope.uploadQueue[i].state == 'Done') {
- ++done;
+ countInStates: function(want_states) {
+ var found = 0;
+ $.each($scope.uploadQueue, function() {
+ if (want_states.indexOf(this.state) >= 0) {
+ ++found;
}
- }
- return done;
+ });
+ return found;
}
});
// TODO: watch uploadQueue, abort uploads if entries disappear
diff --git a/apps/workbench/app/views/collections/_show_upload.html.erb b/apps/workbench/app/views/collections/_show_upload.html.erb
index 855b91e..13e409d 100644
--- a/apps/workbench/app/views/collections/_show_upload.html.erb
+++ b/apps/workbench/app/views/collections/_show_upload.html.erb
@@ -9,7 +9,7 @@
<input type="file" multiple ng-model="incoming" onchange="angular.element(this).scope().addFilesToQueue(this.files); $(this).val('');">
<div class="btn-group btn-group-sm" role="group" style="margin-top: 1.5em">
<button type="button" class="btn btn-default" ng-click="stop()" ng-disabled="uploader.state != 'Running'"><i class="fa fa-fw fa-pause"></i> Pause</button>
- <button type="button" class="btn btn-primary" ng-click="go()" ng-disabled="uploader.state == 'Running' || uploadQueue.length == 0"><i class="fa fa-fw fa-play"></i> Start</button>
+ <button type="button" class="btn btn-primary" ng-click="go()" ng-disabled="uploader.state == 'Running' || countInStates(['Paused', 'Queued']) == 0"><i class="fa fa-fw fa-play"></i> Start</button>
</div>
</div>
<div class="col-sm-8">
@@ -17,8 +17,8 @@
class="alert alert-info"
><i class="fa fa-gear"></i>
Upload in progress.
- <span ng-show="countDone() > 0">
- {{countDone()}} file{{countDone()>1?'s':''}} finished.
+ <span ng-show="countInStates(['Done']) > 0">
+ {{countInStates(['Done'])}} file{{countInStates(['Done'])>1?'s':''}} finished.
</span>
</div>
<div ng-show="uploader.state == 'Idle' && uploader.stateReason"
commit db09f10caad8043d73834e5cad99f9235ec4fb4b
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Dec 4 13:16:27 2014 -0500
3781: Report as KiB instead of K.
diff --git a/apps/workbench/app/assets/javascripts/upload_to_collection.js b/apps/workbench/app/assets/javascripts/upload_to_collection.js
index 267543c..107e03e 100644
--- a/apps/workbench/app/assets/javascripts/upload_to_collection.js
+++ b/apps/workbench/app/assets/javascripts/upload_to_collection.js
@@ -278,8 +278,8 @@ function UploadToCollection($scope, $filter, $q, $timeout,
kBps = (bytesDone - _startByte) /
(Date.now() - _startTime);
that.statistics = (
- '' + $filter('number')(bytesDone/1024, '0') + 'K ' +
- 'at ~' + $filter('number')(kBps, '0') + 'K/s')
+ '' + $filter('number')(bytesDone/1024, '0') + ' KiB ' +
+ 'at ~' + $filter('number')(kBps, '0') + ' KiB/s')
if (that.state == 'Paused') {
that.statistics += ', paused';
} else if (that.state == 'Uploading') {
diff --git a/apps/workbench/app/views/collections/_show_upload.html.erb b/apps/workbench/app/views/collections/_show_upload.html.erb
index f85f628..855b91e 100644
--- a/apps/workbench/app/views/collections/_show_upload.html.erb
+++ b/apps/workbench/app/views/collections/_show_upload.html.erb
@@ -48,7 +48,7 @@
</span>
</div>
<div class="col-sm-1" style="text-align: right">
- {{upload.file.size/1024 | number:0}}K
+ {{upload.file.size/1024 | number:0}} KiB
</div>
<div class="col-sm-2">
<div class="progress">
commit f59d6d76acf9c6f5bb95c5902b2c9a1cca427e93
Merge: 29b0dcc 1f48e58
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Dec 4 13:03:20 2014 -0500
3781: Merge branch 'master' into 3781-browser-upload
Conflicts:
apps/workbench/app/assets/javascripts/application.js
apps/workbench/app/views/projects/show.html.erb
diff --cc apps/workbench/app/assets/javascripts/application.js
index 6b98fd9,796053b..63887b3
--- a/apps/workbench/app/assets/javascripts/application.js
+++ b/apps/workbench/app/assets/javascripts/application.js
@@@ -23,7 -23,9 +23,10 @@@
//= require bootstrap3-editable/bootstrap-editable
//= require bootstrap-tab-history
//= require wiselinks
+//= require angular
+ //= require raphael
+ //= require morris
+ //= require jquery.number.min
//= require_tree .
jQuery(function($){
diff --cc apps/workbench/app/views/projects/_show_dashboard.html.erb
index 0d71f94,40f319f..1fbe505
--- a/apps/workbench/app/views/projects/_show_dashboard.html.erb
+++ b/apps/workbench/app/views/projects/_show_dashboard.html.erb
@@@ -5,13 -5,13 +5,13 @@@
<div class="panel-heading"><span class="panel-title">Active pipelines</span>
<span class="pull-right">
<%= link_to(
-- choose_pipeline_templates_path(
-- title: 'Choose a pipeline to run:',
-- action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
-- action_href: pipeline_instances_path,
-- action_method: 'post',
-- action_data: {'selection_param' => 'pipeline_instance[pipeline_template_uuid]', 'pipeline_instance[owner_uuid]' => current_user.uuid, 'success' => 'redirect-to-created-object'}.to_json),
- { class: "btn btn-primary btn-xs", remote: true, method: 'get' }) do %>
- { class: "btn btn-primary btn-xs", remote: true }) do %>
++ choose_pipeline_templates_path(
++ title: 'Choose a pipeline to run:',
++ action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
++ action_href: pipeline_instances_path,
++ action_method: 'post',
++ action_data: {'selection_param' => 'pipeline_instance[pipeline_template_uuid]', 'pipeline_instance[owner_uuid]' => current_user.uuid, 'success' => 'redirect-to-created-object'}.to_json),
++ { class: "btn btn-primary btn-xs", remote: true }) do %>
<i class="fa fa-fw fa-gear"></i> Run a pipeline...
<% end %>
</span>
diff --cc apps/workbench/app/views/projects/show.html.erb
index 58d8f4e,7a9eda0..02e34d8
--- a/apps/workbench/app/views/projects/show.html.erb
+++ b/apps/workbench/app/views/projects/show.html.erb
@@@ -6,43 -6,28 +6,43 @@@
<% content_for :tab_line_buttons do %>
<% if @object.editable? %>
+ <div class="btn-group btn-group-sm">
+ <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Add data <span class="caret"></span></button>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <%= link_to(
+ choose_collections_path(
+ title: 'Choose a collection to copy into this project:',
+ multiple: true,
+ action_name: 'Copy',
+ action_href: actions_path(id: @object.uuid),
+ action_method: 'post',
+ action_data: {selection_param: 'selection[]', copy_selections_into_project: @object.uuid, success: 'page-refresh'}.to_json),
- { remote: true, method: 'get', title: "Copy a collection from another project into this one", data: {'event-after-select' => 'page-refresh', 'toggle' => 'dropdown'} }) do %>
++ { remote: true, title: "Copy a collection from another project into this one", data: {'event-after-select' => 'page-refresh', 'toggle' => 'dropdown'} }) do %>
+ <i class="fa fa-fw fa-clipboard"></i> ...from a different project
+ <% end %>
+ </li>
+ <li>
+ <%= link_to(collections_path(options: {ensure_unique_name: true}, collection: {manifest_text: "", name: "New collection", owner_uuid: @object.uuid}, redirect_to_anchor: 'Upload'), {
+ method: 'post',
+ title: "Upload files into a new collection",
+ data: {toggle: 'dropdown'}}) do %>
+ <i class="fa fa-fw fa-upload"></i> ...from your computer
+ <% end %>
+ </li>
+ </ul>
+ </div>
<%= link_to(
- choose_collections_path(
- title: 'Add data to project:',
- multiple: true,
- action_name: 'Add',
- action_href: actions_path(id: @object.uuid),
- action_method: 'post',
- action_data: {selection_param: 'selection[]', copy_selections_into_project: @object.uuid, success: 'page-refresh'}.to_json),
- { class: "btn btn-primary btn-sm", remote: true, title: "Add data to this project", data: {'event-after-select' => 'page-refresh'} }) do %>
- <i class="fa fa-fw fa-plus"></i> Add data...
- <% end %>
- <%= link_to(
-- choose_pipeline_templates_path(
-- title: 'Choose a pipeline to run:',
-- action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
-- action_href: pipeline_instances_path,
-- action_method: 'post',
-- action_data: {'selection_param' => 'pipeline_instance[pipeline_template_uuid]', 'pipeline_instance[owner_uuid]' => @object.uuid, 'success' => 'redirect-to-created-object'}.to_json),
- { class: "btn btn-primary btn-sm", remote: true, method: 'get', title: "Run a pipeline in this project" }) do %>
- { class: "btn btn-primary btn-sm", remote: true, title: "Run a pipeline in this project" }) do %>
++ choose_pipeline_templates_path(
++ title: 'Choose a pipeline to run:',
++ action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
++ action_href: pipeline_instances_path,
++ action_method: 'post',
++ action_data: {'selection_param' => 'pipeline_instance[pipeline_template_uuid]', 'pipeline_instance[owner_uuid]' => @object.uuid, 'success' => 'redirect-to-created-object'}.to_json),
++ { class: "btn btn-primary btn-sm", remote: true, title: "Run a pipeline in this project" }) do %>
<i class="fa fa-fw fa-gear"></i> Run a pipeline...
<% end %>
- <%= link_to projects_path({'project[owner_uuid]' => @object.uuid, 'options' => {'ensure_unique_name' => true}}), method: 'post', title: "Add a subproject to this project", class: 'btn btn-sm btn-primary' do %>
+ <%= link_to projects_path({'project[owner_uuid]' => @object.uuid, 'options' => {'ensure_unique_name' => true}}), method: :post, title: "Add a subproject to this project", class: 'btn btn-sm btn-primary' do %>
<i class="fa fa-fw fa-plus"></i>
Add a subproject
<% end %>
diff --cc apps/workbench/app/views/users/_add_ssh_key_popup.html.erb
index efa8cae,3bfaf69..98f54ef
--- a/apps/workbench/app/views/users/_add_ssh_key_popup.html.erb
+++ b/apps/workbench/app/views/users/_add_ssh_key_popup.html.erb
@@@ -14,9 -14,9 +14,9 @@@
<div class="modal-body">
<div> <%= link_to "Click here to learn about SSH keys in Arvados.",
- "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access-unix.html",
- "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access-unix.html",
-- style: "font-weight: bold",
-- target: "_blank" %>
++ "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access-unix.html",
++ style: "font-weight: bold",
++ target: "_blank" %>
</div>
<div class="form-group">
<label for="public_key">Public Key</label>
diff --cc apps/workbench/app/views/users/_manage_ssh_keys.html.erb
index 17b64b2,34dbb59..1ea8f0b
--- a/apps/workbench/app/views/users/_manage_ssh_keys.html.erb
+++ b/apps/workbench/app/views/users/_manage_ssh_keys.html.erb
@@@ -2,9 -2,9 +2,9 @@@
<% if !@my_ssh_keys.any? %>
<p> You have not yet set up an SSH public key for use with Arvados. </p>
<p> <%= link_to "Click here",
- "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access-unix.html",
- "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access-unix.html",
-- style: "font-weight: bold",
-- target: "_blank" %> to learn about SSH keys in Arvados.
++ "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access-unix.html",
++ style: "font-weight: bold",
++ target: "_blank" %> to learn about SSH keys in Arvados.
</p>
<p> When you have an SSH key you would like to use, add it using the <b>Add</b> button. </p>
<% else %>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list