Commit 7409cd53 authored by Lukas Eipert's avatar Lukas Eipert Committed by Clement Ho

projects.scss: Fix deviation from CE and move EE only features to EE scss file.

parent c63e6801
......@@ -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;
}
......
......@@ -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>')}`,
);
});
......
......@@ -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;
}
}
- 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
......@@ -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 &lt;clone url for primary repository&gt;
.form-group
.input-group
%input#geo-info-2.form-control{ value: "git remote set-url --push origin &lt;clone url for primary repository&gt;", 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.
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment