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
038d40f0
Commit
038d40f0
authored
Jun 11, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Solve inconsistency between network graph & stat graphs
parent
9e2c8d94
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
24 additions
and
18 deletions
+24
-18
app/controllers/graphs_controller.rb
app/controllers/graphs_controller.rb
+1
-1
app/controllers/network_controller.rb
app/controllers/network_controller.rb
+1
-1
app/controllers/refs_controller.rb
app/controllers/refs_controller.rb
+1
-1
app/views/graphs/show.html.haml
app/views/graphs/show.html.haml
+0
-0
app/views/graphs/show.js.haml
app/views/graphs/show.js.haml
+0
-0
app/views/layouts/nav/_project.html.haml
app/views/layouts/nav/_project.html.haml
+4
-4
app/views/network/_head.html.haml
app/views/network/_head.html.haml
+2
-2
app/views/network/show.html.haml
app/views/network/show.html.haml
+1
-1
app/views/network/show.json.erb
app/views/network/show.json.erb
+0
-0
config/routes.rb
config/routes.rb
+2
-2
features/steps/project/project_graph.rb
features/steps/project/project_graph.rb
+1
-1
features/steps/project/project_network_graph.rb
features/steps/project/project_network_graph.rb
+1
-1
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+1
-1
spec/routing/project_routing_spec.rb
spec/routing/project_routing_spec.rb
+9
-3
No files found.
app/controllers/
stat_graph
_controller.rb
→
app/controllers/
graphs
_controller.rb
View file @
038d40f0
class
StatGraph
Controller
<
ProjectResourceController
class
Graphs
Controller
<
ProjectResourceController
# Authorize
before_filter
:authorize_read_project!
before_filter
:authorize_code_access!
...
...
app/controllers/
graph
_controller.rb
→
app/controllers/
network
_controller.rb
View file @
038d40f0
class
Graph
Controller
<
ProjectResourceController
class
Network
Controller
<
ProjectResourceController
include
ExtractsPath
include
ApplicationHelper
...
...
app/controllers/refs_controller.rb
View file @
038d40f0
...
...
@@ -14,7 +14,7 @@ class RefsController < ProjectResourceController
elsif
params
[
:destination
]
==
"blob"
project_blob_path
(
@project
,
(
@id
))
elsif
params
[
:destination
]
==
"graph"
project_
graph
_path
(
@project
,
@id
,
@options
)
project_
network
_path
(
@project
,
@id
,
@options
)
else
project_commits_path
(
@project
,
@id
)
end
...
...
app/views/
stat_graph
/show.html.haml
→
app/views/
graphs
/show.html.haml
View file @
038d40f0
File moved
app/views/
stat_graph
/show.js.haml
→
app/views/
graphs
/show.js.haml
View file @
038d40f0
File moved
app/views/layouts/nav/_project.html.haml
View file @
038d40f0
...
...
@@ -9,10 +9,10 @@
=
link_to
'Files'
,
project_tree_path
(
@project
,
@ref
||
@repository
.
root_ref
)
=
nav_link
(
controller:
%w(commit commits compare repositories protected_branches)
)
do
=
link_to
"Commits"
,
project_commits_path
(
@project
,
@ref
||
@repository
.
root_ref
)
=
nav_link
(
controller:
%w(
graph
)
)
do
=
link_to
"Network"
,
project_
graph
_path
(
@project
,
@ref
||
@repository
.
root_ref
)
=
nav_link
(
controller:
%w(
stat_graph
)
)
do
=
link_to
"Graphs"
,
project_
stat_
graph_path
(
@project
,
@ref
||
@repository
.
root_ref
)
=
nav_link
(
controller:
%w(
network
)
)
do
=
link_to
"Network"
,
project_
network
_path
(
@project
,
@ref
||
@repository
.
root_ref
)
=
nav_link
(
controller:
%w(
graphs
)
)
do
=
link_to
"Graphs"
,
project_graph_path
(
@project
,
@ref
||
@repository
.
root_ref
)
-
if
@project
.
issues_enabled
=
nav_link
(
controller:
%w(issues milestones labels)
)
do
...
...
app/views/
graph
/_head.html.haml
→
app/views/
network
/_head.html.haml
View file @
038d40f0
...
...
@@ -5,7 +5,7 @@
.pull-left
=
render
partial:
'shared/ref_switcher'
,
locals:
{
destination:
'graph'
}
.pull-left
=
form_tag
project_
graph
_path
(
@project
,
@id
),
method: :get
do
|
f
|
=
form_tag
project_
network
_path
(
@project
,
@id
),
method: :get
do
|
f
|
.control-group
=
label_tag
:filter_ref
,
"Show only selected ref"
,
class:
'control-label light'
.controls
...
...
@@ -14,7 +14,7 @@
=
hidden_field_tag
(
key
,
value
,
id:
nil
)
unless
key
==
"filter_ref"
.search.pull-right
=
form_tag
project_
graph
_path
(
@project
,
@id
),
method: :get
do
|
f
|
=
form_tag
project_
network
_path
(
@project
,
@id
),
method: :get
do
|
f
|
.control-group
=
label_tag
:search
,
"Looking for commit:"
,
class:
'control-label light'
.controls
...
...
app/views/
graph
/show.html.haml
→
app/views/
network
/show.html.haml
View file @
038d40f0
...
...
@@ -11,7 +11,7 @@
$
(
this
).
closest
(
'
form
'
).
submit
();
});
branch_graph
=
new
BranchGraph
(
$
(
"
#holder
"
),
{
url
:
'
#{
project_
graph
_path
(
@project
,
@ref
,
@options
.
merge
(
format: :json
))
}
'
,
url
:
'
#{
project_
network
_path
(
@project
,
@ref
,
@options
.
merge
(
format: :json
))
}
'
,
commit_url
:
'
#{
project_commit_path
(
@project
,
'ae45ca32'
).
gsub
(
"ae45ca32"
,
"%s"
)
}
'
,
ref
:
'
#{
@ref
}
'
,
commit_id
:
'
#{
@commit
.
id
}
'
...
...
app/views/
graph
/show.json.erb
→
app/views/
network
/show.json.erb
View file @
038d40f0
File moved
config/routes.rb
View file @
038d40f0
...
...
@@ -190,8 +190,8 @@ Gitlab::Application.routes.draw do
resources
:commits
,
only:
[
:show
],
constraints:
{
id:
/(?:[^.]|\.(?!atom$))+/
,
format:
/atom/
}
resources
:compare
,
only:
[
:index
,
:create
]
resources
:blame
,
only:
[
:show
],
constraints:
{
id:
/.+/
}
resources
:
graph
,
only:
[
:show
],
constraints:
{
id:
/(?:[^.]|\.(?!json$))+/
,
format:
/json/
}
resources
:
stat_graph
,
only:
[
:show
],
constraints:
{
id:
/(?:[^.]|\.(?!json$))+/
,
format:
/json/
}
resources
:
network
,
only:
[
:show
],
constraints:
{
id:
/(?:[^.]|\.(?!json$))+/
,
format:
/json/
}
resources
:
graphs
,
only:
[
:show
],
constraints:
{
id:
/(?:[^.]|\.(?!json$))+/
,
format:
/json/
}
match
"/compare/:from...:to"
=>
"compare#show"
,
as:
"compare"
,
via:
[
:get
,
:post
],
constraints:
{
from:
/.+/
,
to:
/.+/
}
scope
module: :projects
do
...
...
features/steps/project/project_graph.rb
View file @
038d40f0
...
...
@@ -8,6 +8,6 @@ class ProjectGraph < Spinach::FeatureSteps
When
'I visit project "Shop" graph page'
do
project
=
Project
.
find_by_name
(
"Shop"
)
visit
project_
stat_
graph_path
(
project
,
"master"
)
visit
project_graph_path
(
project
,
"master"
)
end
end
features/steps/project/project_network_graph.rb
View file @
038d40f0
...
...
@@ -12,7 +12,7 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
Network
::
Graph
.
stub
(
max_count:
10
)
project
=
Project
.
find_by_name
(
"Shop"
)
visit
project_
graph
_path
(
project
,
"master"
)
visit
project_
network
_path
(
project
,
"master"
)
end
And
'page should select "master" in select box'
do
...
...
features/steps/shared/paths.rb
View file @
038d40f0
...
...
@@ -149,7 +149,7 @@ module SharedPaths
# Stub Graph max_size to speed up test (10 commits vs. 650)
Network
::
Graph
.
stub
(
max_count:
10
)
visit
project_
graph
_path
(
@project
,
root_ref
)
visit
project_
network
_path
(
@project
,
root_ref
)
end
step
"I visit my project's issues page"
do
...
...
spec/routing/project_routing_spec.rb
View file @
038d40f0
...
...
@@ -446,9 +446,15 @@ describe CompareController, "routing" do
end
end
describe
Graph
Controller
,
"routing"
do
describe
Network
Controller
,
"routing"
do
it
"to #show"
do
get
(
"/gitlabhq/graph/master"
).
should
route_to
(
'graph#show'
,
project_id:
'gitlabhq'
,
id:
'master'
)
get
(
"/gitlabhq/graph/master.json"
).
should
route_to
(
'graph#show'
,
project_id:
'gitlabhq'
,
id:
'master'
,
format:
"json"
)
get
(
"/gitlabhq/network/master"
).
should
route_to
(
'network#show'
,
project_id:
'gitlabhq'
,
id:
'master'
)
get
(
"/gitlabhq/network/master.json"
).
should
route_to
(
'network#show'
,
project_id:
'gitlabhq'
,
id:
'master'
,
format:
"json"
)
end
end
describe
GraphsController
,
"routing"
do
it
"to #show"
do
get
(
"/gitlabhq/graphs/master"
).
should
route_to
(
'graphs#show'
,
project_id:
'gitlabhq'
,
id:
'master'
)
end
end
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