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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
2a520b1c
Commit
2a520b1c
authored
Mar 19, 2019
by
Mario de la Ossa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid loading pipeline status in project search
parent
74ebeebb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
4 deletions
+10
-4
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+3
-2
app/views/search/_results.html.haml
app/views/search/_results.html.haml
+1
-1
app/views/shared/projects/_project.html.haml
app/views/shared/projects/_project.html.haml
+1
-1
changelogs/unreleased/avoid_es_loading_project_ci_status.yml
changelogs/unreleased/avoid_es_loading_project_ci_status.yml
+5
-0
No files found.
app/helpers/projects_helper.rb
View file @
2a520b1c
...
...
@@ -169,7 +169,7 @@ module ProjectsHelper
translation
.
html_safe
end
def
project_list_cache_key
(
project
)
def
project_list_cache_key
(
project
,
pipeline_status:
true
)
key
=
[
project
.
route
.
cache_key
,
project
.
cache_key
,
...
...
@@ -179,10 +179,11 @@ module ProjectsHelper
Gitlab
::
CurrentSettings
.
cache_key
,
"cross-project:
#{
can?
(
current_user
,
:read_cross_project
)
}
"
,
max_project_member_access_cache_key
(
project
),
pipeline_status
,
'v2.6'
]
key
<<
pipeline_status_cache_key
(
project
.
pipeline_status
)
if
project
.
pipeline_status
.
has_status?
key
<<
pipeline_status_cache_key
(
project
.
pipeline_status
)
if
p
ipeline_status
&&
p
roject
.
pipeline_status
.
has_status?
key
end
...
...
app/views/search/_results.html.haml
View file @
2a520b1c
...
...
@@ -20,7 +20,7 @@
.search-results
-
if
@scope
==
'projects'
.term
=
render
'shared/projects/list'
,
projects:
@search_objects
=
render
'shared/projects/list'
,
projects:
@search_objects
,
pipeline_status:
false
-
else
=
render
partial:
"search/results/
#{
@scope
.
singularize
}
"
,
collection:
@search_objects
...
...
app/views/shared/projects/_project.html.haml
View file @
2a520b1c
...
...
@@ -10,7 +10,7 @@
-
show_last_commit_as_description
=
false
unless
local_assigns
[
:show_last_commit_as_description
]
==
true
&&
can_show_last_commit_in_list?
(
project
)
-
css_class
=
''
unless
local_assigns
[
:css_class
]
-
css_class
+=
" no-description"
if
project
.
description
.
blank?
&&
!
show_last_commit_as_description
-
cache_key
=
project_list_cache_key
(
project
)
-
cache_key
=
project_list_cache_key
(
project
,
pipeline_status:
pipeline_status
)
-
updated_tooltip
=
time_ago_with_tooltip
(
project
.
last_activity_date
)
-
css_controls_class
=
compact_mode
?
""
:
"flex-lg-row justify-content-lg-between"
-
avatar_container_class
=
project
.
creator
&&
use_creator_avatar
?
''
:
'rect-avatar'
...
...
changelogs/unreleased/avoid_es_loading_project_ci_status.yml
0 → 100644
View file @
2a520b1c
---
title
:
Avoid loading pipeline status in project search
merge_request
:
26342
author
:
type
:
performance
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