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
06440b12
Commit
06440b12
authored
Jun 12, 2019
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Avoid loading objects from DB in ES results"
This reverts commit
d9cb907c
.
parent
18210442
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
4 additions
and
15 deletions
+4
-15
app/controllers/search_controller.rb
app/controllers/search_controller.rb
+0
-1
app/models/project_feature.rb
app/models/project_feature.rb
+0
-2
app/services/search_service.rb
app/services/search_service.rb
+0
-4
app/views/search/_results.html.haml
app/views/search/_results.html.haml
+1
-1
app/views/search/results/_issue.html.haml
app/views/search/results/_issue.html.haml
+1
-1
app/views/search/results/_merge_request.html.haml
app/views/search/results/_merge_request.html.haml
+1
-1
app/views/search/results/_milestone.html.haml
app/views/search/results/_milestone.html.haml
+1
-1
lib/gitlab/search_results.rb
lib/gitlab/search_results.rb
+0
-4
No files found.
app/controllers/search_controller.rb
View file @
06440b12
...
...
@@ -25,7 +25,6 @@ class SearchController < ApplicationController
@show_snippets
=
search_service
.
show_snippets?
@search_results
=
search_service
.
search_results
@search_objects
=
search_service
.
search_objects
@display_options
=
search_service
.
display_options
render_commits
if
@scope
==
'commits'
eager_load_user_status
if
@scope
==
'users'
...
...
app/models/project_feature.rb
View file @
06440b12
...
...
@@ -72,8 +72,6 @@ class ProjectFeature < ApplicationRecord
default_value_for
:wiki_access_level
,
value:
ENABLED
,
allows_nil:
false
default_value_for
:repository_access_level
,
value:
ENABLED
,
allows_nil:
false
scope
:for_project_id
,
->
(
project
)
{
where
(
project:
project
)
}
def
feature_available?
(
feature
,
user
)
# This feature might not be behind a feature flag at all, so default to true
return
false
unless
::
Feature
.
enabled?
(
feature
,
user
,
default_enabled:
true
)
...
...
app/services/search_service.rb
View file @
06440b12
...
...
@@ -52,10 +52,6 @@ class SearchService
@search_objects
||=
search_results
.
objects
(
scope
,
params
[
:page
])
end
def
display_options
@display_options
||=
search_results
.
display_options
(
scope
)
end
private
def
search_service
...
...
app/views/search/_results.html.haml
View file @
06440b12
...
...
@@ -21,7 +21,7 @@
.search-results
-
if
@scope
==
'projects'
.term
=
render
'shared/projects/list'
,
{
projects:
@search_objects
,
pipeline_status:
false
}.
merge
(
@display_options
)
=
render
'shared/projects/list'
,
projects:
@search_objects
,
pipeline_status:
false
-
else
-
locals
=
{
projects:
blob_projects
(
@search_objects
)
}
if
%w[blobs wiki_blobs]
.
include?
(
@scope
)
=
render
partial:
"search/results/
#{
@scope
.
singularize
}
"
,
collection:
@search_objects
,
locals:
locals
...
...
app/views/search/results/_issue.html.haml
View file @
06440b12
.search-result-row
%h4
=
confidential_icon
(
issue
)
=
link_to
namespace_project_issue_path
(
issue
.
project
.
namespace
.
becomes
(
Namespace
),
issue
.
project
,
issue
)
do
=
link_to
[
issue
.
project
.
namespace
.
becomes
(
Namespace
),
issue
.
project
,
issue
]
do
%span
.term.str-truncated
=
issue
.
title
-
if
issue
.
closed?
%span
.badge.badge-danger.prepend-left-5
=
_
(
"Closed"
)
...
...
app/views/search/results/_merge_request.html.haml
View file @
06440b12
.search-result-row
%h4
=
link_to
namespace_project_merge_request_path
(
merge_request
.
target_project
.
namespace
.
becomes
(
Namespace
),
merge_request
.
target_project
,
merge_request
)
do
=
link_to
[
merge_request
.
target_project
.
namespace
.
becomes
(
Namespace
),
merge_request
.
target_project
,
merge_request
]
do
%span
.term.str-truncated
=
merge_request
.
title
-
if
merge_request
.
merged?
%span
.badge.badge-primary.prepend-left-5
=
_
(
"Merged"
)
...
...
app/views/search/results/_milestone.html.haml
View file @
06440b12
.search-result-row
%h4
=
link_to
namespace_project_milestone_path
(
milestone
.
project
.
namespace
.
becomes
(
Namespace
),
milestone
.
project
,
milestone
)
do
=
link_to
[
milestone
.
project
.
namespace
.
becomes
(
Namespace
),
milestone
.
project
,
milestone
]
do
%span
.term.str-truncated
=
milestone
.
title
-
if
milestone
.
description
.
present?
...
...
lib/gitlab/search_results.rb
View file @
06440b12
...
...
@@ -85,10 +85,6 @@ module Gitlab
UsersFinder
.
new
(
current_user
,
search:
query
).
execute
end
def
display_options
(
_scope
)
{}
end
private
def
projects
...
...
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