From 1c2554bfd38fc455be16116f6a8cf7700c8db62b Mon Sep 17 00:00:00 2001 From: George Koltsov Date: Fri, 2 Aug 2019 15:34:25 +0100 Subject: Add BitBucketServerImport project filtering --- app/views/import/bitbucket_server/status.html.haml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/views/import/bitbucket_server/status.html.haml') 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 -- cgit v1.2.1 From 91353779bfab544f3439cfdff9c6d0db1357166f Mon Sep 17 00:00:00 2001 From: George Koltsov Date: Fri, 2 Aug 2019 16:46:41 +0100 Subject: Add changelog entry --- app/views/import/bitbucket_server/status.html.haml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'app/views/import/bitbucket_server/status.html.haml') diff --git a/app/views/import/bitbucket_server/status.html.haml b/app/views/import/bitbucket_server/status.html.haml index 29cfa0d3f4c..1218462577a 100644 --- a/app/views/import/bitbucket_server/status.html.haml +++ b/app/views/import/bitbucket_server/status.html.haml @@ -17,12 +17,13 @@ = button_tag class: 'btn btn-import btn-success js-import-all' do = _('Import all projects') = icon('spinner spin', class: 'loading-icon') - .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 +.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, params[:filter], class: 'form-control append-bottom-10', placeholder: _('Filter your projects by name'), size: 40, autoFocus: true .table-responsive.prepend-top-10 %table.table.import-jobs @@ -66,7 +67,7 @@ = text_field_tag :path, current_user.namespace_path, class: "input-group-text input-large form-control", tabindex: 1, disabled: true %span.input-group-prepend .input-group-text / - = text_field_tag :path, sanitize_project_name(repo.slug), class: "input-mini form-control", tabindex: 2, autofocus: true, required: true + = text_field_tag :path, sanitize_project_name(repo.slug), class: "input-mini form-control", tabindex: 2, required: true %td.import-actions.job-status = button_tag class: 'btn btn-import js-add-to-import' do Import -- cgit v1.2.1 From 485b8b86edaeed1ba3a8bf55df23ca6cbc1f015b Mon Sep 17 00:00:00 2001 From: George Koltsov Date: Tue, 6 Aug 2019 17:18:53 +0100 Subject: Add filter param sanitization --- app/views/import/bitbucket_server/status.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/import/bitbucket_server/status.html.haml') diff --git a/app/views/import/bitbucket_server/status.html.haml b/app/views/import/bitbucket_server/status.html.haml index 1218462577a..aac09801d91 100644 --- a/app/views/import/bitbucket_server/status.html.haml +++ b/app/views/import/bitbucket_server/status.html.haml @@ -23,7 +23,7 @@ .input-btn-group.float-right = form_tag status_import_bitbucket_server_path, :method => 'get' do - = text_field_tag :filter, params[:filter], class: 'form-control append-bottom-10', placeholder: _('Filter your projects by name'), size: 40, autoFocus: true + = text_field_tag :filter, sanitize(params[:filter]), class: 'form-control append-bottom-10', placeholder: _('Filter your projects by name'), size: 40, autoFocus: true .table-responsive.prepend-top-10 %table.table.import-jobs -- cgit v1.2.1