projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Restored support for old-style 'order' strings and added test. Clarified
[arvados.git]
/
apps
/
workbench
/
app
/
controllers
/
api_client_authorizations_controller.rb
diff --git
a/apps/workbench/app/controllers/api_client_authorizations_controller.rb
b/apps/workbench/app/controllers/api_client_authorizations_controller.rb
index 81e324a46a6b379e5ec06583410d11ec69fcf5bd..24b4ae3185d4701c7152af5a8f582f2e97ecb424 100644
(file)
--- a/
apps/workbench/app/controllers/api_client_authorizations_controller.rb
+++ b/
apps/workbench/app/controllers/api_client_authorizations_controller.rb
@@
-1,8
+1,15
@@
class ApiClientAuthorizationsController < ApplicationController
def index
class ApiClientAuthorizationsController < ApplicationController
def index
- @objects = model_class.all.to_ary.reject do |x|
+ m = model_class.all
+ items_available = m.items_available
+ offset = m.result_offset
+ limit = m.result_limit
+ filtered = m.to_ary.reject do |x|
x.api_client_id == 0 or (x.expires_at and x.expires_at < Time.now) rescue false
end
x.api_client_id == 0 or (x.expires_at and x.expires_at < Time.now) rescue false
end
+ ArvadosApiClient::patch_paging_vars(filtered, items_available, offset, limit)
+ @objects = ArvadosResourceList.new(ApiClientAuthorization)
+ @objects.results= filtered
super
end
super
end