diff options
author | George Koltsov <gkoltsov@gitlab.com> | 2019-08-02 15:34:25 +0100 |
---|---|---|
committer | George Koltsov <gkoltsov@gitlab.com> | 2019-08-12 11:16:17 +0100 |
commit | 1c2554bfd38fc455be16116f6a8cf7700c8db62b (patch) | |
tree | b4ac7bbcdd7881d51933dbe76b9d18b524f6e510 /app | |
parent | 95075fee788495c76bad9b8b207111b26f12e216 (diff) | |
download | gitlab-ce-1c2554bfd38fc455be16116f6a8cf7700c8db62b.tar.gz |
Add BitBucketServerImport project filtering
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/import/bitbucket_server_controller.rb | 2 | ||||
-rw-r--r-- | app/views/import/bitbucket_server/status.html.haml | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/import/bitbucket_server_controller.rb b/app/controllers/import/bitbucket_server_controller.rb index f71ea8642cd..f5ea33a8880 100644 --- a/app/controllers/import/bitbucket_server_controller.rb +++ b/app/controllers/import/bitbucket_server_controller.rb @@ -57,7 +57,7 @@ class Import::BitbucketServerController < Import::BaseController # rubocop: disable CodeReuse/ActiveRecord def status - @collection = bitbucket_client.repos(page_offset: page_offset, limit: limit_per_page) + @collection = bitbucket_client.repos(page_offset: page_offset, limit: limit_per_page, filter: params[:filter_bitbucket_projects]) @repos, @incompatible_repos = @collection.partition { |repo| repo.valid? } # Use the import URL to filter beyond what BaseService#find_already_added_projects diff --git a/app/views/import/bitbucket_server/status.html.haml b/app/views/import/bitbucket_server/status.html.haml index 40609fddbde..29cfa0d3f4c 100644 --- a/app/views/import/bitbucket_server/status.html.haml +++ b/app/views/import/bitbucket_server/status.html.haml @@ -20,6 +20,10 @@ .btn-group = link_to('Reconfigure', configure_import_bitbucket_server_path, class: 'btn btn-primary', method: :post) + .input-btn-group.float-right + = form_tag status_import_bitbucket_server_path, :method => 'get' do + = text_field_tag :filter_bitbucket_projects, params[:filter_bitbucket_projects], class: 'form-control', placeholder: _('Filter your projects by name'), size: 40 + .table-responsive.prepend-top-10 %table.table.import-jobs %colgroup.import-jobs-from-col |