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
Léo-Paul Géneau
gitlab-ce
Commits
56264f35
Commit
56264f35
authored
Oct 28, 2016
by
Hiroyuki Sato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Network page appear with an error message when entering nonexistent git revision
parent
c392b0cc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
5 deletions
+10
-5
app/assets/javascripts/network/network_bundle.js
app/assets/javascripts/network/network_bundle.js
+2
-0
app/controllers/projects/network_controller.rb
app/controllers/projects/network_controller.rb
+3
-1
app/views/projects/network/show.html.haml
app/views/projects/network/show.html.haml
+3
-2
lib/extracts_path.rb
lib/extracts_path.rb
+2
-2
No files found.
app/assets/javascripts/network/network_bundle.js
View file @
56264f35
...
...
@@ -9,6 +9,8 @@
(
function
()
{
$
(
function
()
{
if
(
!
$
(
"
.network-graph
"
).
length
)
return
;
var
network_graph
;
network_graph
=
new
Network
({
url
:
$
(
"
.network-graph
"
).
attr
(
'
data-url
'
),
...
...
app/controllers/projects/network_controller.rb
View file @
56264f35
...
...
@@ -11,7 +11,9 @@ class Projects::NetworkController < Projects::ApplicationController
@commit_url
=
namespace_project_commit_path
(
@project
.
namespace
,
@project
,
'ae45ca32'
).
gsub
(
"ae45ca32"
,
"%s"
)
respond_to
do
|
format
|
format
.
html
format
.
html
do
flash
.
now
[
:alert
]
=
"Git revision '
#{
params
[
:extended_sha1
]
}
' does not exist."
if
params
[
:extended_sha1
].
present?
&&
!
@commit
end
format
.
json
do
@graph
=
Network
::
Graph
.
new
(
project
,
@ref
,
@commit
,
@options
[
:filter_ref
])
...
...
app/views/projects/network/show.html.haml
View file @
56264f35
...
...
@@ -17,5 +17,6 @@
=
check_box_tag
:filter_ref
,
1
,
@options
[
:filter_ref
]
%span
Begin with the selected commit
.network-graph
{
data:
{
url:
@url
,
commit_url:
@commit_url
,
ref:
@ref
,
commit_id:
@commit
.
id
}
}
=
spinner
nil
,
true
-
if
@commit
.network-graph
{
data:
{
url:
@url
,
commit_url:
@commit_url
,
ref:
@ref
,
commit_id:
@commit
.
id
}
}
=
spinner
nil
,
true
lib/extracts_path.rb
View file @
56264f35
...
...
@@ -125,9 +125,9 @@ module ExtractsPath
request
.
format
=
:atom
if
@commit
end
end
raise
InvalidPathError
unless
@commit
raise
InvalidPathError
unless
@commit
end
@hex_path
=
Digest
::
SHA1
.
hexdigest
(
@path
)
@logs_path
=
logs_file_namespace_project_ref_path
(
@project
.
namespace
,
...
...
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