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
Kazuhiko Shiozaki
gitlab-ce
Commits
3a4c1c5c
Commit
3a4c1c5c
authored
Apr 12, 2013
by
Sato Hiroyuki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable to filter graph by ref
parent
c0e3b397
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
app/controllers/graph_controller.rb
app/controllers/graph_controller.rb
+1
-1
app/models/network/graph.rb
app/models/network/graph.rb
+5
-2
No files found.
app/controllers/graph_controller.rb
View file @
3a4c1c5c
...
...
@@ -16,7 +16,7 @@ class GraphController < ProjectResourceController
format
.
html
format
.
json
do
@graph
=
Network
::
Graph
.
new
(
project
,
@ref
,
@commit
)
@graph
=
Network
::
Graph
.
new
(
project
,
@ref
,
@commit
,
@options
[
:filter_ref
]
)
end
end
end
...
...
app/models/network/graph.rb
View file @
3a4c1c5c
...
...
@@ -8,10 +8,11 @@ module Network
@max_count
||=
650
end
def
initialize
project
,
ref
,
commit
def
initialize
project
,
ref
,
commit
,
filter_ref
@project
=
project
@ref
=
ref
@commit
=
commit
@filter_ref
=
filter_ref
@repo
=
project
.
repo
@commits
=
collect_commits
...
...
@@ -107,7 +108,9 @@ module Network
skip:
skip
}
Grit
::
Commit
.
find_all
(
@repo
,
nil
,
opts
)
ref
=
@ref
if
@filter_ref
Grit
::
Commit
.
find_all
(
@repo
,
ref
,
opts
)
end
def
commits_sort_by_ref
...
...
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