Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
df3d022f
Commit
df3d022f
authored
Jan 07, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
f1b41130
30209219
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
36 deletions
+36
-36
app/views/shared/issuable/_filter.html.haml
app/views/shared/issuable/_filter.html.haml
+0
-32
changelogs/unreleased/55670-remove-app-views-shared-issuable-_filter-html-haml.yml
...70-remove-app-views-shared-issuable-_filter-html-haml.yml
+5
-0
changelogs/unreleased/deprecated-migration-inheritance-2.yml
changelogs/unreleased/deprecated-migration-inheritance-2.yml
+5
-0
changelogs/unreleased/sh-fix-issue-55914.yml
changelogs/unreleased/sh-fix-issue-55914.yml
+5
-0
db/migrate/20181119132520_add_indexes_to_ci_builds_and_pipelines.rb
.../20181119132520_add_indexes_to_ci_builds_and_pipelines.rb
+1
-1
lib/bitbucket_server/paginator.rb
lib/bitbucket_server/paginator.rb
+9
-3
spec/lib/bitbucket_server/paginator_spec.rb
spec/lib/bitbucket_server/paginator_spec.rb
+11
-0
No files found.
app/views/shared/issuable/_filter.html.haml
deleted
100644 → 0
View file @
f1b41130
.issues-filters
.issues-details-filters.row-content-block.second-block
=
form_tag
page_filter_path
(
without:
[
:assignee_id
,
:author_id
,
:milestone_title
,
:label_name
,
:search
]),
method: :get
,
class:
'filter-form js-filter-form'
do
-
if
params
[
:search
].
present?
=
hidden_field_tag
:search
,
params
[
:search
]
.issues-other-filters
.filter-item.inline
-
if
params
[
:author_id
].
present?
=
hidden_field_tag
(
:author_id
,
params
[
:author_id
])
=
dropdown_tag
(
user_dropdown_label
(
params
[
:author_id
],
"Author"
),
options:
{
toggle_class:
"js-user-search js-filter-submit js-author-search"
,
title:
"Filter by author"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable dropdown-menu-author js-filter-submit"
,
placeholder:
"Search authors"
,
data:
{
any_user:
"Any Author"
,
first_user:
current_user
&
.
username
,
current_user:
true
,
project_id:
@project
&
.
id
,
group_id:
@group
&
.
id
,
selected:
params
[
:author_id
],
field_name:
"author_id"
,
default_label:
"Author"
}
})
.filter-item.inline
-
if
params
[
:assignee_id
].
present?
=
hidden_field_tag
(
:assignee_id
,
params
[
:assignee_id
])
=
dropdown_tag
(
user_dropdown_label
(
params
[
:assignee_id
],
"Assignee"
),
options:
{
toggle_class:
"js-user-search js-filter-submit js-assignee-search"
,
title:
"Filter by assignee"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable dropdown-menu-assignee js-filter-submit"
,
placeholder:
"Search assignee"
,
data:
{
any_user:
"Any Assignee"
,
first_user:
current_user
&
.
username
,
null_user:
true
,
current_user:
true
,
project_id:
@project
&
.
id
,
group_id:
@group
&
.
id
,
selected:
params
[
:assignee_id
],
field_name:
"assignee_id"
,
default_label:
"Assignee"
}
})
.filter-item.inline.milestone-filter
=
render
"shared/issuable/milestone_dropdown"
,
selected:
finder
.
milestones
.
try
(
:first
),
name: :milestone_title
,
show_any:
true
,
show_upcoming:
true
,
show_started:
true
.filter-item.inline.labels-filter
=
render
"shared/issuable/label_dropdown"
,
selected:
selected_labels
,
use_id:
false
,
selected_toggle:
params
[
:label_name
],
data_options:
{
field_name:
"label_name[]"
}
-
unless
@no_filters_set
.float-right
=
render
'shared/issuable/sort_dropdown'
-
has_labels
=
@labels
&&
@labels
.
any?
.row-content-block.second-block.filtered-labels
{
class:
(
"hidden"
unless
has_labels
)
}
-
if
has_labels
=
render
'shared/labels_row'
,
labels:
@labels
changelogs/unreleased/55670-remove-app-views-shared-issuable-_filter-html-haml.yml
0 → 100644
View file @
df3d022f
---
title
:
Remove app/views/shared/issuable/_filter.html.haml
merge_request
:
24008
author
:
Takuya Noguchi
type
:
other
changelogs/unreleased/deprecated-migration-inheritance-2.yml
0 → 100644
View file @
df3d022f
---
title
:
ActiveRecord::Migration -> ActiveRecord::Migration[5.0] for AddIndexesToCiBuildsAndPipelines
merge_request
:
24167
author
:
Jasper Maes
type
:
other
changelogs/unreleased/sh-fix-issue-55914.yml
0 → 100644
View file @
df3d022f
---
title
:
Fix Bitbucket Server import only including first 25 pull requests
merge_request
:
24178
author
:
type
:
fixed
db/migrate/20181119132520_add_indexes_to_ci_builds_and_pipelines.rb
View file @
df3d022f
# frozen_string_literal: true
class
AddIndexesToCiBuildsAndPipelines
<
ActiveRecord
::
Migration
class
AddIndexesToCiBuildsAndPipelines
<
ActiveRecord
::
Migration
[
5.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
...
...
lib/bitbucket_server/paginator.rb
View file @
df3d022f
...
...
@@ -12,7 +12,7 @@ module BitbucketServer
@url
=
url
@page
=
nil
@page_offset
=
page_offset
@limit
=
limit
||
PAGE_LENGTH
@limit
=
limit
@total
=
0
end
...
...
@@ -34,6 +34,8 @@ module BitbucketServer
attr_reader
:connection
,
:page
,
:url
,
:type
,
:limit
def
over_limit?
return
false
unless
@limit
@limit
.
positive?
&&
@total
>=
@limit
end
...
...
@@ -42,11 +44,15 @@ module BitbucketServer
end
def
starting_offset
[
0
,
page_offset
-
1
].
max
*
limit
[
0
,
page_offset
-
1
].
max
*
max_per_page
end
def
max_per_page
limit
||
PAGE_LENGTH
end
def
fetch_next_page
parsed_response
=
connection
.
get
(
@url
,
start:
next_offset
,
limit:
@limit
)
parsed_response
=
connection
.
get
(
@url
,
start:
next_offset
,
limit:
max_per_page
)
Page
.
new
(
parsed_response
,
type
)
end
end
...
...
spec/lib/bitbucket_server/paginator_spec.rb
View file @
df3d022f
...
...
@@ -30,6 +30,17 @@ describe BitbucketServer::Paginator do
expect
{
limited
.
items
}.
to
raise_error
(
StopIteration
)
end
it
'does not stop if limit is unspecified'
do
stub_const
(
"BitbucketServer::Paginator::PAGE_LENGTH"
,
1
)
paginator
=
described_class
.
new
(
connection
,
'http://more-data'
,
:pull_request
,
page_offset:
0
,
limit:
nil
)
allow
(
paginator
).
to
receive
(
:fetch_next_page
).
and_return
(
first_page
,
last_page
)
expect
(
paginator
.
has_next_page?
).
to
be_truthy
expect
(
paginator
.
items
).
to
match
([
'item_1'
])
expect
(
paginator
.
has_next_page?
).
to
be_truthy
expect
(
paginator
.
items
).
to
match
([
'item_2'
])
end
it
'calls the connection with different offsets'
do
expect
(
connection
).
to
receive
(
:get
).
with
(
'http://more-data'
,
start:
0
,
limit:
BitbucketServer
::
Paginator
::
PAGE_LENGTH
).
and_return
(
page_attrs
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment