[ARVADOS] updated: a789f895a5cdbc2a548787f99197f9861521106b

git at public.curoverse.com git at public.curoverse.com
Mon Aug 3 13:51:05 EDT 2015


Summary of changes:
 apps/workbench/app/controllers/users_controller.rb |  72 +--
 apps/workbench/app/views/layouts/body.html.erb     |  28 +-
 .../notifications/_ssh_key_notification.html.erb   |   5 +-
 ...rent_token.html.erb => _current_token.html.erb} |   4 +-
 .../app/views/users/_manage_account.html.erb       |   8 +-
 ...epositories.html.erb => _repositories.html.erb} |   6 +-
 ...manage_ssh_keys.html.erb => _ssh_keys.html.erb} |   4 +-
 ...achines.html.erb => _virtual_machines.html.erb} |   7 +-
 .../app/views/users/current_token.html.erb         |   1 +
 .../app/views/users/manage_current_token.html.erb  |   1 -
 .../app/views/users/manage_repositories.html.erb   |   2 -
 .../views/users/manage_virtual_machines.html.erb   |   1 -
 .../app/views/users/repositories.html.erb          |   2 +
 ...{manage_ssh_keys.html.erb => ssh_keys.html.erb} |   2 +-
 .../app/views/users/virtual_machines.html.erb      |   1 +
 apps/workbench/config/routes.rb                    |  10 +-
 .../test/controllers/users_controller_test.rb      |   4 +-
 .../test/integration/application_layout_test.rb    |  12 +-
 .../test/integration/user_manage_account_test.rb   |  63 ++-
 .../test/integration/user_profile_test.rb          |   8 +-
 doc/_includes/_install_git_curl.liquid             |  13 +
 doc/_includes/_install_ruby_and_bundler.liquid     |   9 +-
 doc/install/install-api-server.html.textile.liquid | 109 +++--
 .../install-compute-node.html.textile.liquid       |  20 +-
 doc/install/install-docker.html.textile.liquid     |   6 +-
 doc/install/install-sso.html.textile.liquid        | 236 +++++-----
 doc/sdk/cli/install.html.textile.liquid            |   8 +-
 sdk/cli/bin/crunch-job                             |  39 +-
 sdk/cli/test/binstub_clean_fail/mount              |   3 +
 sdk/cli/test/binstub_docker_noop/docker.io         |   2 +
 sdk/cli/test/binstub_sanity_check/docker.io        |   2 +
 sdk/cli/test/binstub_sanity_check/true             |   2 +
 sdk/cli/test/test_arv-collection-create.rb         |   2 -
 sdk/cli/test/test_arv-get.rb                       |  42 +-
 sdk/cli/test/test_arv-put.rb                       |  26 --
 sdk/cli/test/test_arv-run-pipeline-instance.rb     |   2 -
 sdk/cli/test/test_arv-tag.rb                       |   2 +-
 sdk/cli/test/test_crunch-job.rb                    | 126 ++++++
 sdk/perl/Makefile.PL                               |   7 +-
 sdk/python/arvados/commands/arv_copy.py            |   6 +-
 .../arvados/v1/repositories_controller.rb          | 136 ++++--
 services/api/app/models/arvados_model.rb           |  11 +-
 services/api/app/models/authorized_key.rb          |   4 +-
 services/api/app/models/commit.rb                  |  32 +-
 services/api/config/application.default.yml        | 486 +++++++++++----------
 services/api/config/application.yml.example        |  31 +-
 .../{database.yml.sample => database.yml.example}  |   0
 .../initializers/hardcoded_api_tokens.rb.example   |   3 -
 services/api/test/fixtures/links.yml               |  14 +
 .../arvados/v1/repositories_controller_test.rb     |  97 +++-
 services/api/test/unit/authorized_key_test.rb      |  46 +-
 51 files changed, 1096 insertions(+), 667 deletions(-)
 rename apps/workbench/app/views/users/{_manage_current_token.html.erb => _current_token.html.erb} (77%)
 rename apps/workbench/app/views/users/{_manage_repositories.html.erb => _repositories.html.erb} (89%)
 rename apps/workbench/app/views/users/{_manage_ssh_keys.html.erb => _ssh_keys.html.erb} (96%)
 rename apps/workbench/app/views/users/{_manage_virtual_machines.html.erb => _virtual_machines.html.erb} (92%)
 create mode 100644 apps/workbench/app/views/users/current_token.html.erb
 delete mode 100644 apps/workbench/app/views/users/manage_current_token.html.erb
 delete mode 100644 apps/workbench/app/views/users/manage_repositories.html.erb
 delete mode 100644 apps/workbench/app/views/users/manage_virtual_machines.html.erb
 create mode 100644 apps/workbench/app/views/users/repositories.html.erb
 rename apps/workbench/app/views/users/{manage_ssh_keys.html.erb => ssh_keys.html.erb} (73%)
 create mode 100644 apps/workbench/app/views/users/virtual_machines.html.erb
 create mode 100644 doc/_includes/_install_git_curl.liquid
 create mode 100755 sdk/cli/test/binstub_clean_fail/mount
 create mode 100755 sdk/cli/test/binstub_docker_noop/docker.io
 create mode 100755 sdk/cli/test/binstub_sanity_check/docker.io
 create mode 100755 sdk/cli/test/binstub_sanity_check/true
 create mode 100644 sdk/cli/test/test_crunch-job.rb
 rename services/api/config/{database.yml.sample => database.yml.example} (100%)
 delete mode 100644 services/api/config/initializers/hardcoded_api_tokens.rb.example

       via  a789f895a5cdbc2a548787f99197f9861521106b (commit)
       via  41bb13b71c8593134c2b34884249ca862b185e04 (commit)
       via  6988f4d44d2f8f7fc4aa2c381334c44d3133cf31 (commit)
       via  bb58564d632498a394ee75b07d17f41b724ef824 (commit)
       via  71e1b1d62a71ad052487f5e8ecb8f36ae17ca8e1 (commit)
       via  f3504dc2b40eaa4235092b671ce0bece43732904 (commit)
       via  5ef15a740ed578b2c5d3cc4ef28ef38bb1c433af (commit)
       via  a76d71558daa6b623c00c8e262840fc6dd68119f (commit)
       via  620fb9e0a294f8910ae82c9c38df69976f911c08 (commit)
       via  43a95731adfcf942fd9ab598c2b8e2c80911de0c (commit)
       via  31a61e326aa23228ab88bf83ff5866e8c7ca9d0a (commit)
       via  1b8caff3ad598744e4a0379b01fc95ca4838caa0 (commit)
       via  61da6612acb822a87fca157fe39757460213473f (commit)
       via  1000275df3e0b4207ae60d51d25b96f74bd06c23 (commit)
       via  465cb9225cce74600349239a295b1360ce2b0fa6 (commit)
       via  800e8ba4da76590c8cbe9801bef49a7ffb30bfbc (commit)
       via  70ce2cc8559b74907458797f7fbd8abb6e2c5a23 (commit)
       via  449c9871fb265f111251ee89669914652ac7b4c3 (commit)
       via  6dff0705fd3b4e0acde7bdf5821ef115ba74099b (commit)
       via  39fe0413aa14ff0ba41d790441c8621a877f61f8 (commit)
       via  415ecc439212c2a670b1df05c3e8b1a90245243e (commit)
       via  8e74a5f22b14f26d33c89dadf42600d417094009 (commit)
       via  157a17462d308d94c68bcdaa4dab055c0e5ccbe8 (commit)
       via  52c8fd376a75558657969cdf11955334e95d9e83 (commit)
       via  8797ab137a1d8824292a6f7202f6cd0c9744c4f9 (commit)
       via  8699ba0baf2e346f0adc7ca79f0a8b129f56b9a7 (commit)
       via  747e22c9341d00a3f093298a979175166e2898a7 (commit)
       via  a3d4fc92c1cfc2431adb55255793e0077c0a5bd1 (commit)
       via  eba475a918e4ae847ae6b5753016f2eb54e18085 (commit)
       via  ec752f92eff3990718d169fccc06a04ddc089578 (commit)
       via  db66ff7c2511f80f3795c388f314753064378543 (commit)
       via  7019bc98593c0603a2589d01cd028a242bf7f33f (commit)
       via  67813302a9e6d923d3c803b652929f3803cf6ece (commit)
       via  9fd9565ea0411b43943076add49d5bca2da8e379 (commit)
       via  5ac198c8fd7e329b08f344843fa5680add07566c (commit)
       via  607c3ded2ab3ad0c04ef2e3520ce1b507774dedb (commit)
       via  c0893f609643a73950957c0aa228f167579951d7 (commit)
      from  cda68ba838b2595c631231a08a8e3b3ea03d2c7f (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 a789f895a5cdbc2a548787f99197f9861521106b
Author: Manoj <jonam33 at gmail.com>
Date:   Mon Aug 3 13:49:27 2015 -0400

    6588: Changed routes to be under /users, used @object and updated
    tests.

diff --git a/apps/workbench/app/controllers/users_controller.rb b/apps/workbench/app/controllers/users_controller.rb
index 6cf15a8..4a88983 100644
--- a/apps/workbench/app/controllers/users_controller.rb
+++ b/apps/workbench/app/controllers/users_controller.rb
@@ -255,14 +255,14 @@ class UsersController < ApplicationController
     end
   end
 
-  def manage_repositories
+  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: current_user.uuid)
+    owned_repositories = Repository.where(owner_uuid: @object.uuid)
 
     @my_repositories = (Repository.where(uuid: repo_links.collect(&:head_uuid)) |
                         owned_repositories).
