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
369275d6
Commit
369275d6
authored
Jul 28, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix network graph when branch name has single quotes
Closes
https://github.com/gitlabhq/gitlabhq/issues/9500
parent
82f0d3e6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
5 deletions
+25
-5
CHANGELOG
CHANGELOG
+1
-0
app/controllers/projects/network_controller.rb
app/controllers/projects/network_controller.rb
+4
-0
app/views/projects/network/show.html.haml
app/views/projects/network/show.html.haml
+3
-3
features/project/network_graph.feature
features/project/network_graph.feature
+5
-0
features/steps/project/network_graph.rb
features/steps/project/network_graph.rb
+12
-2
No files found.
CHANGELOG
View file @
369275d6
Please view this file on the master branch, on stable branches it's out of date.
v 7.14.0 (unreleased)
- Fix network graph when branch name has single quotes (Stan Hu)
- Upgrade gitlab_git to version 7.2.6 to fix Error 500 when creating network graphs (Stan Hu)
- Fix URL used for refreshing notes if relative_url is present (Bartłomiej Święcki)
- Fix commit data retrieval when branch name has single quotes (Stan Hu)
...
...
app/controllers/projects/network_controller.rb
View file @
369275d6
...
...
@@ -7,6 +7,10 @@ class Projects::NetworkController < Projects::ApplicationController
before_action
:authorize_download_code!
def
show
@url
=
namespace_project_network_path
(
@project
.
namespace
,
@project
,
@ref
,
@options
.
merge
(
format: :json
))
@commit_url
=
namespace_project_commit_path
(
@project
.
namespace
,
@project
,
'ae45ca32'
).
gsub
(
"ae45ca32"
,
"%s"
)
respond_to
do
|
format
|
format
.
html
...
...
app/views/projects/network/show.html.haml
View file @
369275d6
...
...
@@ -17,9 +17,9 @@
:javascript
network_graph
=
new
Network
({
url
:
'
#{
namespace_project_network_path
(
@project
.
namespace
,
@project
,
@ref
,
@options
.
merge
(
format: :json
))
}
'
,
commit_url
:
'
#{
namespace_project_commit_path
(
@project
.
namespace
,
@project
,
'ae45ca32'
).
gsub
(
"ae45ca32"
,
"%s"
)
}
'
,
ref
:
'
#{
@ref
}
'
,
url
:
"
#{
escape_javascript
(
@url
)
}
"
,
commit_url
:
"
#{
escape_javascript
(
@commit_url
)
}
"
,
ref
:
"
#{
escape_javascript
(
@ref
)
}
"
,
commit_id
:
'
#{
@commit
.
id
}
'
})
new
ShortcutsNetwork
(
network_graph
.
branch_graph
)
features/project/network_graph.feature
View file @
369275d6
...
...
@@ -10,6 +10,11 @@ Feature: Project Network Graph
And
page should select
"master"
in select box
And
page should have
"master"
on graph
@javascript
Scenario
:
I
should see project network with 'test' branch
When
I visit project network page on branch 'test'
Then
page should have 'test' on graph
@javascript
Scenario
:
I
should switch
"branch"
and
"tag"
When
I switch ref to
"feature"
...
...
features/steps/project/network_graph.rb
View file @
369275d6
...
...
@@ -11,8 +11,12 @@ class Spinach::Features::ProjectNetworkGraph < Spinach::FeatureSteps
# Stub Graph max_size to speed up test (10 commits vs. 650)
Network
::
Graph
.
stub
(
max_count:
10
)
project
=
Project
.
find_by
(
name:
"Shop"
)
visit
namespace_project_network_path
(
project
.
namespace
,
project
,
"master"
)
@project
=
Project
.
find_by
(
name:
"Shop"
)
visit
namespace_project_network_path
(
@project
.
namespace
,
@project
,
"master"
)
end
step
"I visit project network page on branch 'test'"
do
visit
namespace_project_network_path
(
@project
.
namespace
,
@project
,
"'test'"
)
end
step
'page should select "master" in select box'
do
...
...
@@ -29,6 +33,12 @@ class Spinach::Features::ProjectNetworkGraph < Spinach::FeatureSteps
end
end
step
"page should have 'test' on graph"
do
page
.
within
'.network-graph'
do
expect
(
page
).
to
have_content
"'test'"
end
end
When
'I switch ref to "feature"'
do
select
'feature'
,
from:
'ref'
sleep
2
...
...
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