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
a7eef59c
Commit
a7eef59c
authored
Oct 15, 2018
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-10-15
# Conflicts: # CHANGELOG.md [ci skip]
parents
baac8a77
280a132e
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
102 additions
and
17 deletions
+102
-17
CHANGELOG.md
CHANGELOG.md
+3
-0
GITALY_SERVER_VERSION
GITALY_SERVER_VERSION
+1
-1
app/assets/javascripts/pages/users/user_overview_block.js
app/assets/javascripts/pages/users/user_overview_block.js
+10
-5
app/assets/javascripts/pages/users/user_tabs.js
app/assets/javascripts/pages/users/user_tabs.js
+23
-6
app/controllers/users_controller.rb
app/controllers/users_controller.rb
+3
-1
app/serializers/build_details_entity.rb
app/serializers/build_details_entity.rb
+1
-1
app/views/shared/projects/_list.html.haml
app/views/shared/projects/_list.html.haml
+2
-1
changelogs/unreleased/52564-personal-projects-pagination-in-profile-overview-tab-is-broken.yml
...projects-pagination-in-profile-overview-tab-is-broken.yml
+5
-0
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+25
-0
spec/features/users/overview_spec.rb
spec/features/users/overview_spec.rb
+29
-2
No files found.
CHANGELOG.md
View file @
a7eef59c
...
...
@@ -10,6 +10,7 @@ entry.
-
Fix project deletion when there is a export available. !22276
<<<<<<< HEAD
## 11.3.4 (2018-10-05)
### Security (3 changes)
...
...
@@ -19,6 +20,8 @@ entry.
-
Markdown API no longer displays confidential title references unless authorized.
=======
>>>>>>> upstream/master
## 11.3.3 (2018-10-04)
-
No changes.
...
...
GITALY_SERVER_VERSION
View file @
a7eef59c
0.125.
0
0.125.
1
app/assets/javascripts/pages/users/user_overview_block.js
View file @
a7eef59c
import
axios
from
'
~/lib/utils/axios_utils
'
;
const
DEFAULT_LIMIT
=
20
;
export
default
class
UserOverviewBlock
{
constructor
(
options
=
{})
{
this
.
container
=
options
.
container
;
this
.
url
=
options
.
url
;
this
.
limit
=
options
.
limit
||
20
;
this
.
requestParams
=
{
limit
:
DEFAULT_LIMIT
,
...
options
.
requestParams
,
};
this
.
loadData
();
}
...
...
@@ -15,9 +20,7 @@ export default class UserOverviewBlock {
axios
.
get
(
this
.
url
,
{
params
:
{
limit
:
this
.
limit
,
},
params
:
this
.
requestParams
,
})
.
then
(({
data
})
=>
this
.
render
(
data
))
.
catch
(()
=>
loadingEl
.
classList
.
add
(
'
hide
'
));
...
...
@@ -34,7 +37,9 @@ export default class UserOverviewBlock {
if
(
count
&&
count
>
0
)
{
document
.
querySelector
(
`
${
this
.
container
}
.js-view-all`
).
classList
.
remove
(
'
hide
'
);
}
else
{
document
.
querySelector
(
`
${
this
.
container
}
.nothing-here-block`
).
classList
.
add
(
'
text-left
'
,
'
p-0
'
);
document
.
querySelector
(
`
${
this
.
container
}
.nothing-here-block`
)
.
classList
.
add
(
'
text-left
'
,
'
p-0
'
);
}
loadingEl
.
classList
.
add
(
'
hide
'
);
...
...
app/assets/javascripts/pages/users/user_tabs.js
View file @
a7eef59c
...
...
@@ -182,18 +182,22 @@ export default class UserTabs {
this
.
loadActivityCalendar
(
'
overview
'
);
UserTabs
.
renderMostRecentBlocks
(
'
#js-overview .activities-block
'
,
5
);
UserTabs
.
renderMostRecentBlocks
(
'
#js-overview .projects-block
'
,
10
);
UserTabs
.
renderMostRecentBlocks
(
'
#js-overview .activities-block
'
,
{
requestParams
:
{
limit
:
5
},
});
UserTabs
.
renderMostRecentBlocks
(
'
#js-overview .projects-block
'
,
{
requestParams
:
{
limit
:
10
,
skip_pagination
:
true
},
});
this
.
loaded
.
overview
=
true
;
}
static
renderMostRecentBlocks
(
container
,
limit
)
{
static
renderMostRecentBlocks
(
container
,
options
)
{
// eslint-disable-next-line no-new
new
UserOverviewBlock
({
container
,
url
:
$
(
`
${
container
}
.overview-content-list`
).
data
(
'
href
'
),
limit
,
...
options
,
});
}
...
...
@@ -216,7 +220,12 @@ export default class UserTabs {
let
calendarHint
=
''
;
if
(
action
===
'
activity
'
)
{
calendarHint
=
sprintf
(
__
(
'
Summary of issues, merge requests, push events, and comments (Timezone: %{utcFormatted})
'
),
{
utcFormatted
});
calendarHint
=
sprintf
(
__
(
'
Summary of issues, merge requests, push events, and comments (Timezone: %{utcFormatted})
'
,
),
{
utcFormatted
},
);
}
else
if
(
action
===
'
overview
'
)
{
calendarHint
=
__
(
'
Issues, merge requests, pushes and comments.
'
);
}
...
...
@@ -224,7 +233,15 @@ export default class UserTabs {
$calendarWrap
.
find
(
'
.calendar-hint
'
).
text
(
calendarHint
);
// eslint-disable-next-line no-new
new
ActivityCalendar
(
'
.tab-pane.active .js-contrib-calendar
'
,
'
.tab-pane.active .user-calendar-activities
'
,
data
,
calendarActivitiesPath
,
utcOffset
,
0
,
monthsAgo
);
new
ActivityCalendar
(
'
.tab-pane.active .js-contrib-calendar
'
,
'
.tab-pane.active .user-calendar-activities
'
,
data
,
calendarActivitiesPath
,
utcOffset
,
0
,
monthsAgo
,
);
})
.
catch
(()
=>
flash
(
__
(
'
There was an error loading users activity calendar.
'
)));
}
...
...
app/controllers/users_controller.rb
View file @
a7eef59c
...
...
@@ -57,10 +57,12 @@ class UsersController < ApplicationController
def
projects
load_projects
skip_pagination
=
Gitlab
::
Utils
.
to_boolean
(
params
[
:skip_pagination
])
respond_to
do
|
format
|
format
.
html
{
render
'show'
}
format
.
json
do
pager_json
(
"shared/projects/_list"
,
@projects
.
count
,
projects:
@projects
)
pager_json
(
"shared/projects/_list"
,
@projects
.
count
,
projects:
@projects
,
skip_pagination:
skip_pagination
)
end
end
end
...
...
app/serializers/build_details_entity.rb
View file @
a7eef59c
...
...
@@ -11,7 +11,7 @@ class BuildDetailsEntity < JobEntity
expose
:runner
,
using:
RunnerEntity
expose
:pipeline
,
using:
PipelineEntity
expose
:deployment_status
,
if:
->
(
*
)
{
build
.
ha
s_environment?
}
do
expose
:deployment_status
,
if:
->
(
*
)
{
build
.
start
s_environment?
}
do
expose
:deployment_status
,
as: :status
expose
:persisted_environment
,
as: :environment
,
with:
EnvironmentEntity
...
...
app/views/shared/projects/_list.html.haml
View file @
a7eef59c
...
...
@@ -8,6 +8,7 @@
-
user
=
local_assigns
[
:user
]
-
show_last_commit_as_description
=
false
unless
local_assigns
[
:show_last_commit_as_description
]
==
true
-
remote
=
false
unless
local_assigns
[
:remote
]
==
true
-
skip_pagination
=
false
unless
local_assigns
[
:skip_pagination
]
==
true
.js-projects-list-holder
-
if
any_projects?
(
projects
)
...
...
@@ -25,6 +26,6 @@
=
icon
(
'lock fw'
,
base:
'circle'
,
class:
'fa-lg private-fork-icon'
)
%strong
=
pluralize
(
@private_forks_count
,
'private fork'
)
%span
you have no access to.
=
paginate_collection
(
projects
,
remote:
remote
)
=
paginate_collection
(
projects
,
remote:
remote
)
unless
skip_pagination
-
else
.nothing-here-block
No projects found
changelogs/unreleased/52564-personal-projects-pagination-in-profile-overview-tab-is-broken.yml
0 → 100644
View file @
a7eef59c
---
title
:
Hide pagination for personal projects on profile overview tab
merge_request
:
22321
author
:
type
:
other
spec/features/projects/jobs_spec.rb
View file @
a7eef59c
...
...
@@ -423,6 +423,31 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
end
end
context
'when job stops environment'
,
:js
do
let
(
:environment
)
{
create
(
:environment
,
name:
'production'
,
project:
project
)
}
let
(
:build
)
do
create
(
:ci_build
,
:success
,
:trace_live
,
environment:
environment
.
name
,
pipeline:
pipeline
,
options:
{
environment:
{
action:
'stop'
}
}
)
end
before
do
visit
project_job_path
(
project
,
build
)
wait_for_requests
end
it
'does not show environment information banner'
do
expect
(
page
).
not_to
have_selector
(
'.js-environment-container'
)
expect
(
page
).
not_to
have_selector
(
'.environment-information'
)
expect
(
page
).
not_to
have_text
(
environment
.
name
)
end
end
describe
'environment info in job view'
,
:js
do
before
do
visit
project_job_path
(
project
,
job
)
...
...
spec/features/users/overview_spec.rb
View file @
a7eef59c
...
...
@@ -104,8 +104,9 @@ describe 'Overview tab on a user profile', :js do
end
describe
'user has a personal project'
do
let
(
:private_project
)
{
create
(
:project
,
:private
,
namespace:
user
.
namespace
,
creator:
user
)
{
|
p
|
p
.
add_maintainer
(
user
)
}
}
let!
(
:private_event
)
{
create
(
:event
,
project:
private_project
,
author:
user
)
}
before
do
create
(
:project
,
:private
,
namespace:
user
.
namespace
,
creator:
user
)
{
|
p
|
p
.
add_maintainer
(
user
)
}
end
include_context
'visit overview tab'
...
...
@@ -119,5 +120,31 @@ describe 'Overview tab on a user profile', :js do
expect
(
find
(
'#js-overview .projects-block'
)).
to
have_selector
(
'.js-view-all'
,
visible:
true
)
end
end
describe
'user has more than ten personal projects'
do
before
do
create_list
(
:project
,
11
,
:private
,
namespace:
user
.
namespace
,
creator:
user
)
do
|
project
|
project
.
add_maintainer
(
user
)
end
end
include_context
'visit overview tab'
it
'it shows max. ten entries in the list of projects'
do
page
.
within
(
'.projects-block'
)
do
expect
(
page
).
to
have_selector
(
'.project-row'
,
count:
10
)
end
end
it
'shows a link to the project list'
do
expect
(
find
(
'#js-overview .projects-block'
)).
to
have_selector
(
'.js-view-all'
,
visible:
true
)
end
it
'does not show pagination'
do
page
.
within
(
'.projects-block'
)
do
expect
(
page
).
not_to
have_selector
(
'.gl-pagination'
)
end
end
end
end
end
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