Commit 68c4e2a5 authored by Luke Bennett's avatar Luke Bennett

Review changes

parent cfaf99be
......@@ -50,7 +50,7 @@ export default class MirrorRepos {
this.debouncedUpdateUrl = _.debounce(() => this.updateUrl(), 200);
this.$urlInput.on('input', () => this.debouncedUpdateUrl());
this.$protectedBranchesInput.on('change', () => this.updateProtectedBranches());
this.$table.on('click', '.js-delete-mirror', this.deleteMirror.bind(this));
this.$table.on('click', '.js-delete-mirror', event => this.deleteMirror(event));
}
togglePassword() {
......
......@@ -242,10 +242,6 @@
&:not(:last-child) {
margin-right: 5px;
}
&.hide {
display: none;
}
}
}
......
......@@ -3,7 +3,7 @@
%li
= _('The repository must be accessible over <code>http://</code>,
<code>https://</code>, <code>ssh://</code> and <code>git://</code>.').html_safe
%li= _('The update action will time out after 10 minutes. For big repositories, use a clone/push combination.')
%li= _('The update action will time out after 15 minutes. For big repositories, use a clone/push combination.')
%li= _('The Git LFS objects will <strong>not</strong> be synced.').html_safe
%li
= _('This user will be the author of all events in the activity feed that are the result of an update,
......
......@@ -12,15 +12,15 @@
.settings-content
= form_for @project, url: project_mirror_path(@project), html: { class: 'gl-show-field-errors js-mirror-form', autocomplete: 'false', data: mirrors_form_data_attributes } do |f|
.panel.panel-default
.panel-heading
%h3.panel-title= _('Mirror a repository')
.panel-body
.card
.card-header
%h3.card-title= _('Mirror a repository')
.card-body
%div= form_errors(@project)
.form-group.has-feedback
= label_tag :url, _('Git repository URL'), class: 'label-light'
= text_field_tag :url, nil, class: 'form-control js-mirror-url js-repo-url', placeholder: _('Input your repository URL'), required: true, pattern: "(#{protocols}):\/\/.+"
= text_field_tag :url, nil, class: 'form-control js-mirror-url js-repo-url', placeholder: _('Input your repository URL'), required: true, pattern: "(#{protocols}):\/\/.+", title: 'A valid repository URL is required'
= render 'projects/mirrors/instructions'
......@@ -29,12 +29,12 @@
.form-check.append-bottom-10
= check_box_tag :only_protected_branches, '1', false, class: 'js-mirror-protected form-check-input'
= label_tag :only_protected_branches, _('Only mirror protected branches'), class: 'form-check-label'
= link_to icon('question-circle'), help_page_path('user/project/protected_branches')
= link_to icon('question-circle'), help_page_path('user/project/protected_branches'), target: '_blank'
.panel-footer
.card-footer
= f.submit _('Mirror repository'), class: 'btn btn-create', name: :update_remote_mirror
.panel.panel-default
.card
.table-responsive
%table.table.push-pull-table
%thead
......
......@@ -251,13 +251,13 @@ export default class MirrorPull {
const endpoint = button.data('endpoint');
button.attr('disabled', 'disabled');
spinner.removeClass('hide');
spinner.removeClass('d-none');
axios
.patch(endpoint)
.then(({ data }) => {
button.removeAttr('disabled');
spinner.addClass('hide');
spinner.addClass('d-none');
this.setSSHPublicKey(data.import_data_attributes.ssh_public_key);
})
......
......@@ -32,7 +32,8 @@ export default class EEMirrorRepos extends MirrorRepos {
this.updateForm();
this.showForm();
})
.catch(() => {
.catch((error) => {
console.log(error);
Flash(__('Something went wrong on our end.'));
});
}
......
......@@ -29,6 +29,6 @@
= button_tag type: 'button',
data: { endpoint: project_mirror_path(@project, project: { import_data_attributes: regen_data }) },
class: "btn btn-inverted btn-warning prepend-top-10 js-btn-regenerate-ssh-key#{ ' collapse' unless ssh_public_key_present }" do
%i.fa.fa-spinner.fa-spin.hide.js-spinner
%i.fa.fa-spinner.fa-spin.js-spinner
= _('Regenerate key')
= render 'projects/mirrors/pull/regenerate_public_ssh_key_confirm_modal'
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