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
8ff5cf9c
Commit
8ff5cf9c
authored
Feb 05, 2013
by
Sato Hiroyuki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add search box for the commit.
parent
81cc1cb8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
6 deletions
+22
-6
app/controllers/graph_controller.rb
app/controllers/graph_controller.rb
+10
-0
app/views/graph/_head.html.haml
app/views/graph/_head.html.haml
+9
-0
app/views/graph/show.html.haml
app/views/graph/show.html.haml
+3
-6
No files found.
app/controllers/graph_controller.rb
View file @
8ff5cf9c
...
@@ -7,6 +7,16 @@ class GraphController < ProjectResourceController
...
@@ -7,6 +7,16 @@ class GraphController < ProjectResourceController
before_filter
:require_non_empty_project
before_filter
:require_non_empty_project
def
show
def
show
if
params
.
has_key?
(
:q
)
&&
params
[
:q
].
blank?
redirect_to
project_graph_path
(
@project
,
params
[
:id
])
return
end
if
params
.
has_key?
(
:q
)
@q
=
params
[
:q
]
@commit
=
@project
.
repository
.
commit
(
@q
)
||
@commit
end
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
format
.
json
do
format
.
json
do
...
...
app/views/graph/_head.html.haml
0 → 100644
View file @
8ff5cf9c
%ul
.nav.nav-tabs
%li
=
render
partial:
'shared/ref_switcher'
,
locals:
{
destination:
'graph'
,
path:
@path
}
%li
.pull-right.search
=
form_tag
project_graph_path
(
@project
,
params
[
:id
]),
method: :get
,
class:
'navbar-form'
do
|
f
|
=
label_tag
:search
,
"Looking for commit:"
=
text_field_tag
:q
,
@q
,
placeholder:
"Input SHA"
,
class:
"search-input"
%h3
.page_title
Project Network Graph
app/views/graph/show.html.haml
View file @
8ff5cf9c
%h3
.page_title
Project Network Graph
=
render
"head"
%br
=
render
partial:
'shared/ref_switcher'
,
locals:
{
destination:
'graph'
,
path:
@path
}
%br
.graph_holder
.graph_holder
%h4
%h4
%small
You can move around the graph by using the arrow keys.
%small
You can move around the graph by using the arrow keys.
...
@@ -12,9 +9,9 @@
...
@@ -12,9 +9,9 @@
var
branch_graph
;
var
branch_graph
;
$
(
function
(){
$
(
function
(){
branch_graph
=
new
BranchGraph
(
$
(
"
#holder
"
),
{
branch_graph
=
new
BranchGraph
(
$
(
"
#holder
"
),
{
url
:
'
#{
project_graph_path
(
@project
,
@ref
,
format: :json
)
}
'
,
url
:
'
#{
project_graph_path
(
@project
,
@ref
,
q:
@q
,
format: :json
)
}
'
,
commit_url
:
'
#{
project_commit_path
(
@project
,
'ae45ca32'
).
gsub
(
"ae45ca32"
,
"%s"
)
}
'
,
commit_url
:
'
#{
project_commit_path
(
@project
,
'ae45ca32'
).
gsub
(
"ae45ca32"
,
"%s"
)
}
'
,
ref
:
'
#{
@ref
}
'
,
ref
:
'
#{
@ref
}
'
,
commit_id
:
'
#{
@commit
&&
@commit
.
id
}
'
commit_id
:
'
#{
@commit
.
id
}
'
});
});
});
});
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