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
d66182c1
Commit
d66182c1
authored
Jul 31, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add push password handling for ee push pull
parent
c554c302
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
app/assets/javascripts/pages/projects/settings/repository/show/push_pull.js
...ipts/pages/projects/settings/repository/show/push_pull.js
+0
-1
ee/app/assets/javascripts/pages/projects/settings/repository/show/ee_push_pull.js
...s/pages/projects/settings/repository/show/ee_push_pull.js
+23
-1
No files found.
app/assets/javascripts/pages/projects/settings/repository/show/push_pull.js
View file @
d66182c1
...
...
@@ -10,7 +10,6 @@ export default class PushPull {
this
.
$form
=
$
(
'
.js-mirror-form
'
,
this
.
$container
);
this
.
$urlInput
=
$
(
'
.js-mirror-url
'
,
this
.
$form
);
this
.
$protectedBranchesInput
=
$
(
'
.js-mirror-protected
'
,
this
.
$form
);
this
.
$mirrorDirectionSelect
=
$
(
'
.js-mirror-direction
'
,
this
.
$form
);
this
.
$table
=
$
(
'
.js-mirrors-table-body
'
,
this
.
$container
);
this
.
mirrorEndpoint
=
this
.
$form
.
data
(
'
projectMirrorEndpoint
'
);
}
...
...
ee/app/assets/javascripts/pages/projects/settings/repository/show/ee_push_pull.js
View file @
d66182c1
...
...
@@ -8,6 +8,8 @@ export default class EEPushPull extends PushPull {
constructor
(...
args
)
{
super
(...
args
);
this
.
$password
=
undefined
;
this
.
$mirrorDirectionSelect
=
$
(
'
.js-mirror-direction
'
,
this
.
$form
);
this
.
$insertionPoint
=
$
(
'
.js-form-insertion-point
'
,
this
.
$form
);
this
.
$repoCount
=
$
(
'
.js-mirrored-repo-count
'
,
this
.
$container
);
this
.
directionFormMap
=
{
...
...
@@ -24,6 +26,17 @@ export default class EEPushPull extends PushPull {
super
.
init
();
}
updateUrl
()
{
let
val
=
this
.
$urlInput
.
val
();
if
(
this
.
$password
)
{
const
password
=
this
.
$password
.
val
();
if
(
password
)
val
=
val
.
replace
(
'
@
'
,
`:
${
password
}
@`
);
}
$
(
'
.js-mirror-url-hidden
'
,
this
.
$form
).
val
(
val
);
}
handleUpdate
()
{
return
this
.
hideForm
()
.
then
(()
=>
{
...
...
@@ -63,10 +76,14 @@ export default class EEPushPull extends PushPull {
this
.
updateUrl
();
this
.
updateProtectedBranches
();
if
(
direction
===
'
pull
'
)
this
.
initMirrorPull
();
if
(
direction
===
'
pull
'
)
return
this
.
initMirrorPull
();
return
this
.
initMirrorPush
();
}
initMirrorPull
()
{
this
.
$password
.
off
(
'
input.updateUrl
'
);
this
.
$password
=
undefined
;
const
mirrorPull
=
new
MirrorPull
(
'
.js-mirror-form
'
);
if
(
this
.
$urlInput
.
val
()
!==
''
)
mirrorPull
.
handleRepositoryUrlInput
();
...
...
@@ -75,6 +92,11 @@ export default class EEPushPull extends PushPull {
this
.
initSelect2
();
}
initMirrorPush
()
{
this
.
$password
=
$
(
'
.js-password
'
,
this
.
$form
);
this
.
$password
.
on
(
'
input.updateUrl
'
,
()
=>
this
.
debouncedUpdateUrl
());
}
initSelect2
()
{
$
(
'
.js-mirror-user
'
,
this
.
$form
).
select2
({
width
:
'
resolve
'
,
...
...
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