@@ -279,15 +279,11 @@ class UsersController < ApplicationController
     owned_repositories.each do |repo|
       @repo_writable[repo.uuid] = 'can_manage'
     end
-
-    respond_to do |f|
-      f.html { render template: 'users/manage_repositories' }
-    end
   end
 
-  def manage_virtual_machines
+  def virtual_machines
     @my_vm_logins = {}
-    Link.where(tail_uuid: current_user.uuid,
+    Link.where(tail_uuid: @object.uuid,
                link_class: 'permission',
                name: 'can_login').
           each do |perm_link|
@@ -297,66 +293,16 @@ class UsersController < ApplicationController
             end
           end
     @my_virtual_machines = VirtualMachine.where(uuid: @my_vm_logins.keys)
-
-    respond_to do |f|
-      f.html { render template: 'users/manage_virtual_machines' }
-    end
   end
 
-  def manage_ssh_keys
-    @my_ssh_keys = AuthorizedKey.where(key_type: 'SSH', owner_uuid: current_user.uuid)
-
-    @page = params["page"]
-    respond_to do |f|
-      f.html { render template: 'users/manage_ssh_keys' }
-    end
+  def ssh_keys
+    @my_ssh_keys = AuthorizedKey.where(key_type: 'SSH', owner_uuid: @object.uuid)
   end
 
   def manage_account
-    # repositories current user can read / write
-    repo_links = Link.
-      filter([['head_uuid', 'is_a', 'arvados#repository'],
-              ['tail_uuid', '=', current_user.uuid],
-              ['link_class', '=', 'permission'],
-             ])
-
-    owned_repositories = Repository.where(owner_uuid: current_user.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
-
-    # virtual machines the current user can login into
-    @my_vm_logins = {}
-    Link.where(tail_uuid: current_user.uuid,
-               link_class: 'permission',
-               name: 'can_login').
-          each do |perm_link|
-            if perm_link.properties.andand[:username]
-              @my_vm_logins[perm_link.head_uuid] ||= []
-              @my_vm_logins[perm_link.head_uuid] << perm_link.properties[:username]
-            end
-          end
-    @my_virtual_machines = VirtualMachine.where(uuid: @my_vm_logins.keys)
-
-    # current user's ssh keys
-    @my_ssh_keys = AuthorizedKey.where(key_type: 'SSH', owner_uuid: current_user.uuid)
-
-    respond_to do |f|
-      f.html { render template: 'users/manage_account' }
-    end
+    repositories
+    virtual_machines
+    ssh_keys
   end
 
   def add_ssh_key_popup
diff --git a/apps/workbench/app/views/layouts/body.html.erb b/apps/workbench/app/views/layouts/body.html.erb
index 4a17abb..73c0b8c 100644
--- a/apps/workbench/app/views/layouts/body.html.erb
+++ b/apps/workbench/app/views/layouts/body.html.erb
@@ -55,14 +55,30 @@
                   <%= current_user.email %>
                 </li>
                 <% if current_user.is_active %>
-                <li role="menuitem"><a href="/projects/<%=current_user.uuid%>" role="menuitem"><i class="fa fa-lg fa-home fa-fw"></i> My home project </a></li>
+                <li role="menuitem"><a href="/projects/<%=current_user.uuid%>" role="menuitem"><i class="fa fa-lg fa-home fa-fw"></i> Home project </a></li>
 
-                <li role="menuitem"><a href="/manage_virtual_machines" role="menuitem"><i class="fa fa-lg fa-terminal fa-fw"></i> My virtual machines</a></li>
-                <li role="menuitem"><a href="/manage_repositories" role="menuitem"><i class="fa fa-lg fa-code-fork fa-fw"></i> My repositories</a></li>
-                <li role="menuitem"><a href="/manage_current_token" role="menuitem"><i class="fa fa-lg fa-ticket fa-fw"></i> My current token</a></li>
-                <li role="menuitem"><a href="/manage_ssh_keys" role="menuitem"><i class="fa fa-lg fa-key fa-fw"></i> My SSH keys</a></li>
+                <li role="menuitem">
+                  <%= link_to virtual_machines_user_path(current_user), role: 'menu-item' do %>
+                    <i class="fa fa-lg fa-code-fork fa-fw"></i> Virtual machines
+                  <% end %>
+                </li>
+                <li role="menuitem">
+                  <%= link_to repositories_user_path(current_user), role: 'menu-item' do %>
+                    <i class="fa fa-lg fa-code-fork fa-fw"></i> Repositories
+                  <% end %>
+                </li>
+                <li role="menuitem"><a href="/current_token" role="menuitem"><i class="fa fa-lg fa-ticket fa-fw"></i> Current token</a></li>
+                <li role="menuitem">
+                  <%= link_to ssh_keys_user_path(current_user), role: 'menu-item' do %>
+                    <i class="fa fa-lg fa-key fa-fw"></i> SSH keys
+                  <% end %>
+                </li>
 
-                <li role="menuitem"><a href="/manage_account" role="menuitem"><i class="fa fa-lg fa-key fa-fw"></i> Manage account</a></li>
+                <li role="menuitem">
+                  <%= link_to manage_account_user_path(current_user), role: 'menu-item' do %>
+                    <i class="fa fa-lg fa-key fa-fw"></i> Manage account
+                  <% end %>
+                </li>
 
                 <% if Rails.configuration.user_profile_form_fields %>
                   <li role="menuitem"><a href="/users/<%=current_user.uuid%>/profile" role="menuitem"><i class="fa fa-lg fa-user fa-fw"></i> Manage profile</a></li>
diff --git a/apps/workbench/app/views/notifications/_ssh_key_notification.html.erb b/apps/workbench/app/views/notifications/_ssh_key_notification.html.erb
index 989db3d..382b988 100644
--- a/apps/workbench/app/views/notifications/_ssh_key_notification.html.erb
+++ b/apps/workbench/app/views/notifications/_ssh_key_notification.html.erb
@@ -1,6 +1,7 @@
    <%= image_tag "dax.png", class: "dax" %>
     <div>
       Hi, I noticed that you have not yet set up an SSH public key for use with Arvados.
-      <%= link_to "Click here to set up an SSH public key for use with Arvados.",
-      "/manage_account", style: "font-weight: bold" %>
+      <%= link_to ssh_keys_user_path(current_user) do %>
+        <b>Click here to set up an SSH public key for use with Arvados.</b>
+      <%end%>
     </div>
diff --git a/apps/workbench/app/views/users/_manage_current_token.html.erb b/apps/workbench/app/views/users/_current_token.html.erb
similarity index 77%
rename from apps/workbench/app/views/users/_manage_current_token.html.erb
rename to apps/workbench/app/views/users/_current_token.html.erb
index de601cb..2bf9f4d 100644
--- a/apps/workbench/app/views/users/_manage_current_token.html.erb
+++ b/apps/workbench/app/views/users/_current_token.html.erb
@@ -1,7 +1,7 @@
 <div class="panel panel-default">
   <div class="panel-heading">
     <h4 class="panel-title">
-      <a data-parent="#arv-adv-accordion" href="/manage_current_token">
+      <a data-parent="#arv-adv-accordion" href="/current_token">
         Current Token
       </a>
     </h4>
@@ -21,6 +21,6 @@ export ARVADOS_API_HOST_INSECURE=true
 unset ARVADOS_API_HOST_INSECURE
 <% end %>
 </pre>
-<p>Arvados <a href="/manage_virtual_machines"> virtual machines</a> do this for you automatically. This setup is needed only when you use the API remotely (e.g., from your own workstation).</p>
+<p>Arvados<%= link_to virtual_machines_user_path(current_user) do%> virtual machines<%end%> do this for you automatically. This setup is needed only when you use the API remotely (e.g., from your own workstation).</p>
 </div>
 </div>
diff --git a/apps/workbench/app/views/users/_manage_account.html.erb b/apps/workbench/app/views/users/_manage_account.html.erb
index 4a362cd..d648621 100644
--- a/apps/workbench/app/views/users/_manage_account.html.erb
+++ b/apps/workbench/app/views/users/_manage_account.html.erb
@@ -1,20 +1,20 @@
 <div class="col-sm-6">
   <div class="panel-group" id="arv-adv-accordion">
     <div class="panel panel-default">
-      <%= render partial: "manage_virtual_machines" %>
+      <%= render partial: "virtual_machines" %>
     </div>
     <div class="panel panel-default">
-      <%= render partial: "manage_repositories" %>
+      <%= render partial: "repositories" %>
     </div>
   </div>
 </div>
 <div class="col-sm-6">
   <div class="panel-group" id="arv-adv-accordion">
     <div class="panel panel-default">
-      <%= render partial: "manage_ssh_keys" %>
+      <%= render partial: "ssh_keys" %>
     </div>
     <div class="panel panel-default">
-      <%= render partial: "manage_current_token" %>
+      <%= render partial: "current_token" %>
     </div>
   </div>
   <div id="add-ssh-key-modal-window" class="modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>
diff --git a/apps/workbench/app/views/users/_manage_repositories.html.erb b/apps/workbench/app/views/users/_repositories.html.erb
similarity index 89%
rename from apps/workbench/app/views/users/_manage_repositories.html.erb
rename to apps/workbench/app/views/users/_repositories.html.erb
index b16e29d..d409b8c 100644
--- a/apps/workbench/app/views/users/_manage_repositories.html.erb
+++ b/apps/workbench/app/views/users/_repositories.html.erb
@@ -6,9 +6,9 @@
                     'data-target' => '#add-repository-modal'}  %>
     </div>
     <h4 class="panel-title">
-      <a data-parent="#arv-adv-accordion" href="/manage_repositories">
+      <%= link_to repositories_user_path(current_user) do%>
         Repositories
-      </a>
+      <%end%>
     </h4>
   </div>
 
@@ -62,4 +62,4 @@
 </div>
 </div>
   <p>When you are using an Arvados virtual machine, you should clone the https:// URLs. This will authenticate automatically using your API token.</p>
-  <p>In order to clone git repositories using SSH, <a href="/manage_ssh_keys"> add an SSH key to your account</a> and clone the git@ URLs.</p>
+  <p>In order to clone git repositories using SSH, <%= link_to ssh_keys_user_path(current_user) do%> add an SSH key to your account<%end%> and clone the git@ URLs.</p>
diff --git a/apps/workbench/app/views/users/_manage_ssh_keys.html.erb b/apps/workbench/app/views/users/_ssh_keys.html.erb
similarity index 96%
rename from apps/workbench/app/views/users/_manage_ssh_keys.html.erb
rename to apps/workbench/app/views/users/_ssh_keys.html.erb
index b3f9bdd..794e89c 100644
--- a/apps/workbench/app/views/users/_manage_ssh_keys.html.erb
+++ b/apps/workbench/app/views/users/_ssh_keys.html.erb
@@ -6,9 +6,9 @@
                     'data-target' => '#add-ssh-key-modal-window'}  %>
     </div>
     <h4 class="panel-title">
