[ARVADOS] updated: 2f27ee200f6cc4c97d30084e34330efef2068ebf

git at public.curoverse.com git at public.curoverse.com
Tue May 20 13:22:17 EDT 2014


Summary of changes:
 apps/workbench/app/controllers/keep_services_controller.rb     | 2 ++
 apps/workbench/app/models/{keep_disk.rb => keep_service.rb}    | 2 +-
 apps/workbench/app/views/layouts/application.html.erb          | 3 +++
 apps/workbench/config/routes.rb                                | 1 +
 services/api/app/models/keep_disk.rb                           | 6 +++---
 services/api/db/migrate/20140519205916_create_keep_services.rb | 1 +
 services/api/test/fixtures/keep_services.yml                   | 4 +++-
 7 files changed, 14 insertions(+), 5 deletions(-)
 create mode 100644 apps/workbench/app/controllers/keep_services_controller.rb
 copy apps/workbench/app/models/{keep_disk.rb => keep_service.rb} (70%)

       via  2f27ee200f6cc4c97d30084e34330efef2068ebf (commit)
       via  9c3beb526fe3bdfd6769abd0def5a1634074d353 (commit)
      from  ce2d2f5807822534756e52ac04bc272dd572d13d (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 2f27ee200f6cc4c97d30084e34330efef2068ebf
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue May 20 13:22:12 2014 -0400

    2776: Fixed backwards-compatible inclusion of service_host/port/ssl_flag for keep_disks.

diff --git a/services/api/app/models/keep_disk.rb b/services/api/app/models/keep_disk.rb
index 71ec963..04171bc 100644
--- a/services/api/app/models/keep_disk.rb
+++ b/services/api/app/models/keep_disk.rb
@@ -48,19 +48,19 @@ class KeepDisk < ArvadosModel
   end
 
   def service_host
-    KeepService.where(uuid: self.keep_service_uuid) do |k|
+    KeepService.where(uuid: self.keep_service_uuid).each do |k|
       return k.service_host
     end
   end
 
   def service_port
-    KeepService.where(uuid: self.keep_service_uuid) do |k|
+    KeepService.where(uuid: self.keep_service_uuid).each do |k|
       return k.service_port
     end
   end
 
   def service_ssl_flag
-    KeepService.where(uuid: self.keep_service_uuid) do |k|
+    KeepService.where(uuid: self.keep_service_uuid).each do |k|
       return k.service_ssl_flag
     end
   end

commit 9c3beb526fe3bdfd6769abd0def5a1634074d353
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue May 20 11:37:33 2014 -0400

    2776: Added Keep services page to workbench (uses default layouts)

diff --git a/apps/workbench/app/controllers/keep_services_controller.rb b/apps/workbench/app/controllers/keep_services_controller.rb
new file mode 100644
index 0000000..eac2e22
--- /dev/null
+++ b/apps/workbench/app/controllers/keep_services_controller.rb
@@ -0,0 +1,2 @@
+class KeepServicesController < ApplicationController
+end
diff --git a/apps/workbench/app/models/keep_service.rb b/apps/workbench/app/models/keep_service.rb
new file mode 100644
index 0000000..f27e369
--- /dev/null
+++ b/apps/workbench/app/models/keep_service.rb
@@ -0,0 +1,5 @@
+class KeepService < ArvadosBase
+  def self.creatable?
+    current_user and current_user.is_admin
+  end
+end
diff --git a/apps/workbench/app/views/layouts/application.html.erb b/apps/workbench/app/views/layouts/application.html.erb
index 2d3c4c0..650b9f1 100644
--- a/apps/workbench/app/views/layouts/application.html.erb
+++ b/apps/workbench/app/views/layouts/application.html.erb
@@ -133,6 +133,9 @@
             <li><a href="/keep_disks">
                 <i class="fa fa-lg fa-hdd-o fa-fw"></i> Keep disks
             </a></li>
+            <li><a href="/keep_services">
+                <i class="fa fa-lg fa-hdd-o fa-fw"></i> Keep services
+            </a></li>
           </ul>
         <% end %>
 
diff --git a/apps/workbench/config/routes.rb b/apps/workbench/config/routes.rb
index e0c93ec..2255856 100644
--- a/apps/workbench/config/routes.rb
+++ b/apps/workbench/config/routes.rb
@@ -2,6 +2,7 @@ ArvadosWorkbench::Application.routes.draw do
   themes_for_rails
 
   resources :keep_disks
+  resources :keep_services
   resources :user_agreements do
     put 'sign', on: :collection
     get 'signatures', on: :collection
diff --git a/services/api/db/migrate/20140519205916_create_keep_services.rb b/services/api/db/migrate/20140519205916_create_keep_services.rb
index 02caaef..24e3921 100644
--- a/services/api/db/migrate/20140519205916_create_keep_services.rb
+++ b/services/api/db/migrate/20140519205916_create_keep_services.rb
@@ -29,6 +29,7 @@ class CreateKeepServices < ActiveRecord::Migration
           service_host: k[:service_host],
           service_port: k[:service_port],
           service_ssl_flag: k[:service_ssl_flag],
+          service_type: 'disk',
           owner_uuid: k[:owner_uuid]
         }
       end
diff --git a/services/api/test/fixtures/keep_services.yml b/services/api/test/fixtures/keep_services.yml
index 0fde804..d3b1b2a 100644
--- a/services/api/test/fixtures/keep_services.yml
+++ b/services/api/test/fixtures/keep_services.yml
@@ -4,10 +4,12 @@ keep0:
   service_host: keep0.qr1hi.arvadosapi.com
   service_port: 25107
   service_ssl_flag: false
+  service_type: disk
 
 keep1:
   uuid: zzzzz-bi6l4-rsnj3c76ndxb7o0
   owner_uuid: zzzzz-tpzed-d9tiejq69daie8f
   service_host: keep1.qr1hi.arvadosapi.com
   service_port: 25107
-  service_ssl_flag: false
\ No newline at end of file
+  service_ssl_flag: false
+  service_type: disk
\ No newline at end of file

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list