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
7409cd53
Commit
7409cd53
authored
Mar 23, 2018
by
Lukas Eipert
Committed by
Clement Ho
Mar 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
projects.scss: Fix deviation from CE and move EE only features to EE scss file.
parent
c63e6801
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
104 deletions
+54
-104
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+1
-56
ee/app/assets/javascripts/init_geo_info_modal.js
ee/app/assets/javascripts/init_geo_info_modal.js
+2
-2
ee/app/assets/stylesheets/pages/projects.scss
ee/app/assets/stylesheets/pages/projects.scss
+35
-2
ee/app/views/projects/buttons/_update_mirror.html.haml
ee/app/views/projects/buttons/_update_mirror.html.haml
+0
-31
ee/app/views/shared/_geo_info_modal.html.haml
ee/app/views/shared/_geo_info_modal.html.haml
+13
-11
ee/spec/features/projects/geo_clone_instructions_spec.rb
ee/spec/features/projects/geo_clone_instructions_spec.rb
+3
-2
No files found.
app/assets/stylesheets/pages/projects.scss
View file @
7409cd53
...
...
@@ -34,19 +34,8 @@
}
}
.load-wrapper
{
position
:
absolute
;
background
:
$black-transparent
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
@media
(
max-width
:
$screen-xs-max
)
{
.input-group
>
div
{
&
:last-child
{
margin-bottom
:
0
;
}
...
...
@@ -577,6 +566,7 @@ a.deploy-project-label {
}
.import-buttons
{
padding-left
:
0
;
display
:
-
webkit-flex
;
display
:
flex
;
-webkit-flex-wrap
:
wrap
;
...
...
@@ -911,11 +901,6 @@ pre.light-well {
}
}
a
.allowed-to-merge
,
a
.allowed-to-push
{
cursor
:
pointer
;
}
.new-protected-branch
,
.new-protected-tag
{
label
{
...
...
@@ -944,10 +929,6 @@ a.allowed-to-push {
.table-bordered
{
border-radius
:
1px
;
td
{
vertical-align
:
top
;
}
th
:not
(
:last-child
),
td
:not
(
:last-child
)
{
border-right
:
solid
1px
transparent
;
...
...
@@ -964,10 +945,6 @@ a.allowed-to-push {
}
}
.disabled-item
{
@extend
.btn.disabled
;
}
.custom-notifications-form
{
.is-loading
{
.custom-notification-event-loading
{
...
...
@@ -998,22 +975,6 @@ a.allowed-to-push {
}
}
.project-mirror-text
{
@media
(
min-width
:
$screen-sm-min
)
{
float
:
left
;
line-height
:
35px
;
}
}
.project-mirror-button
{
margin-top
:
10px
;
@media
(
min-width
:
$screen-sm-min
)
{
float
:
right
;
margin-top
:
0
;
}
}
.compare-form-group
{
.dropdown-menu
,
.inline-input-group
{
...
...
@@ -1136,22 +1097,6 @@ a.allowed-to-push {
}
}
#modal-geo-info
.modal-dialog
{
max-width
:
700px
;
.btn-clipboard
{
@extend
.pull-right
;
margin-right
:
20px
;
margin-top
:
5px
;
position
:
absolute
;
right
:
0
;
}
.dark
{
margin-right
:
40px
;
}
}
.services-installation-info
.row
{
margin-bottom
:
10px
;
}
...
...
ee/app/assets/javascripts/init_geo_info_modal.js
View file @
7409cd53
...
...
@@ -17,11 +17,11 @@ export default () => {
cloneUrlSecondary
,
}
=
$
(
e
.
currentTarget
).
data
();
$
(
'
#geo-info-1
'
).
text
(
$
(
'
#geo-info-1
'
).
val
(
`git clone
${(
cloneUrlSecondary
||
'
<clone url for secondary repository>
'
)}
`
,
);
$
(
'
#geo-info-2
'
).
text
(
$
(
'
#geo-info-2
'
).
val
(
`git remote set-url --push origin
${(
cloneUrlPrimary
||
'
<clone url for primary repository>
'
)}
`
,
);
});
...
...
ee/app/assets/stylesheets/pages/projects.scss
View file @
7409cd53
...
...
@@ -41,7 +41,7 @@
}
.
fa
.
fa-chevron
:
:
before
{
content
:
"\f077"
;
content
:
'\f077'
;
}
&
.show-advanced
{
...
...
@@ -54,7 +54,7 @@
}
.
fa
.
fa-chevron
:
:
before
{
content
:
"\f078"
;
content
:
'\f078'
;
}
}
}
...
...
@@ -76,6 +76,39 @@
justify-content
:
center
;
}
}
.classification-label
{
background-color
:
$common-red
;
}
.load-wrapper
{
position
:
absolute
;
background
:
$black-transparent
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.project-mirror-text
{
@media
(
min-width
:
$screen-sm-min
)
{
float
:
left
;
line-height
:
35px
;
}
}
.project-mirror-button
{
margin-top
:
10px
;
@media
(
min-width
:
$screen-sm-min
)
{
float
:
right
;
margin-top
:
0
;
}
}
.git-clone-holder
{
.btn-geo
{
border-left
:
none
;
}
}
ee/app/views/projects/buttons/_update_mirror.html.haml
deleted
100644 → 0
View file @
c63e6801
-
if
can?
(
current_user
,
:push_code
,
@project
)
-
if
!
@project
.
has_remote_mirror?
&&
@project
.
mirror?
-
size
=
nil
unless
defined?
(
size
)
&&
size
-
if
@project
.
updating_mirror?
%span
.btn.disabled.update-mirror-button.has-tooltip
{
title:
"Updating from upstream..."
}
=
icon
(
'refresh'
)
-
else
=
link_to
update_now_project_mirror_path
(
@project
),
method: :post
,
class:
"btn update-mirror-button has-tooltip"
,
title:
"Update from upstream"
do
=
icon
(
'refresh'
)
-
elsif
@project
.
has_remote_mirror?
&&
!
@project
.
mirror?
-
if
@project
.
updating_remote_mirror?
%span
.btn.disabled.update-mirror-button.has-tooltip
{
title:
"Updating remote repository..."
}
=
icon
(
'refresh'
)
-
else
=
link_to
update_now_project_mirror_path
(
@project
,
sync_remote:
true
),
method: :post
,
class:
"btn update-mirror-button has-tooltip"
,
title:
"Update remote repository"
do
=
icon
(
'refresh'
)
-
elsif
@project
.
has_remote_mirror?
&&
@project
.
mirror?
.btn-group
%a
.btn.dropdown-toggle
{
href:
'#'
,
'data-toggle'
=>
'dropdown'
}
=
icon
(
'refresh'
)
%ul
.dropdown-menu.dropdown-menu-right
%li
-
if
@project
.
updating_mirror?
%span
.prepend-left-10.disabled-item
Updating from upstream...
-
else
=
link_to
"Update this repository"
,
update_now_project_mirror_path
(
@project
),
method: :post
%li
-
if
@project
.
updating_remote_mirror?
%span
.prepend-left-10.disabled-item
Updating remote repository...
-
else
=
link_to
"Update remote repository"
,
update_now_project_mirror_path
(
@project
,
sync_remote:
true
),
method: :post
ee/app/views/shared/_geo_info_modal.html.haml
View file @
7409cd53
...
...
@@ -2,16 +2,18 @@
.modal-dialog
.modal-content
.modal-header
%a
.close
{
href:
'#'
,
data:
{
dismiss:
'modal'
}
}
%h3
=
'How to work faster with Geo'
%a
.close
{
href:
"#"
,
"data-dismiss"
=>
"modal"
}
×
%h3
.page-title
How to work faster with Geo
.modal-body
%p
%strong
=
'Step 1.'
Clone the repository from your secondary node:
=
clipboard_button
(
target:
'pre#geo-info-1'
)
%pre
#geo-info-1
.dark
git clone
=
default_url_to_repo
()
.form-group
.input-group
%input
#geo-info-1
.form-control
{
value:
"git clone "
+
default_url_to_repo
(),
readonly:
"readonly"
}
.input-group-btn
=
clipboard_button
(
target:
'#geo-info-1'
,
class:
"btn-default"
,
container:
"#modal-geo-info"
)
%p
%strong
=
'Step 2.'
Go to the new directory and define
...
...
@@ -19,11 +21,11 @@
repository URL as the
%strong
=
'push'
remote:
=
clipboard_button
(
target:
'pre#geo-info-2'
)
%pre
#geo-info-2
.dark
git remote set-url --push origin
<
clone url for primary repository
>
.form-group
.input-group
%input
#geo-info-2
.form-control
{
value:
"git remote set-url --push origin <clone url for primary repository>"
,
readonly:
"readonly"
}
.input-group-btn
=
clipboard_button
(
target:
'#geo-info-2'
,
class:
"btn-default"
,
container:
"#modal-geo-info"
)
%p
%strong
=
'Done.'
You can now commit and push code as you normally do, but with increased speed.
ee/spec/features/projects/geo_clone_instructions_spec.rb
View file @
7409cd53
...
...
@@ -59,8 +59,9 @@ feature 'Geo clone instructions', :js do
secondary_remote
=
secondary_url
(
protocol
)
expect
(
page
).
to
have_content
(
'How to work faster with Geo'
)
expect
(
page
).
to
have_content
(
"git clone
#{
secondary_remote
}
"
)
expect
(
page
).
to
have_content
(
"git remote set-url --push origin
#{
primary_remote
}
"
)
expect
(
page
.
find
(
'#geo-info-1'
).
value
).
to
eq
"git clone
#{
secondary_remote
}
"
# the primary_url does not return the full url, but just the part up to the host:
expect
(
page
.
find
(
'#geo-info-2'
).
value
).
to
start_with
(
"git remote set-url --push origin
#{
primary_remote
}
"
)
end
def
primary_url
(
protocol
)
...
...
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