-      <a data-parent="#arv-adv-accordion" href="/manage_ssh_keys">
+      <%= link_to ssh_keys_user_path(current_user) do %>
         SSH Keys
-      </a>
+      <%end%>
     </h4>
   </div>
 
diff --git a/apps/workbench/app/views/users/_manage_virtual_machines.html.erb b/apps/workbench/app/views/users/_virtual_machines.html.erb
similarity index 92%
rename from apps/workbench/app/views/users/_manage_virtual_machines.html.erb
rename to apps/workbench/app/views/users/_virtual_machines.html.erb
index 65ecfff..fc54178 100644
--- a/apps/workbench/app/views/users/_manage_virtual_machines.html.erb
+++ b/apps/workbench/app/views/users/_virtual_machines.html.erb
@@ -1,9 +1,10 @@
 <div class="panel panel-default">
   <div class="panel-heading">
     <h4 class="panel-title">
-      <a data-parent="#arv-adv-accordion" href="/manage_virtual_machines">
+      <%= link_to virtual_machines_user_path(current_user) do %>
         Virtual Machines
-      </a>
+      <% end %>
+
     </h4>
   </div>
 
@@ -100,7 +101,7 @@
   <% end %>
 </div>
 </div>
-  <p>In order to access virtual machines using SSH, <a href="/manage_ssh_keys"> add an SSH key to your account</a> and add a section like this to your SSH configuration file ( <i>~/.ssh/config</i>):</p>
+  <p>In order to access virtual machines using SSH, <%= link_to ssh_keys_user_path(current_user) do%> add an SSH key to your account<%end%> and add a section like this to your SSH configuration file ( <i>~/.ssh/config</i>):</p>
     <pre>Host *.arvados
       TCPKeepAlive yes
       ServerAliveInterval 60
