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
Jérome Perrin
gitlab-ce
Commits
34ba9e41
Commit
34ba9e41
authored
Sep 06, 2016
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into issues-filters-reset-btn
parents
ab4763b1
4f8b9d09
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
3 additions
and
43 deletions
+3
-43
app/assets/javascripts/build.js
app/assets/javascripts/build.js
+3
-1
lib/gitlab/project_search_results.rb
lib/gitlab/project_search_results.rb
+0
-5
lib/gitlab/search_results.rb
lib/gitlab/search_results.rb
+0
-9
lib/gitlab/snippet_search_results.rb
lib/gitlab/snippet_search_results.rb
+0
-4
spec/lib/gitlab/search_results_spec.rb
spec/lib/gitlab/search_results_spec.rb
+0
-18
spec/lib/gitlab/snippet_search_results_spec.rb
spec/lib/gitlab/snippet_search_results_spec.rb
+0
-6
No files found.
app/assets/javascripts/build.js
View file @
34ba9e41
...
@@ -54,12 +54,14 @@
...
@@ -54,12 +54,14 @@
}
}
Build
.
prototype
.
getInitialBuildTrace
=
function
()
{
Build
.
prototype
.
getInitialBuildTrace
=
function
()
{
var
removeRefreshStatuses
=
[
'
success
'
,
'
failed
'
,
'
canceled
'
,
'
skipped
'
]
return
$
.
ajax
({
return
$
.
ajax
({
url
:
this
.
build_url
,
url
:
this
.
build_url
,
dataType
:
'
json
'
,
dataType
:
'
json
'
,
success
:
function
(
build_data
)
{
success
:
function
(
build_data
)
{
$
(
'
.js-build-output
'
).
html
(
build_data
.
trace_html
);
$
(
'
.js-build-output
'
).
html
(
build_data
.
trace_html
);
if
(
build_data
.
status
===
'
success
'
||
build_data
.
status
===
'
failed
'
)
{
if
(
removeRefreshStatuses
.
indexOf
(
build_data
.
status
)
>=
0
)
{
return
$
(
'
.js-build-refresh
'
).
remove
();
return
$
(
'
.js-build-refresh
'
).
remove
();
}
}
}
}
...
...
lib/gitlab/project_search_results.rb
View file @
34ba9e41
...
@@ -28,11 +28,6 @@ module Gitlab
...
@@ -28,11 +28,6 @@ module Gitlab
end
end
end
end
def
total_count
@total_count
||=
issues_count
+
merge_requests_count
+
blobs_count
+
notes_count
+
wiki_blobs_count
+
commits_count
end
def
blobs_count
def
blobs_count
@blobs_count
||=
blobs
.
count
@blobs_count
||=
blobs
.
count
end
end
...
...
lib/gitlab/search_results.rb
View file @
34ba9e41
...
@@ -27,11 +27,6 @@ module Gitlab
...
@@ -27,11 +27,6 @@ module Gitlab
end
end
end
end
def
total_count
@total_count
||=
projects_count
+
issues_count
+
merge_requests_count
+
milestones_count
end
def
projects_count
def
projects_count
@projects_count
||=
projects
.
count
@projects_count
||=
projects
.
count
end
end
...
@@ -48,10 +43,6 @@ module Gitlab
...
@@ -48,10 +43,6 @@ module Gitlab
@milestones_count
||=
milestones
.
count
@milestones_count
||=
milestones
.
count
end
end
def
empty?
total_count
.
zero?
end
private
private
def
projects
def
projects
...
...
lib/gitlab/snippet_search_results.rb
View file @
34ba9e41
...
@@ -20,10 +20,6 @@ module Gitlab
...
@@ -20,10 +20,6 @@ module Gitlab
end
end
end
end
def
total_count
@total_count
||=
snippet_titles_count
+
snippet_blobs_count
end
def
snippet_titles_count
def
snippet_titles_count
@snippet_titles_count
||=
snippet_titles
.
count
@snippet_titles_count
||=
snippet_titles
.
count
end
end
...
...
spec/lib/gitlab/search_results_spec.rb
View file @
34ba9e41
...
@@ -12,12 +12,6 @@ describe Gitlab::SearchResults do
...
@@ -12,12 +12,6 @@ describe Gitlab::SearchResults do
let!
(
:milestone
)
{
create
(
:milestone
,
project:
project
,
title:
'foo'
)
}
let!
(
:milestone
)
{
create
(
:milestone
,
project:
project
,
title:
'foo'
)
}
let
(
:results
)
{
described_class
.
new
(
user
,
Project
.
all
,
'foo'
)
}
let
(
:results
)
{
described_class
.
new
(
user
,
Project
.
all
,
'foo'
)
}
describe
'#total_count'
do
it
'returns the total amount of search hits'
do
expect
(
results
.
total_count
).
to
eq
(
4
)
end
end
describe
'#projects_count'
do
describe
'#projects_count'
do
it
'returns the total amount of projects'
do
it
'returns the total amount of projects'
do
expect
(
results
.
projects_count
).
to
eq
(
1
)
expect
(
results
.
projects_count
).
to
eq
(
1
)
...
@@ -42,18 +36,6 @@ describe Gitlab::SearchResults do
...
@@ -42,18 +36,6 @@ describe Gitlab::SearchResults do
end
end
end
end
describe
'#empty?'
do
it
'returns true when there are no search results'
do
allow
(
results
).
to
receive
(
:total_count
).
and_return
(
0
)
expect
(
results
.
empty?
).
to
eq
(
true
)
end
it
'returns false when there are search results'
do
expect
(
results
.
empty?
).
to
eq
(
false
)
end
end
describe
'confidential issues'
do
describe
'confidential issues'
do
let
(
:project_1
)
{
create
(
:empty_project
)
}
let
(
:project_1
)
{
create
(
:empty_project
)
}
let
(
:project_2
)
{
create
(
:empty_project
)
}
let
(
:project_2
)
{
create
(
:empty_project
)
}
...
...
spec/lib/gitlab/snippet_search_results_spec.rb
View file @
34ba9e41
...
@@ -5,12 +5,6 @@ describe Gitlab::SnippetSearchResults do
...
@@ -5,12 +5,6 @@ describe Gitlab::SnippetSearchResults do
let
(
:results
)
{
described_class
.
new
(
Snippet
.
all
,
'foo'
)
}
let
(
:results
)
{
described_class
.
new
(
Snippet
.
all
,
'foo'
)
}
describe
'#total_count'
do
it
'returns the total amount of search hits'
do
expect
(
results
.
total_count
).
to
eq
(
2
)
end
end
describe
'#snippet_titles_count'
do
describe
'#snippet_titles_count'
do
it
'returns the amount of matched snippet titles'
do
it
'returns the amount of matched snippet titles'
do
expect
(
results
.
snippet_titles_count
).
to
eq
(
1
)
expect
(
results
.
snippet_titles_count
).
to
eq
(
1
)
...
...
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