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
3d2d1be2
Commit
3d2d1be2
authored
Aug 04, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-enable direction select if pull mirror is deleted
parent
4d216110
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
ee/app/assets/javascripts/pages/projects/settings/repository/show/ee_mirror_repos.js
...ages/projects/settings/repository/show/ee_mirror_repos.js
+4
-1
ee/app/views/projects/mirrors/_mirror_repos_form.html.haml
ee/app/views/projects/mirrors/_mirror_repos_form.html.haml
+6
-3
No files found.
ee/app/assets/javascripts/pages/projects/settings/repository/show/ee_mirror_repos.js
View file @
3d2d1be2
...
...
@@ -108,7 +108,10 @@ export default class EEMirrorRepos extends MirrorRepos {
};
}
super
.
deleteMirror
(
event
,
payload
);
return
super
.
deleteMirror
(
event
,
payload
)
.
then
(()
=>
{
if
(
isPullMirror
)
this
.
$mirrorDirectionSelect
.
removeAttr
(
'
disabled
'
);
});
}
removeRow
(
$target
)
{
...
...
ee/app/views/projects/mirrors/_mirror_repos_form.html.haml
View file @
3d2d1be2
...
...
@@ -2,14 +2,17 @@
-
is_one_user_option
=
default_mirror_users
.
count
==
1
-
protocols
=
Gitlab
::
UrlSanitizer
::
ALLOWED_SCHEMES
.
join
(
'|'
)
-
can_push
=
can?
(
current_user
,
:admin_remote_mirror
,
@project
)
-
can_pull
=
can?
(
current_user
,
:admin_mirror
,
@project
)
&&
!
@project
.
mirror
-
can_pull
=
can?
(
current_user
,
:admin_mirror
,
@project
)
-
options
=
[]
-
options
.
push
([
_
(
'Pull'
),
'pull'
])
if
can_pull
-
options
.
push
([
_
(
'Push'
),
'push'
])
if
can_push
-
if
can_pull
-
has_existing_pull_mirror
=
can_pull
&&
@project
.
mirror
-
pull_addition_method
=
has_existing_pull_mirror
?
options
.
method
(
:push
)
:
options
.
method
(
:unshift
)
-
pull_addition_method
.
call
([
_
(
'Pull'
),
'pull'
])
if
can_pull
.form-group
=
label_tag
:mirror_direction
,
_
(
'Mirror direction'
),
class:
'label-light'
=
select_tag
:mirror_direction
,
options_for_select
(
options
),
class:
'form-control js-mirror-direction'
,
disabled:
options
.
count
==
1
=
select_tag
:mirror_direction
,
options_for_select
(
options
),
class:
'form-control js-mirror-direction'
,
disabled:
(
options
.
count
==
1
)
||
has_existing_pull_mirror
.js-form-insertion-point
...
...
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