projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
20846: Merge branch '19213-ubuntu2204-support' into 20846-ubuntu2204
[arvados.git]
/
apps
/
workbench
/
app
/
controllers
/
repositories_controller.rb
diff --git
a/apps/workbench/app/controllers/repositories_controller.rb
b/apps/workbench/app/controllers/repositories_controller.rb
index 78ac055a8e748ca9f2ef18f4343f6023ceb2a93a..953ee1dd2190ee02b7a5a651176ea8a162dbc928 100644
(file)
--- a/
apps/workbench/app/controllers/repositories_controller.rb
+++ b/
apps/workbench/app/controllers/repositories_controller.rb
@@
-1,5
+1,9
@@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
class RepositoriesController < ApplicationController
class RepositoriesController < ApplicationController
- before_
filter
:set_share_links, if: -> { defined? @object }
+ before_
action
:set_share_links, if: -> { defined? @object }
def index_pane_list
%w(repositories help)
def index_pane_list
%w(repositories help)
@@
-34,8
+38,8
@@
class RepositoriesController < ApplicationController
end
def all_repos
end
def all_repos
- limit =
if params[:limit] then params[:limit].to_i else 100 end
- offset =
if params[:offset] then params[:offset].to_i else 0 end
+ limit =
params[:limit].andand.to_i || 100
+ offset =
params[:offset].andand.to_i || 0
@filters = params[:filters] || []
if @filters.any?
@filters = params[:filters] || []
if @filters.any?
@@
-46,7
+50,7
@@
class RepositoriesController < ApplicationController
if !owner_filter.andand.any?
filters = @filters + [["owner_uuid", "=", current_user.uuid]]
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
+ my_repos = Repository.all.order("name ASC").limit(limit).
with_count("none").
offset(offset).filter(filters).results
else # done fetching all owned repositories
my_repos = []
end
else # done fetching all owned repositories
my_repos = []
end
@@
-60,7
+64,7
@@
class RepositoriesController < ApplicationController
end
filters = @filters + [["owner_uuid", "!=", current_user.uuid]]
end
filters = @filters + [["owner_uuid", "!=", current_user.uuid]]
- other_repos = Repository.all.order("name ASC").limit(limit).offset(offset).filter(filters).results
+ other_repos = Repository.all.order("name ASC").limit(limit).
with_count("none").
offset(offset).filter(filters).results
@objects = (my_repos + other_repos).first(limit)
end
@objects = (my_repos + other_repos).first(limit)
end