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
f0bf830f
Commit
f0bf830f
authored
Mar 04, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CodeStyle and small fixes
parent
a2c6dacc
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
8 deletions
+8
-8
app/models/geo_node.rb
app/models/geo_node.rb
+2
-2
app/services/geo/notify_nodes_service.rb
app/services/geo/notify_nodes_service.rb
+1
-1
app/views/layouts/nav/_admin.html.haml
app/views/layouts/nav/_admin.html.haml
+1
-1
lib/gitlab/backend/shell.rb
lib/gitlab/backend/shell.rb
+1
-1
lib/gitlab/geo.rb
lib/gitlab/geo.rb
+1
-1
lib/gitlab/git_access.rb
lib/gitlab/git_access.rb
+1
-1
lib/gitlab/git_access_wiki.rb
lib/gitlab/git_access_wiki.rb
+1
-1
No files found.
app/models/geo_node.rb
View file @
f0bf830f
...
...
@@ -76,7 +76,7 @@ class GeoNode < ActiveRecord::Base
self
.
build_geo_node_key
if
geo_node_key
.
nil?
end
def
geo_node_key_title
self
.
geo_node_key
.
title
=
"Geo node:
#{
self
.
url
}
"
def
change_
geo_node_key_title
self
.
geo_node_key
.
title
=
"Geo node:
#{
self
.
url
}
"
if
self
.
geo_node_key
end
end
app/services/geo/notify_nodes_service.rb
View file @
f0bf830f
...
...
@@ -30,7 +30,7 @@ module Geo
[(
response
.
code
>=
200
&&
response
.
code
<
300
),
ActionView
::
Base
.
full_sanitizer
.
sanitize
(
response
.
to_s
)]
rescue
HTTParty
::
Error
,
Errno
::
ECONNREFUSED
=>
e
return
[
false
,
ActionView
::
Base
.
full_sanitizer
.
sanitize
(
e
.
message
)]
[
false
,
ActionView
::
Base
.
full_sanitizer
.
sanitize
(
e
.
message
)]
end
def
private_token
...
...
app/views/layouts/nav/_admin.html.haml
View file @
f0bf830f
...
...
@@ -86,7 +86,7 @@
Labels
=
nav_link
(
controller: :geo_nodes
)
do
=
link_to
admin_geo_nodes_path
,
title:
'G
itlab Geo
'
do
=
link_to
admin_geo_nodes_path
,
title:
'G
eo Nodes
'
do
=
icon
(
'globe fw'
)
%span
Geo Nodes
...
...
lib/gitlab/backend/shell.rb
View file @
f0bf830f
...
...
@@ -50,7 +50,7 @@ module Gitlab
# Ex.
# fetch_remote("gitlab/gitlab-ci", "upstream")
#
def
fetch_remote
(
name
,
remote
,
forced
=
false
)
def
fetch_remote
(
name
,
remote
,
forced
:
false
)
args
=
[
gitlab_shell_projects_path
,
'fetch-remote'
,
"
#{
name
}
.git"
,
remote
,
'600'
]
args
<<
'--force'
if
forced
output
,
status
=
Popen
::
popen
(
args
)
...
...
lib/gitlab/geo.rb
View file @
f0bf830f
...
...
@@ -37,7 +37,7 @@ module Gitlab
end
def
self
.
bulk_notify_job
Sidekiq
::
Cron
::
Job
.
find
'geo_bulk_notify_worker'
Sidekiq
::
Cron
::
Job
.
find
(
'geo_bulk_notify_worker'
)
end
end
end
lib/gitlab/git_access.rb
View file @
f0bf830f
...
...
@@ -337,7 +337,7 @@ module Gitlab
end
if
Gitlab
::
Geo
.
enabled?
&&
Gitlab
::
Geo
.
secondary?
return
build_status_object
(
false
,
"You can't use git-annex with a secondary Git
l
ab Geo node."
)
return
build_status_object
(
false
,
"You can't use git-annex with a secondary Git
L
ab Geo node."
)
end
if
user
.
can?
(
:push_code
,
project
)
...
...
lib/gitlab/git_access_wiki.rb
View file @
f0bf830f
...
...
@@ -2,7 +2,7 @@ module Gitlab
class
GitAccessWiki
<
GitAccess
def
change_access_check
(
change
)
if
Gitlab
::
Geo
.
enabled?
&&
Gitlab
::
Geo
.
secondary?
build_status_object
(
false
,
"You can't push code to a secondary Git
l
ab Geo node."
)
build_status_object
(
false
,
"You can't push code to a secondary Git
L
ab Geo node."
)
elsif
user
.
can?
(
:create_wiki
,
project
)
build_status_object
(
true
)
else
...
...
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