diff --git a/apps/workbench/app/views/users/current_token.html.erb b/apps/workbench/app/views/users/current_token.html.erb
new file mode 100644
index 0000000..82d828b
--- /dev/null
+++ b/apps/workbench/app/views/users/current_token.html.erb
@@ -0,0 +1 @@
+<%= render :partial => 'current_token' %>
diff --git a/apps/workbench/app/views/users/manage_current_token.html.erb b/apps/workbench/app/views/users/manage_current_token.html.erb
deleted file mode 100644
index 7129fa1..0000000
--- a/apps/workbench/app/views/users/manage_current_token.html.erb
+++ /dev/null
@@ -1 +0,0 @@
-<%= render :partial => 'manage_current_token' %>
diff --git a/apps/workbench/app/views/users/manage_repositories.html.erb b/apps/workbench/app/views/users/manage_repositories.html.erb
deleted file mode 100644
index 0182c4d..0000000
--- a/apps/workbench/app/views/users/manage_repositories.html.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= render :partial => 'manage_repositories' %>
-<%= render partial: "add_repository_modal" %>
diff --git a/apps/workbench/app/views/users/manage_virtual_machines.html.erb b/apps/workbench/app/views/users/manage_virtual_machines.html.erb
deleted file mode 100644
index 3f5fd00..0000000
--- a/apps/workbench/app/views/users/manage_virtual_machines.html.erb
+++ /dev/null
@@ -1 +0,0 @@
-<%= render :partial => 'manage_virtual_machines' %>
diff --git a/apps/workbench/app/views/users/repositories.html.erb b/apps/workbench/app/views/users/repositories.html.erb
new file mode 100644
index 0000000..98a1715
--- /dev/null
+++ b/apps/workbench/app/views/users/repositories.html.erb
@@ -0,0 +1,2 @@
+<%= render :partial => 'repositories' %>
+<%= render partial: "add_repository_modal" %>
diff --git a/apps/workbench/app/views/users/manage_ssh_keys.html.erb b/apps/workbench/app/views/users/ssh_keys.html.erb
similarity index 73%
rename from apps/workbench/app/views/users/manage_ssh_keys.html.erb
rename to apps/workbench/app/views/users/ssh_keys.html.erb
index 786d13f..d44e642 100644
--- a/apps/workbench/app/views/users/manage_ssh_keys.html.erb
+++ b/apps/workbench/app/views/users/ssh_keys.html.erb
@@ -1,2 +1,2 @@
-<%= render :partial => 'manage_ssh_keys' %>
+<%= render :partial => 'ssh_keys' %>
 <div id="add-ssh-key-modal-window" class="modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>
