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
9fcb63db
Commit
9fcb63db
authored
Jun 02, 2017
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add primary node clone URL to Geo secondary 'How to work faster with Geo' popover
Closes #2555
parent
7a048641
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
app/helpers/ee/gitlab_routing_helper.rb
app/helpers/ee/gitlab_routing_helper.rb
+6
-0
app/views/shared/_geo_info_modal.html.haml
app/views/shared/_geo_info_modal.html.haml
+2
-2
changelogs/unreleased-ee/sh-fix-issue-2555.yml
changelogs/unreleased-ee/sh-fix-issue-2555.yml
+4
-0
No files found.
app/helpers/ee/gitlab_routing_helper.rb
View file @
9fcb63db
...
...
@@ -4,6 +4,10 @@ module EE
File
.
join
(
::
Gitlab
::
Geo
.
primary_node
.
url
,
::
Gitlab
::
Routing
.
url_helpers
.
namespace_project_path
(
project
.
namespace
,
project
))
end
def
geo_primary_ssh_url_to_repo
(
project
)
"
#{
::
Gitlab
::
Geo
.
primary_node
.
clone_url_prefix
}#{
project
.
path_with_namespace
}
"
end
def
geo_primary_http_url_to_repo
(
project
)
"
#{
geo_primary_web_url
(
project
)
}
.git"
end
...
...
@@ -12,6 +16,8 @@ module EE
case
default_clone_protocol
when
'http'
geo_primary_http_url_to_repo
(
project
)
when
'ssh'
geo_primary_ssh_url_to_repo
(
project
)
end
end
end
...
...
app/views/shared/_geo_info_modal.html.haml
View file @
9fcb63db
...
...
@@ -21,7 +21,7 @@
remote:
=
clipboard_button
(
target:
'pre#geo-info-2'
)
%pre
#geo-info-2
.dark
git remote set-url --push origin
<
clone url for primary repository
>
git remote set-url --push origin
#{
geo_primary_default_url_to_repo
(
project
)
}
%p
%strong
=
'Done.'
...
...
@@ -37,7 +37,7 @@
'
git clone
'
+
(
data
.
cloneUrlSecondary
||
'
<clone url for secondary repository>
'
)
);
$
(
'
geo-info-2
'
).
text
(
$
(
'
#
geo-info-2
'
).
text
(
'
git remote set-url --push origin
'
+
(
data
.
cloneUrlPrimary
||
'
<clone url for primary repository>
'
)
);
...
...
changelogs/unreleased-ee/sh-fix-issue-2555.yml
0 → 100644
View file @
9fcb63db
---
title
:
Add primary node clone URL to Geo secondary 'How to work faster with Geo' popover
merge_request
:
author
:
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