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
dee360bb
Commit
dee360bb
authored
Oct 22, 2019
by
Zack Cuddy
Committed by
Kushal Pandya
Oct 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the Geo Clone Modal
parent
f2a3ec28
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
6 additions
and
188 deletions
+6
-188
.haml-lint_todo.yml
.haml-lint_todo.yml
+0
-1
app/assets/javascripts/pages/projects/project.js
app/assets/javascripts/pages/projects/project.js
+0
-5
app/views/projects/buttons/_clone.html.haml
app/views/projects/buttons/_clone.html.haml
+0
-2
app/views/shared/_clone_panel.html.haml
app/views/shared/_clone_panel.html.haml
+0
-3
ee/app/assets/javascripts/init_geo_info_modal.js
ee/app/assets/javascripts/init_geo_info_modal.js
+0
-12
ee/app/assets/javascripts/pages/projects/show/index.js
ee/app/assets/javascripts/pages/projects/show/index.js
+0
-3
ee/app/helpers/ee/button_helper.rb
ee/app/helpers/ee/button_helper.rb
+0
-10
ee/app/views/projects/buttons/_geo.html.haml
ee/app/views/projects/buttons/_geo.html.haml
+0
-2
ee/app/views/shared/_geo_info_modal.html.haml
ee/app/views/shared/_geo_info_modal.html.haml
+0
-69
ee/app/views/shared/_geo_modal.html.haml
ee/app/views/shared/_geo_modal.html.haml
+0
-1
ee/app/views/shared/_geo_modal_button.html.haml
ee/app/views/shared/_geo_modal_button.html.haml
+0
-1
ee/changelogs/unreleased/remove-work-faster-modal.yml
ee/changelogs/unreleased/remove-work-faster-modal.yml
+5
-0
ee/spec/features/projects/geo_clone_instructions_spec.rb
ee/spec/features/projects/geo_clone_instructions_spec.rb
+0
-74
ee/spec/views/shared/_clone_panel.html.haml_spec.rb
ee/spec/views/shared/_clone_panel.html.haml_spec.rb
+1
-5
No files found.
.haml-lint_todo.yml
View file @
dee360bb
...
@@ -495,7 +495,6 @@ linters:
...
@@ -495,7 +495,6 @@ linters:
-
'
ee/app/views/projects/services/prometheus/_metrics.html.haml'
-
'
ee/app/views/projects/services/prometheus/_metrics.html.haml'
-
'
ee/app/views/projects/settings/slacks/edit.html.haml'
-
'
ee/app/views/projects/settings/slacks/edit.html.haml'
-
'
ee/app/views/shared/_additional_email_text.html.haml'
-
'
ee/app/views/shared/_additional_email_text.html.haml'
-
'
ee/app/views/shared/_geo_info_modal.html.haml'
-
'
ee/app/views/shared/_mirror_update_button.html.haml'
-
'
ee/app/views/shared/_mirror_update_button.html.haml'
-
'
ee/app/views/shared/_shared_runners_minutes_limit.html.haml'
-
'
ee/app/views/shared/_shared_runners_minutes_limit.html.haml'
-
'
ee/app/views/shared/audit_events/_event_table.html.haml'
-
'
ee/app/views/shared/audit_events/_event_table.html.haml'
...
...
app/assets/javascripts/pages/projects/project.js
View file @
dee360bb
...
@@ -40,11 +40,6 @@ export default class Project {
...
@@ -40,11 +40,6 @@ export default class Project {
$label
.
text
(
activeText
);
$label
.
text
(
activeText
);
});
});
$
(
'
#modal-geo-info
'
).
data
({
cloneUrlSecondary
:
$this
.
attr
(
'
href
'
),
cloneUrlPrimary
:
$this
.
data
(
'
primaryUrl
'
)
||
''
,
});
if
(
mobileCloneField
)
{
if
(
mobileCloneField
)
{
mobileCloneField
.
dataset
.
clipboardText
=
url
;
mobileCloneField
.
dataset
.
clipboardText
=
url
;
}
else
{
}
else
{
...
...
app/views/projects/buttons/_clone.html.haml
View file @
dee360bb
...
@@ -25,5 +25,3 @@
...
@@ -25,5 +25,3 @@
=
clipboard_button
(
target:
'#http_project_clone'
,
title:
_
(
"Copy URL"
),
class:
"input-group-text btn-default btn-clipboard"
)
=
clipboard_button
(
target:
'#http_project_clone'
,
title:
_
(
"Copy URL"
),
class:
"input-group-text btn-default btn-clipboard"
)
=
render_if_exists
'projects/buttons/geo'
=
render_if_exists
'projects/buttons/geo'
=
render_if_exists
'projects/buttons/kerberos_clone_field'
=
render_if_exists
'projects/buttons/kerberos_clone_field'
=
render_if_exists
'shared/geo_info_modal'
,
project:
project
app/views/shared/_clone_panel.html.haml
View file @
dee360bb
...
@@ -22,6 +22,3 @@
...
@@ -22,6 +22,3 @@
.input-group-append
.input-group-append
=
clipboard_button
(
target:
'#project_clone'
,
title:
_
(
"Copy URL"
),
class:
"input-group-text btn-default btn-clipboard"
)
=
clipboard_button
(
target:
'#project_clone'
,
title:
_
(
"Copy URL"
),
class:
"input-group-text btn-default btn-clipboard"
)
=
render_if_exists
'shared/geo_modal_button'
=
render_if_exists
'shared/geo_modal'
,
project:
project
ee/app/assets/javascripts/init_geo_info_modal.js
deleted
100644 → 0
View file @
f2a3ec28
import
$
from
'
jquery
'
;
export
default
()
=>
{
const
$modal
=
$
(
'
#modal-geo-info
'
);
if
(
!
$modal
.
length
)
return
;
$modal
.
appendTo
(
'
body
'
).
modal
({
modal
:
true
,
show
:
false
,
});
};
ee/app/assets/javascripts/pages/projects/show/index.js
View file @
dee360bb
import
'
~/pages/projects/show/index
'
;
import
'
~/pages/projects/show/index
'
;
import
initGeoInfoModal
from
'
../../../init_geo_info_modal
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initGeoInfoModal
);
ee/app/helpers/ee/button_helper.rb
View file @
dee360bb
...
@@ -44,15 +44,5 @@ module EE
...
@@ -44,15 +44,5 @@ module EE
title:
'Get a Kerberos token for your<br>account with kinit.'
title:
'Get a Kerberos token for your<br>account with kinit.'
}
}
end
end
def
geo_button
(
modal_target:
nil
)
data
=
{
placement:
'bottom'
,
container:
'body'
,
toggle:
'modal'
,
target:
modal_target
}
content_tag
:button
,
sprite_icon
(
'location-dot'
,
size:
15
),
class:
'btn btn-geo has-tooltip'
,
data:
data
,
type: :button
,
title:
'See Geo-specific instructions'
end
end
end
end
end
ee/app/views/projects/buttons/_geo.html.haml
deleted
100644 → 0
View file @
f2a3ec28
-
if
Gitlab
::
Geo
.
secondary?
=
geo_button
(
modal_target:
'#modal-geo-info'
)
ee/app/views/shared/_geo_info_modal.html.haml
deleted
100644 → 0
View file @
f2a3ec28
-
if
Gitlab
::
Geo
.
secondary?
#modal-geo-info
.modal.in
{
tabindex:
'-1'
}
.modal-dialog
.modal-content
.modal-header
%h3
.page-title
How to work faster with Geo
%a
.close
{
href:
"#"
,
"data-dismiss"
=>
"modal"
}
×
.modal-body
%p
%strong
=
'Step 1.'
Clone the repository from your secondary node:
-
if
project
.
ssh_url_to_repo
.
present?
%p
%strong
=
'SSH'
.form-group
.input-group
%input
#geo-info-1-ssh
.form-control
{
value:
"git clone "
+
project
.
ssh_url_to_repo
,
readonly:
"readonly"
}
.input-group-append
=
clipboard_button
(
target:
'#geo-info-1-ssh'
,
class:
"btn-default"
,
container:
"#modal-geo-info"
)
-
if
project
.
http_url_to_repo
.
present?
%p
%strong
=
'HTTP'
.form-group
.input-group
%input
#geo-info-1-http
.form-control
{
value:
"git clone "
+
project
.
http_url_to_repo
,
readonly:
"readonly"
}
.input-group-append
=
clipboard_button
(
target:
'#geo-info-1-http'
,
class:
"btn-default"
,
container:
"#modal-geo-info"
)
-
if
alternative_kerberos_url?
%p
%strong
=
'Kerberos'
.form-group
.input-group
%input
#geo-info-1-kerberos
.form-control
{
value:
"git clone "
+
project
.
kerberos_url_to_repo
,
readonly:
"readonly"
}
.input-group-append
=
clipboard_button
(
target:
'#geo-info-1-kerberos'
,
class:
"btn-default"
,
container:
"#modal-geo-info"
)
%p
%strong
=
'Step 2.'
Go to the new directory and define
%strong
=
"primary node's"
repository URL as the
%strong
=
'push'
remote:
-
if
geo_primary_ssh_url_to_repo
(
project
).
present?
or
geo_primary_http_url_to_repo
(
project
).
present?
-
if
geo_primary_ssh_url_to_repo
(
project
).
present?
%p
%strong
=
'SSH'
.form-group
.input-group
%input
#geo-info-2-ssh
.form-control
{
value:
"git remote set-url --push origin "
+
geo_primary_ssh_url_to_repo
(
project
),
readonly:
"readonly"
}
.input-group-append
=
clipboard_button
(
target:
'#geo-info-2-ssh'
,
class:
"btn-default"
,
container:
"#modal-geo-info"
)
-
if
geo_primary_http_url_to_repo
(
project
).
present?
%p
%strong
=
'HTTP'
.form-group
.input-group
%input
#geo-info-2-http
.form-control
{
value:
"git remote set-url --push origin "
+
geo_primary_http_url_to_repo
(
project
),
readonly:
"readonly"
}
.input-group-append
=
clipboard_button
(
target:
'#geo-info-2-http'
,
class:
"btn-default"
,
container:
"#modal-geo-info"
)
-
else
.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-append
=
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/app/views/shared/_geo_modal.html.haml
deleted
100644 → 0
View file @
f2a3ec28
=
render
'shared/geo_info_modal'
,
project:
project
if
Gitlab
::
Geo
.
secondary?
ee/app/views/shared/_geo_modal_button.html.haml
deleted
100644 → 0
View file @
f2a3ec28
=
geo_button
(
modal_target:
'#modal-geo-info'
)
if
Gitlab
::
Geo
.
secondary?
ee/changelogs/unreleased/remove-work-faster-modal.yml
0 → 100644
View file @
dee360bb
---
title
:
Remove the Geo Clone Modal
merge_request
:
18897
author
:
Zack Cuddy
type
:
removed
ee/spec/features/projects/geo_clone_instructions_spec.rb
deleted
100644 → 0
View file @
f2a3ec28
# frozen_string_literal: true
require
'spec_helper'
describe
'Geo clone instructions'
,
:geo
,
:js
do
include
Devise
::
Test
::
IntegrationHelpers
include
::
EE
::
GeoHelpers
let
(
:project
)
{
create
(
:project
,
:empty_repo
)
}
let
(
:developer
)
{
create
(
:user
)
}
before
do
primary
=
create
(
:geo_node
,
:primary
,
url:
'https://primary.domain.com'
)
primary
.
update_columns
(
clone_url_prefix:
'git@primary.domain.com:'
)
secondary
=
create
(
:geo_node
)
stub_current_geo_node
(
secondary
)
project
.
add_developer
(
developer
)
sign_in
(
developer
)
end
context
'with an SSH key'
do
before
do
create
(
:personal_key
,
user:
developer
)
end
it
'displays clone instructions'
do
visit_project
show_geo_clone_instructions
expect_instructions_for
(
'ssh'
)
expect_instructions_for
(
'http'
)
end
end
def
visit_project
visit
project_path
(
project
)
end
def
show_geo_clone_instructions
find
(
'.qa-clone-dropdown'
).
click
find
(
'.btn-geo'
,
match: :first
).
click
end
def
expect_instructions_for
(
protocol
)
primary_remote
=
primary_url
(
protocol
)
secondary_remote
=
secondary_url
(
protocol
)
expect
(
page
).
to
have_content
(
'How to work faster with Geo'
)
expect
(
page
.
find
(
"#geo-info-1-
#{
protocol
}
"
).
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-
#{
protocol
}
"
).
value
).
to
start_with
(
"git remote set-url --push origin
#{
primary_remote
}
"
)
end
def
primary_url
(
protocol
)
case
protocol
when
'ssh'
'git@primary.domain.com:'
when
'http'
'https://primary.domain.com'
end
end
def
secondary_url
(
protocol
)
case
protocol
when
'ssh'
project
.
ssh_url_to_repo
when
'http'
project
.
http_url_to_repo
end
end
end
ee/spec/views/shared/_clone_panel.html.haml_spec.rb
View file @
dee360bb
...
@@ -34,10 +34,6 @@ describe 'shared/_clone_panel' do
...
@@ -34,10 +34,6 @@ describe 'shared/_clone_panel' do
stub_current_geo_node
(
secondary
)
stub_current_geo_node
(
secondary
)
end
end
it
'renders Geo-specific instructions button'
do
it_behaves_like
'has no geo-specific instructions'
render
'shared/clone_panel'
,
project:
project
expect
(
rendered
).
to
match
/See Geo-specific instructions/
end
end
end
end
end
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