diff --git a/apps/workbench/app/views/users/virtual_machines.html.erb b/apps/workbench/app/views/users/virtual_machines.html.erb
new file mode 100644
index 0000000..2940b2b
--- /dev/null
+++ b/apps/workbench/app/views/users/virtual_machines.html.erb
@@ -0,0 +1 @@
+<%= render :partial => 'virtual_machines' %>
diff --git a/apps/workbench/config/routes.rb b/apps/workbench/config/routes.rb
index 86140cf..1b14f53 100644
--- a/apps/workbench/config/routes.rb
+++ b/apps/workbench/config/routes.rb
@@ -46,12 +46,12 @@ ArvadosWorkbench::Application.routes.draw do
     get 'setup_popup', :on => :member
     get 'profile', :on => :member
     post 'request_shell_access', :on => :member
+    get 'manage_account', :on => :member
+    get 'virtual_machines', :on => :member
+    get 'repositories', :on => :member
+    get 'ssh_keys', :on => :member
   end
-  get '/manage_virtual_machines' => 'users#manage_virtual_machines'
-  get '/manage_repositories' => 'users#manage_repositories'
-  get '/manage_current_token' => 'users#manage_current_token'
-  get '/manage_ssh_keys' => 'users#manage_ssh_keys'
-  get '/manage_account' => 'users#manage_account'
+  get '/current_token' => 'users#current_token'
   get "/add_ssh_key_popup" => 'users#add_ssh_key_popup', :as => :add_ssh_key_popup
   get "/add_ssh_key" => 'users#add_ssh_key', :as => :add_ssh_key
   resources :logs
diff --git a/apps/workbench/test/controllers/users_controller_test.rb b/apps/workbench/test/controllers/users_controller_test.rb
index 6b9cd6e..71354b8 100644
--- a/apps/workbench/test/controllers/users_controller_test.rb
+++ b/apps/workbench/test/controllers/users_controller_test.rb
@@ -32,7 +32,7 @@ class UsersControllerTest < ActionController::TestCase
   end
 
   test "show repositories with read, write, or manage permission" do
-    get :manage_account, {}, session_for(:active)
+    get :repositories, {id: api_fixture("users")['active']['uuid']}, session_for(:active)
     assert_response :success
     repos = assigns(:my_repositories)
     assert repos
@@ -43,7 +43,7 @@ class UsersControllerTest < ActionController::TestCase
   end
 
   test "show repositories lists linked as well as owned repositories" do
-    get :manage_account, {}, session_for(:active)
+    get :repositories, {id: api_fixture("users")['active']['uuid']}, session_for(:active)
     assert_response :success
     repos = assigns(:my_repositories)
     assert repos
diff --git a/apps/workbench/test/integration/application_layout_test.rb b/apps/workbench/test/integration/application_layout_test.rb
index b145635..28e43b3 100644
--- a/apps/workbench/test/integration/application_layout_test.rb
+++ b/apps/workbench/test/integration/application_layout_test.rb
@@ -49,8 +49,12 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
             assert page.has_no_link?('Not active'), 'Found link - Not active'
             assert page.has_no_link?('Sign agreements'), 'Found link - Sign agreements'
 
-            assert_selector "a[href=\"/projects/#{user['uuid']}\"]", text: 'My home project'
+            assert_selector "a[href=\"/projects/#{user['uuid']}\"]", text: 'Home project'
             assert page.has_link?('Manage account'), 'No link - Manage account'
+            assert page.has_link?('Virtual machines'), 'No link - Virtual machines'
+            assert page.has_link?('Repositories'), 'No link - Repositories'
+            assert page.has_link?('Current token'), 'No link - Current token'
+            assert page.has_link?('SSH keys'), 'No link - SSH keys'
 
             if profile_config
               assert page.has_link?('Manage profile'), 'No link - Manage profile'
@@ -58,8 +62,12 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
               assert page.has_no_link?('Manage profile'), 'Found link - Manage profile'
             end
           else
-            assert_no_selector 'a', text: 'My home project'
+            assert_no_selector 'a', text: 'Home project'
             assert page.has_no_link?('Manage account'), 'Found link - Manage account'
+            assert page.has_no_link?('Virtual machines'), 'Found link - Virtual machines'
+            assert page.has_no_link?('Repositories'), 'Found link - Repositories'
+            assert page.has_no_link?('Current token'), 'Found link - Current token'
+            assert page.has_no_link?('SSH keys'), 'Found link - SSH keys'
             assert page.has_no_link?('Manage profile'), 'Found link - Manage profile'
           end
           assert page.has_link?('Log out'), 'No link - Log out'
diff --git a/apps/workbench/test/integration/user_manage_account_test.rb b/apps/workbench/test/integration/user_manage_account_test.rb
index 8da7b58..94a372e 100644
--- a/apps/workbench/test/integration/user_manage_account_test.rb
+++ b/apps/workbench/test/integration/user_manage_account_test.rb
@@ -11,15 +11,15 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
       within('.navbar-fixed-top') do
         page.find("#notifications-menu").click
         within('.dropdown-menu') do
-          assert_selector 'a', text: 'My virtual machines'
-          assert_selector 'a', text: 'My repositories'
-          assert_selector 'a', text: 'My current token'
-          assert_selector 'a', text: 'My SSH keys'
-          find('a', text: 'My SSH keys').click
+          assert_selector 'a', text: 'Virtual machines'
+          assert_selector 'a', text: 'Repositories'
+          assert_selector 'a', text: 'Current token'
+          assert_selector 'a', text: 'SSH keys'
+          find('a', text: 'SSH keys').click
         end
       end
 
-      # now in My SSH Keys page
+      # now in SSH Keys page
       assert page.has_text?('Add new SSH key'), 'No text - Add SSH key'
       add_and_verify_ssh_key
     else  # inactive user
@@ -110,7 +110,14 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
   end
 
   test "verify repositories for active user" do
-    visit page_with_token('active', '/manage_account')
+    visit page_with_token('active')
+    within('.navbar-fixed-top') do
+        page.find("#notifications-menu").click
+        within('.dropdown-menu') do
+          assert_selector 'a', text: 'Repositories'
+          find('a', text: 'Repositories').click
+        end
+    end
 
     repos = [[api_fixture('repositories')['foo'], true, true],
              [api_fixture('repositories')['repository3'], false, false],
@@ -136,7 +143,14 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
 
   test "request shell access" do
     ActionMailer::Base.deliveries = []
-    visit page_with_token('spectator', '/manage_account')
+    visit page_with_token('spectator')
+    within('.navbar-fixed-top') do
+        page.find("#notifications-menu").click
+        within('.dropdown-menu') do
+          assert_selector 'a', text: 'Virtual machines'
+          find('a', text: 'Virtual machines').click
+        end
+    end
     assert_text 'You do not have access to any virtual machines'
     click_link 'Send request for shell access'
 
@@ -164,7 +178,7 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
     within('.navbar-fixed-top') do
       page.find("#notifications-menu").click
       within('.dropdown-menu') do
-        find('a', text: 'My virtual machines').click
+        find('a', text: 'Virtual machines').click
       end
     end
     assert_text 'You do not have access to any virtual machines.'
@@ -173,7 +187,14 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
   end
 
   test "create new repository" do
-    visit page_with_token("active_trustedclient", "/manage_account")
+    visit page_with_token("active_trustedclient")
+    within('.navbar-fixed-top') do
+        page.find("#notifications-menu").click
+        within('.dropdown-menu') do
+          assert_selector 'a', text: 'Repositories'
+          find('a', text: 'Repositories').click
+        end
+    end
     click_on "Add new repository"
     within ".modal-dialog" do
       fill_in "Name", with: "workbenchtest"
@@ -185,10 +206,10 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
   end
 
   [
-    ['My virtual machines', nil, 'Host name'],
-    ['My repositories', 'Add new repository', 'It may take a minute or two before you can clone your new repository.'],
-    ['My current token', nil, 'HISTIGNORE=$HISTIGNORE'],
-    ['My SSH keys', 'Add new SSH key', 'Click here to learn about SSH keys in Arvados.'],
+    ['Virtual machines', nil, 'Host name'],
+    ['Repositories', 'Add new repository', 'It may take a minute or two before you can clone your new repository.'],
+    ['Current token', nil, 'HISTIGNORE=$HISTIGNORE'],
+    ['SSH keys', 'Add new SSH key', 'Click here to learn about SSH keys in Arvados.'],
   ].each do |page_name, button_name, look_for|
     test "test notification menu for page #{page_name}" do
       visit page_with_token('admin')
@@ -210,10 +231,10 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
   end
 
   [
-    ['My virtual machines', 'You do not have access to any virtual machines.'],
-    ['My repositories', 'You do not seem to have access to any repositories.'],
-    ['My current token', 'HISTIGNORE=$HISTIGNORE'],
-    ['My SSH keys', 'You have not yet set up an SSH public key for use with Arvados.'],
+    ['Virtual machines', 'You do not have access to any virtual machines.'],
+    ['Repositories', 'You do not seem to have access to any repositories.'],
+    ['Current token', 'HISTIGNORE=$HISTIGNORE'],
+    ['SSH keys', 'You have not yet set up an SSH public key for use with Arvados.'],
   ].each do |page_name, look_for|
     test "test notification menu for page #{page_name} when page is empty" do
       visit page_with_token('user1_with_load')
diff --git a/apps/workbench/test/integration/user_profile_test.rb b/apps/workbench/test/integration/user_profile_test.rb
index 05f3c65..241a3cc 100644
--- a/apps/workbench/test/integration/user_profile_test.rb
+++ b/apps/workbench/test/integration/user_profile_test.rb
@@ -54,10 +54,10 @@ class UserProfileTest < ActionDispatch::IntegrationTest
             assert page.has_no_link?('Not active'), 'Found link - Not active'
             assert page.has_no_link?('Sign agreements'), 'Found link - Sign agreements'
 
-            assert page.has_link?('My virtual machines'), 'No link - My Virtual Machines'
-            assert page.has_link?('My repositories'), 'No link - My Repositories'
-            assert page.has_link?('My current token'), 'No link - My Current Token'
-            assert page.has_link?('My SSH keys'), 'No link - My SSH Keys'
+            assert page.has_link?('Virtual machines'), 'No link - Virtual machines'
+            assert page.has_link?('Repositories'), 'No link - Repositories'
+            assert page.has_link?('Current token'), 'No link - Current token'
+            assert page.has_link?('SSH keys'), 'No link - SSH Keys'
 
             if profile_config
               assert page.has_link?('Manage profile'), 'No link - Manage profile'

commit 41bb13b71c8593134c2b34884249ca862b185e04
Merge: cda68ba 6988f4d
Author: Manoj <jonam33 at gmail.com>
Date:   Mon Aug 3 10:02:23 2015 -0400

    Merge branch 'master' into 6588-split-manage-account


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


hooks/post-receive
-- 




More information about the arvados-commits mailing list