summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstance Okoghenun <cokoghenun@gitlab.com>2018-06-13 21:25:10 +0100
committerConstance Okoghenun <cokoghenun@gitlab.com>2018-06-13 21:25:10 +0100
commit41982eb0949a06c5ab77987a62092b0d938b252f (patch)
tree81000d2dd7794a14fdd07c61e2675f1c421fda19
parentb0b6833aec524e6dea294714f90ce35316ca7c64 (diff)
parent7cf571e95550b3c14eb971ea165a8930b809e1d7 (diff)
downloadgitlab-ce-46610-stop-horizontal-scrolling-when-clicking-on-board-issue.tar.gz
Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into 46610-stop-horizontal-scrolling-when-clicking-on-board-issue46610-stop-horizontal-scrolling-when-clicking-on-board-issue
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--GITALY_SERVER_VERSION2
-rw-r--r--PROCESS.md1
-rw-r--r--app/assets/javascripts/badges/components/badge.vue12
-rw-r--r--app/assets/javascripts/badges/components/badge_form.vue16
-rw-r--r--app/assets/javascripts/badges/components/badge_list_row.vue10
-rw-r--r--app/assets/javascripts/badges/components/badge_settings.vue2
-rw-r--r--app/assets/javascripts/boards/components/board.js50
-rw-r--r--app/assets/javascripts/boards/components/board_blank_state.vue4
-rw-r--r--app/assets/javascripts/boards/components/board_card.vue2
-rw-r--r--app/assets/javascripts/boards/components/board_delete.js5
-rw-r--r--app/assets/javascripts/boards/components/board_list.vue14
-rw-r--r--app/assets/javascripts/boards/components/board_new_issue.vue14
-rw-r--r--app/assets/javascripts/boards/components/board_sidebar.js57
-rw-r--r--app/assets/javascripts/boards/components/issue_card_inner.js7
-rw-r--r--app/assets/javascripts/boards/components/modal/empty_state.js6
-rw-r--r--app/assets/javascripts/boards/components/modal/footer.js6
-rw-r--r--app/assets/javascripts/boards/components/modal/header.js8
-rw-r--r--app/assets/javascripts/boards/components/modal/index.js52
-rw-r--r--app/assets/javascripts/boards/components/modal/list.js44
-rw-r--r--app/assets/javascripts/boards/models/list.js3
-rw-r--r--app/assets/javascripts/clusters/components/application_row.vue8
-rw-r--r--app/assets/javascripts/clusters/components/applications.vue18
-rw-r--r--app/assets/javascripts/commit/pipelines/pipelines_table.vue4
-rw-r--r--app/assets/javascripts/cycle_analytics/components/banner.vue2
-rw-r--r--app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue4
-rw-r--r--app/assets/javascripts/cycle_analytics/components/stage_component.vue2
-rw-r--r--app/assets/javascripts/cycle_analytics/components/stage_review_component.vue4
-rw-r--r--app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue4
-rw-r--r--app/assets/javascripts/cycle_analytics/components/stage_test_component.vue2
-rw-r--r--app/assets/javascripts/deploy_keys/components/action_btn.vue2
-rw-r--r--app/assets/javascripts/deploy_keys/components/app.vue6
-rw-r--r--app/assets/javascripts/deploy_keys/components/key.vue30
-rw-r--r--app/assets/javascripts/deploy_keys/components/keys_panel.vue2
-rw-r--r--app/assets/javascripts/diff_notes/components/comment_resolve_btn.js5
-rw-r--r--app/assets/javascripts/diff_notes/components/diff_note_avatars.js149
-rw-r--r--app/assets/javascripts/diff_notes/components/jump_to_discussion.js11
-rw-r--r--app/assets/javascripts/diff_notes/components/resolve_btn.js92
-rw-r--r--app/assets/javascripts/diff_notes/components/resolve_count.js5
-rw-r--r--app/assets/javascripts/diff_notes/components/resolve_discussion_btn.js25
-rw-r--r--app/assets/javascripts/environments/components/container.vue6
-rw-r--r--app/assets/javascripts/environments/components/environment_actions.vue14
-rw-r--r--app/assets/javascripts/environments/components/environment_external_url.vue8
-rw-r--r--app/assets/javascripts/environments/components/environment_item.vue16
-rw-r--r--app/assets/javascripts/environments/components/environment_monitoring.vue8
-rw-r--r--app/assets/javascripts/environments/components/environment_rollback.vue2
-rw-r--r--app/assets/javascripts/environments/components/environment_stop.vue6
-rw-r--r--app/assets/javascripts/environments/components/environment_terminal_button.vue6
-rw-r--r--app/assets/javascripts/environments/components/environments_app.vue4
-rw-r--r--app/assets/javascripts/environments/folder/environments_folder_view.vue4
-rw-r--r--app/assets/javascripts/filtered_search/components/recent_searches_dropdown_content.vue2
-rw-r--r--app/assets/javascripts/groups/components/app.vue6
-rw-r--r--app/assets/javascripts/groups/components/group_item.vue12
-rw-r--r--app/assets/javascripts/groups/components/item_actions.vue4
-rw-r--r--app/assets/javascripts/groups/components/item_stats.vue22
-rw-r--r--app/assets/javascripts/groups/components/item_stats_value.vue2
-rw-r--r--app/assets/javascripts/ide/components/activity_bar.vue36
-rw-r--r--app/assets/javascripts/ide/components/commit_sidebar/form.vue10
-rw-r--r--app/assets/javascripts/ide/components/commit_sidebar/list.vue12
-rw-r--r--app/assets/javascripts/ide/components/commit_sidebar/list_item.vue20
-rw-r--r--app/assets/javascripts/ide/components/commit_sidebar/message_field.vue10
-rw-r--r--app/assets/javascripts/ide/components/commit_sidebar/radio_group.vue8
-rw-r--r--app/assets/javascripts/ide/components/commit_sidebar/stage_button.vue12
-rw-r--r--app/assets/javascripts/ide/components/commit_sidebar/unstage_button.vue6
-rw-r--r--app/assets/javascripts/ide/components/editor_mode_dropdown.vue8
-rw-r--r--app/assets/javascripts/ide/components/external_link.vue4
-rw-r--r--app/assets/javascripts/ide/components/file_finder/index.vue18
-rw-r--r--app/assets/javascripts/ide/components/file_finder/item.vue4
-rw-r--r--app/assets/javascripts/ide/components/ide.vue2
-rw-r--r--app/assets/javascripts/ide/components/ide_review.vue2
-rw-r--r--app/assets/javascripts/ide/components/ide_side_bar.vue14
-rw-r--r--app/assets/javascripts/ide/components/ide_status_bar.vue20
-rw-r--r--app/assets/javascripts/ide/components/ide_tree_list.vue4
-rw-r--r--app/assets/javascripts/ide/components/jobs/detail.vue8
-rw-r--r--app/assets/javascripts/ide/components/jobs/detail/description.vue4
-rw-r--r--app/assets/javascripts/ide/components/jobs/detail/scroll_button.vue4
-rw-r--r--app/assets/javascripts/ide/components/jobs/item.vue2
-rw-r--r--app/assets/javascripts/ide/components/jobs/stage.vue6
-rw-r--r--app/assets/javascripts/ide/components/merge_requests/dropdown.vue4
-rw-r--r--app/assets/javascripts/ide/components/merge_requests/item.vue2
-rw-r--r--app/assets/javascripts/ide/components/merge_requests/list.vue8
-rw-r--r--app/assets/javascripts/ide/components/mr_file_icon.vue4
-rw-r--r--app/assets/javascripts/ide/components/new_dropdown/index.vue8
-rw-r--r--app/assets/javascripts/ide/components/new_dropdown/modal.vue6
-rw-r--r--app/assets/javascripts/ide/components/new_dropdown/upload.vue2
-rw-r--r--app/assets/javascripts/ide/components/panes/right.vue8
-rw-r--r--app/assets/javascripts/ide/components/pipelines/list.vue2
-rw-r--r--app/assets/javascripts/ide/components/repo_commit_section.vue27
-rw-r--r--app/assets/javascripts/ide/components/repo_editor.vue35
-rw-r--r--app/assets/javascripts/ide/components/repo_file.vue8
-rw-r--r--app/assets/javascripts/ide/components/repo_file_status_icon.vue2
-rw-r--r--app/assets/javascripts/ide/components/repo_loading_file.vue2
-rw-r--r--app/assets/javascripts/ide/components/repo_tab.vue8
-rw-r--r--app/assets/javascripts/ide/components/repo_tabs.vue2
-rw-r--r--app/assets/javascripts/ide/components/resizable_panel.vue4
-rw-r--r--app/assets/javascripts/ide/constants.js12
-rw-r--r--app/assets/javascripts/ide/stores/mutations/file.js14
-rw-r--r--app/assets/javascripts/ide/stores/utils.js2
-rw-r--r--app/assets/javascripts/issue_show/components/description.vue10
-rw-r--r--app/assets/javascripts/issue_show/components/edit_actions.vue16
-rw-r--r--app/assets/javascripts/issue_show/components/edited.vue4
-rw-r--r--app/assets/javascripts/issue_show/components/fields/description.vue6
-rw-r--r--app/assets/javascripts/issue_show/components/fields/description_template.vue10
-rw-r--r--app/assets/javascripts/issue_show/components/fields/title.vue2
-rw-r--r--app/assets/javascripts/issue_show/components/form.vue4
-rw-r--r--app/assets/javascripts/issue_show/components/title.vue4
-rw-r--r--app/assets/javascripts/jobs/components/header.vue2
-rw-r--r--app/assets/javascripts/jobs/components/sidebar_details_block.vue44
-rw-r--r--app/assets/javascripts/merge_conflicts/components/diff_file_editor.js15
-rw-r--r--app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.js13
-rw-r--r--app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js9
-rw-r--r--app/assets/javascripts/merge_conflicts/merge_conflict_service.js29
-rw-r--r--app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js4
-rw-r--r--app/assets/javascripts/merge_conflicts/mixins/line_conflict_actions.js20
-rw-r--r--app/assets/javascripts/merge_conflicts/mixins/line_conflict_utils.js32
-rw-r--r--app/assets/javascripts/milestone_select.js2
-rw-r--r--app/assets/javascripts/monitoring/components/empty_state.vue4
-rw-r--r--app/assets/javascripts/monitoring/components/graph.vue14
-rw-r--r--app/assets/javascripts/monitoring/components/graph/axis.vue20
-rw-r--r--app/assets/javascripts/monitoring/components/graph/deployment.vue4
-rw-r--r--app/assets/javascripts/monitoring/components/graph/flag.vue8
-rw-r--r--app/assets/javascripts/monitoring/components/graph/legend.vue14
-rw-r--r--app/assets/javascripts/monitoring/components/graph/path.vue10
-rw-r--r--app/assets/javascripts/monitoring/components/graph/track_line.vue2
-rw-r--r--app/assets/javascripts/notebook/cells/code.vue4
-rw-r--r--app/assets/javascripts/notebook/cells/code/index.vue4
-rw-r--r--app/assets/javascripts/notebook/cells/output/index.vue2
-rw-r--r--app/assets/javascripts/notes/components/comment_form.vue26
-rw-r--r--app/assets/javascripts/notes/components/diff_file_header.vue12
-rw-r--r--app/assets/javascripts/notes/components/diff_with_note.vue6
-rw-r--r--app/assets/javascripts/notes/components/discussion_counter.vue6
-rw-r--r--app/assets/javascripts/notes/components/discussion_locked_widget.vue2
-rw-r--r--app/assets/javascripts/notes/components/note_actions.vue28
-rw-r--r--app/assets/javascripts/notes/components/note_awards_list.vue16
-rw-r--r--app/assets/javascripts/notes/components/note_body.vue10
-rw-r--r--app/assets/javascripts/notes/components/note_form.vue20
-rw-r--r--app/assets/javascripts/notes/components/note_header.vue12
-rw-r--r--app/assets/javascripts/notes/components/noteable_discussion.vue18
-rw-r--r--app/assets/javascripts/notes/components/noteable_note.vue6
-rw-r--r--app/assets/javascripts/pages/admin/jobs/index/components/stop_jobs_modal.vue2
-rw-r--r--app/assets/javascripts/pages/admin/projects/index/components/delete_project_modal.vue6
-rw-r--r--app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue10
-rw-r--r--app/assets/javascripts/pages/milestones/shared/components/delete_milestone_modal.vue2
-rw-r--r--app/assets/javascripts/pages/milestones/shared/components/promote_milestone_modal.vue2
-rw-r--r--app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue2
-rw-r--r--app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/interval_pattern_input.vue22
-rw-r--r--app/assets/javascripts/pages/projects/shared/permissions/components/project_feature_setting.vue8
-rw-r--r--app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue32
-rw-r--r--app/assets/javascripts/pages/projects/wikis/components/delete_wiki_modal.vue4
-rw-r--r--app/assets/javascripts/pages/sessions/new/username_validator.js9
-rw-r--r--app/assets/javascripts/pdf/index.vue4
-rw-r--r--app/assets/javascripts/pdf/page/index.vue2
-rw-r--r--app/assets/javascripts/performance_bar/components/detailed_metric.vue2
-rw-r--r--app/assets/javascripts/pipelines/components/graph/action_component.vue8
-rw-r--r--app/assets/javascripts/pipelines/components/graph/dropdown_job_component.vue2
-rw-r--r--app/assets/javascripts/pipelines/components/graph/job_component.vue4
-rw-r--r--app/assets/javascripts/pipelines/components/graph/stage_column_component.vue6
-rw-r--r--app/assets/javascripts/pipelines/components/header_component.vue2
-rw-r--r--app/assets/javascripts/pipelines/components/nav_controls.vue4
-rw-r--r--app/assets/javascripts/pipelines/components/pipeline_url.vue18
-rw-r--r--app/assets/javascripts/pipelines/components/pipelines.vue8
-rw-r--r--app/assets/javascripts/pipelines/components/pipelines_actions.vue6
-rw-r--r--app/assets/javascripts/pipelines/components/pipelines_artifacts.vue2
-rw-r--r--app/assets/javascripts/pipelines/components/pipelines_table.vue2
-rw-r--r--app/assets/javascripts/pipelines/components/pipelines_table_row.vue16
-rw-r--r--app/assets/javascripts/pipelines/components/stage.vue10
-rw-r--r--app/assets/javascripts/pipelines/components/time_ago.vue8
-rw-r--r--app/assets/javascripts/profile/account/components/delete_account_modal.vue12
-rw-r--r--app/assets/javascripts/profile/account/components/update_username.vue8
-rw-r--r--app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue4
-rw-r--r--app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue2
-rw-r--r--app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_zone_dropdown.vue4
-rw-r--r--app/assets/javascripts/projects/tree/components/commit_pipeline_status_component.vue4
-rw-r--r--app/assets/javascripts/projects_dropdown/components/app.vue6
-rw-r--r--app/assets/javascripts/projects_dropdown/components/projects_list_frequent.vue4
-rw-r--r--app/assets/javascripts/projects_dropdown/components/projects_list_item.vue10
-rw-r--r--app/assets/javascripts/projects_dropdown/components/projects_list_search.vue2
-rw-r--r--app/assets/javascripts/projects_dropdown/components/search.vue4
-rw-r--r--app/assets/javascripts/registry/components/app.vue2
-rw-r--r--app/assets/javascripts/registry/components/collapsible_container.vue10
-rw-r--r--app/assets/javascripts/registry/components/table_registry.vue6
-rw-r--r--app/assets/javascripts/sidebar/components/assignees/assignees.vue30
-rw-r--r--app/assets/javascripts/sidebar/components/assignees/sidebar_assignees.vue4
-rw-r--r--app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue10
-rw-r--r--app/assets/javascripts/sidebar/components/lock/edit_form.vue4
-rw-r--r--app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue10
-rw-r--r--app/assets/javascripts/sidebar/components/participants/participants.vue8
-rw-r--r--app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue2
-rw-r--r--app/assets/javascripts/sidebar/components/time_tracking/collapsed_state.vue4
-rw-r--r--app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.vue9
-rw-r--r--app/assets/javascripts/sidebar/components/time_tracking/help_state.vue2
-rw-r--r--app/assets/javascripts/sidebar/components/time_tracking/time_tracker.vue6
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/deployment.vue4
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue4
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author_time.vue2
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue12
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue4
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/source_branch_removal_status.vue2
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.vue2
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_checking.vue2
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_conflicts.vue2
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.vue6
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merge_when_pipeline_succeeds.vue6
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue22
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_missing_branch.vue4
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_not_allowed.vue2
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.vue2
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue2
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_squash_before_merge.vue6
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/pipeline_failed.vue2
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue28
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/sha_mismatch.vue2
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/unresolved_discussions.vue2
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue6
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/ci_badge_link.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/clipboard_button.vue6
-rw-r--r--app/assets/javascripts/vue_shared/components/commit.vue12
-rw-r--r--app/assets/javascripts/vue_shared/components/content_viewer/viewers/download_viewer.vue7
-rw-r--r--app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue43
-rw-r--r--app/assets/javascripts/vue_shared/components/deprecated_modal.vue18
-rw-r--r--app/assets/javascripts/vue_shared/components/diff_viewer/constants.js12
-rw-r--r--app/assets/javascripts/vue_shared/components/diff_viewer/diff_viewer.vue70
-rw-r--r--app/assets/javascripts/vue_shared/components/diff_viewer/viewers/download_diff_viewer.vue69
-rw-r--r--app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/onion_skin_viewer.vue160
-rw-r--r--app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/swipe_viewer.vue158
-rw-r--r--app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/two_up_viewer.vue41
-rw-r--r--app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer.vue109
-rw-r--r--app/assets/javascripts/vue_shared/components/dropdown/dropdown_button.vue4
-rw-r--r--app/assets/javascripts/vue_shared/components/dropdown/dropdown_hidden_input.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/dropdown/dropdown_search_input.vue4
-rw-r--r--app/assets/javascripts/vue_shared/components/expand_button.vue4
-rw-r--r--app/assets/javascripts/vue_shared/components/file_icon.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/gl_modal.vue6
-rw-r--r--app/assets/javascripts/vue_shared/components/header_ci_component.vue12
-rw-r--r--app/assets/javascripts/vue_shared/components/identicon.vue4
-rw-r--r--app/assets/javascripts/vue_shared/components/issue/issue_warning.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/lib/utils/dom_utils.js5
-rw-r--r--app/assets/javascripts/vue_shared/components/loading_button.vue6
-rw-r--r--app/assets/javascripts/vue_shared/components/loading_icon.vue4
-rw-r--r--app/assets/javascripts/vue_shared/components/markdown/field.vue12
-rw-r--r--app/assets/javascripts/vue_shared/components/markdown/header.vue14
-rw-r--r--app/assets/javascripts/vue_shared/components/markdown/toolbar_button.vue8
-rw-r--r--app/assets/javascripts/vue_shared/components/memory_graph.vue4
-rw-r--r--app/assets/javascripts/vue_shared/components/navigation_tabs.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/panel_resizer.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/project_avatar/image.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/recaptcha_modal.vue4
-rw-r--r--app/assets/javascripts/vue_shared/components/sidebar/date_picker.vue4
-rw-r--r--app/assets/javascripts/vue_shared/components/sidebar/labels_select/base.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_button.vue6
-rw-r--r--app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_create_label.vue10
-rw-r--r--app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_footer.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_search_input.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value.vue8
-rw-r--r--app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/sidebar/toggle_sidebar.vue10
-rw-r--r--app/assets/javascripts/vue_shared/components/skeleton_loading_container.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue14
-rw-r--r--app/assets/javascripts/vue_shared/components/table_pagination.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/tabs/tab.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/toggle_button.vue10
-rw-r--r--app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue3
-rw-r--r--app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_link.vue6
-rw-r--r--app/assets/stylesheets/framework/files.scss48
-rw-r--r--app/assets/stylesheets/framework/mixins.scss1
-rw-r--r--app/assets/stylesheets/framework/secondary_navigation_elements.scss2
-rw-r--r--app/assets/stylesheets/framework/tables.scss2
-rw-r--r--app/assets/stylesheets/pages/boards.scss11
-rw-r--r--app/assets/stylesheets/pages/diff.scss132
-rw-r--r--app/assets/stylesheets/pages/members.scss4
-rw-r--r--app/assets/stylesheets/pages/merge_requests.scss1
-rw-r--r--app/assets/stylesheets/pages/projects.scss6
-rw-r--r--app/assets/stylesheets/pages/repo.scss5
-rw-r--r--app/controllers/application_controller.rb6
-rw-r--r--app/models/project_services/chat_message/base_message.rb7
-rw-r--r--app/models/project_services/chat_message/pipeline_message.rb4
-rw-r--r--app/models/project_services/microsoft_teams_service.rb2
-rw-r--r--app/models/timelog.rb5
-rw-r--r--app/services/quick_actions/interpret_service.rb11
-rw-r--r--app/uploaders/file_uploader.rb6
-rw-r--r--app/uploaders/object_storage.rb46
-rw-r--r--app/uploaders/records_uploads.rb2
-rw-r--r--app/views/admin/application_settings/_abuse.html.haml11
-rw-r--r--app/views/admin/application_settings/_account_and_limit.html.haml60
-rw-r--r--app/views/admin/application_settings/_background_jobs.html.haml35
-rw-r--r--app/views/admin/application_settings/_ci_cd.html.haml76
-rw-r--r--app/views/admin/application_settings/_email.html.haml38
-rw-r--r--app/views/admin/application_settings/_gitaly.html.haml39
-rw-r--r--app/views/admin/application_settings/_help_page.html.haml29
-rw-r--r--app/views/admin/application_settings/_influx.html.haml104
-rw-r--r--app/views/admin/application_settings/_ip_limits.html.haml87
-rw-r--r--app/views/admin/application_settings/_koding.html.haml34
-rw-r--r--app/views/admin/application_settings/_logging.html.haml50
-rw-r--r--app/views/admin/application_settings/_outbound.html.haml11
-rw-r--r--app/views/admin/application_settings/_pages.html.haml30
-rw-r--r--app/views/admin/application_settings/_performance.html.haml25
-rw-r--r--app/views/admin/application_settings/_performance_bar.html.haml18
-rw-r--r--app/views/admin/application_settings/_plantuml.html.haml26
-rw-r--r--app/views/admin/application_settings/_prometheus.html.haml25
-rw-r--r--app/views/admin/application_settings/_realtime.html.haml23
-rw-r--r--app/views/admin/application_settings/_registry.html.haml7
-rw-r--r--app/views/admin/application_settings/_repository_check.html.haml90
-rw-r--r--app/views/admin/application_settings/_repository_mirrors_form.html.haml19
-rw-r--r--app/views/admin/application_settings/_repository_storage.html.haml89
-rw-r--r--app/views/admin/application_settings/_signin.html.haml96
-rw-r--r--app/views/admin/application_settings/_signup.html.haml94
-rw-r--r--app/views/admin/application_settings/_spam.html.haml110
-rw-r--r--app/views/admin/application_settings/_terminal.html.haml13
-rw-r--r--app/views/admin/application_settings/_terms.html.haml27
-rw-r--r--app/views/admin/application_settings/_usage.html.haml58
-rw-r--r--app/views/admin/application_settings/_visibility_and_access.html.haml103
-rw-r--r--app/views/admin/application_settings/show.html.haml2
-rw-r--r--app/views/award_emoji/_awards_block.html.haml4
-rw-r--r--app/views/errors/access_denied.html.haml2
-rw-r--r--app/views/groups/group_members/index.html.haml7
-rw-r--r--app/views/projects/deploy_keys/_index.html.haml2
-rw-r--r--app/views/projects/edit.html.haml4
-rw-r--r--app/views/projects/merge_requests/show.html.haml39
-rw-r--r--app/views/projects/project_members/_team.html.haml7
-rw-r--r--app/views/projects/protected_branches/shared/_index.html.haml2
-rw-r--r--app/views/projects/settings/ci_cd/show.html.haml6
-rw-r--r--app/views/shared/empty_states/_wikis.html.haml2
-rw-r--r--changelogs/unreleased/35158-snippets-api-visibility.yml5
-rw-r--r--changelogs/unreleased/42342-teams-pipeline-notifications.yml5
-rw-r--r--changelogs/unreleased/44674-use-one-column-form-layout-on-admin-area-settings-page.yml5
-rw-r--r--changelogs/unreleased/45575-invalid-characters-signup.yml5
-rw-r--r--changelogs/unreleased/47050-quick-actions-case-insensitive.yml5
-rw-r--r--changelogs/unreleased/47145-quick-actions-confidential.yml5
-rw-r--r--changelogs/unreleased/47408-migrateuploadsworker-is-doing-n-1-queries-on-migration.yml5
-rw-r--r--changelogs/unreleased/47513-upload-migration-lease-key-is-incorrect-for-non-mounted-uploaders.yml5
-rw-r--r--changelogs/unreleased/commits_api_with_stats.yml5
-rw-r--r--changelogs/unreleased/fj-restore-users-v3-endpoint.yml5
-rw-r--r--changelogs/unreleased/mk-rake-task-verify-remote-files.yml5
-rw-r--r--changelogs/unreleased/rails5-fix-47366.yml5
-rw-r--r--changelogs/unreleased/rosulk-patch-12.yml5
-rw-r--r--changelogs/unreleased/sql-buckets.yml5
-rw-r--r--changelogs/unreleased/tz-diff-blob-image-viewer.yml5
-rw-r--r--config/application.rb3
-rw-r--r--config/environments/test.rb4
-rw-r--r--doc/administration/raketasks/check.md7
-rw-r--r--doc/api/commits.md1
-rw-r--r--doc/api/snippets.md6
-rw-r--r--doc/development/changelog.md2
-rw-r--r--doc/development/new_fe_guide/development/testing.md136
-rw-r--r--doc/gitlab-basics/start-using-git.md147
-rw-r--r--doc/user/project/issue_board.md4
-rw-r--r--doc/user/project/quick_actions.md1
-rw-r--r--doc/user/project/web_ide/index.md21
-rw-r--r--lib/api/commits.rb22
-rw-r--r--lib/api/entities.rb10
-rw-r--r--lib/api/users.rb26
-rw-r--r--lib/banzai/filter/milestone_reference_filter.rb2
-rw-r--r--lib/gitlab/git/repository.rb22
-rw-r--r--lib/gitlab/gitaly_client/commit_service.rb2
-rw-r--r--lib/gitlab/github_import/parallel_importer.rb9
-rw-r--r--lib/gitlab/metrics/subscribers/active_record.rb2
-rw-r--r--lib/gitlab/metrics/transaction.rb2
-rw-r--r--lib/gitlab/quick_actions/extractor.rb8
-rw-r--r--lib/gitlab/quick_actions/substitution_definition.rb2
-rw-r--r--lib/gitlab/url_builder.rb2
-rw-r--r--lib/gitlab/verify/batch_verifier.rb59
-rw-r--r--lib/gitlab/verify/job_artifacts.rb10
-rw-r--r--lib/gitlab/verify/lfs_objects.rb12
-rw-r--r--lib/gitlab/verify/rake_task.rb2
-rw-r--r--lib/gitlab/verify/uploads.rb12
-rw-r--r--lib/microsoft_teams/notifier.rb2
-rw-r--r--locale/gitlab.pot9
-rw-r--r--package.json2
-rw-r--r--qa/qa/page/admin/settings/main.rb4
-rw-r--r--qa/qa/page/project/settings/advanced.rb6
-rw-r--r--qa/qa/page/project/settings/ci_cd.rb18
-rw-r--r--qa/qa/page/project/settings/main.rb4
-rw-r--r--qa/qa/page/project/settings/merge_request.rb12
-rw-r--r--qa/qa/page/project/settings/repository.rb10
-rw-r--r--qa/qa/page/settings/common.rb20
-rw-r--r--qa/qa/runtime/browser.rb14
-rw-r--r--qa/qa/specs/features/merge_request/create_spec.rb2
-rw-r--r--spec/controllers/application_controller_spec.rb10
-rw-r--r--spec/features/issues/user_uses_slash_commands_spec.rb36
-rw-r--r--spec/fixtures/api/schemas/public_api/v4/commit/with_stats.json14
-rw-r--r--spec/fixtures/api/schemas/public_api/v4/commits_with_stats.json4
-rw-r--r--spec/fixtures/api/schemas/public_api/v4/milestones.json3
-rw-r--r--spec/fixtures/api/schemas/public_api/v4/snippets.json1
-rw-r--r--spec/helpers/storage_helper_spec.rb24
-rw-r--r--spec/javascripts/fixtures/images/green_box.pngbin0 -> 1306 bytes
-rw-r--r--spec/javascripts/fixtures/images/red_box.pngbin0 -> 1305 bytes
-rw-r--r--spec/javascripts/ide/components/commit_sidebar/list_item_spec.js17
-rw-r--r--spec/javascripts/ide/components/commit_sidebar/list_spec.js2
-rw-r--r--spec/javascripts/ide/components/repo_commit_section_spec.js14
-rw-r--r--spec/javascripts/ide/stores/mutations/file_spec.js47
-rw-r--r--spec/javascripts/test_constants.js3
-rw-r--r--spec/javascripts/vue_shared/components/content_viewer/content_viewer_spec.js10
-rw-r--r--spec/javascripts/vue_shared/components/diff_viewer/diff_viewer_spec.js70
-rw-r--r--spec/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer_spec.js185
-rw-r--r--spec/javascripts/vue_shared/components/lib/utils/dom_utils_spec.js13
-rw-r--r--spec/lib/banzai/filter/milestone_reference_filter_spec.rb10
-rw-r--r--spec/lib/gitlab/git/commit_spec.rb10
-rw-r--r--spec/lib/gitlab/quick_actions/extractor_spec.rb16
-rw-r--r--spec/lib/gitlab/url_builder_spec.rb25
-rw-r--r--spec/lib/gitlab/verify/job_artifacts_spec.rb29
-rw-r--r--spec/lib/gitlab/verify/lfs_objects_spec.rb25
-rw-r--r--spec/lib/gitlab/verify/uploads_spec.rb27
-rw-r--r--spec/lib/microsoft_teams/notifier_spec.rb2
-rw-r--r--spec/models/project_services/microsoft_teams_service_spec.rb7
-rw-r--r--spec/requests/api/commits_spec.rb21
-rw-r--r--spec/requests/api/snippets_spec.rb3
-rw-r--r--spec/requests/api/users_spec.rb73
-rw-r--r--spec/services/quick_actions/interpret_service_spec.rb18
-rw-r--r--spec/support/api/scopes/read_user_shared_examples.rb10
-rw-r--r--spec/support/shared_examples/uploaders/object_storage_shared_examples.rb10
-rw-r--r--spec/uploaders/object_storage_spec.rb16
-rw-r--r--spec/uploaders/workers/object_storage/migrate_uploads_worker_spec.rb51
-rw-r--r--spec/views/errors/access_denied.html.haml_spec.rb7
-rw-r--r--yarn.lock38
416 files changed, 4165 insertions, 2260 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 82d1abff4a4..fb78973a727 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -301,7 +301,7 @@ For guidance on UX implementation at GitLab, please refer to our [Design System]
The UX team uses labels to manage their workflow.
The ~"UX" label on an issue is a signal to the UX team that it will need UX attention.
-To better understand the priority by which UX tackles issues, see the [UX section](https://about.gitlab.com/handbook/ux/) of the handbook.
+To better understand the priority by which UX tackles issues, see the [UX section](https://about.gitlab.com/handbook/engineering/ux) of the handbook.
Once an issue has been worked on and is ready for development, a UXer applies the ~"UX ready" label to that issue.
diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION
index f1b9cc4cd95..c64d9d48a48 100644
--- a/GITALY_SERVER_VERSION
+++ b/GITALY_SERVER_VERSION
@@ -1 +1 @@
-0.105.0
+0.105.1
diff --git a/PROCESS.md b/PROCESS.md
index 958bc7b9edc..a46fd8c25b4 100644
--- a/PROCESS.md
+++ b/PROCESS.md
@@ -169,6 +169,7 @@ the stable branch are:
* Fixes for [regressions](#regressions)
* Fixes for security issues
* Fixes or improvements to automated QA scenarios
+* Documentation updates for changes in the same release
* New or updated translations (as long as they do not touch application code)
During the feature freeze all merge requests that are meant to go into the
diff --git a/app/assets/javascripts/badges/components/badge.vue b/app/assets/javascripts/badges/components/badge.vue
index d0f60e1d4cb..b4bfaee1d85 100644
--- a/app/assets/javascripts/badges/components/badge.vue
+++ b/app/assets/javascripts/badges/components/badge.vue
@@ -72,11 +72,11 @@ export default {
rel="noopener noreferrer"
>
<img
- class="project-badge"
:src="imageUrlWithRetries"
+ class="project-badge"
+ aria-hidden="true"
@load="onLoad"
@error="onError"
- aria-hidden="true"
/>
</a>
@@ -91,9 +91,9 @@ export default {
>
<div class="btn btn-default btn-sm disabled">
<icon
+ :size="16"
class="prepend-left-8 append-right-8"
name="doc_image"
- :size="16"
aria-hidden="true"
/>
</div>
@@ -105,16 +105,16 @@ export default {
</div>
<button
+ v-tooltip
v-show="hasError"
+ :title="s__('Badges|Reload badge image')"
class="btn btn-transparent btn-sm text-primary"
type="button"
- v-tooltip
- :title="s__('Badges|Reload badge image')"
@click="reloadImage"
>
<icon
- name="retry"
:size="16"
+ name="retry"
/>
</button>
</div>
diff --git a/app/assets/javascripts/badges/components/badge_form.vue b/app/assets/javascripts/badges/components/badge_form.vue
index 5975cb9669e..7a13f74c570 100644
--- a/app/assets/javascripts/badges/components/badge_form.vue
+++ b/app/assets/javascripts/badges/components/badge_form.vue
@@ -153,10 +153,10 @@ export default {
<label for="badge-link-url">{{ s__('Badges|Link') }}</label>
<input
id="badge-link-url"
- type="text"
- class="form-control"
v-model="linkUrl"
:placeholder="$options.badgeLinkUrlPlaceholder"
+ type="text"
+ class="form-control"
@input="debouncedPreview"
/>
<span
@@ -169,10 +169,10 @@ export default {
<label for="badge-image-url">{{ s__('Badges|Badge image URL') }}</label>
<input
id="badge-image-url"
- type="text"
- class="form-control"
v-model="imageUrl"
:placeholder="$options.badgeImageUrlPlaceholder"
+ type="text"
+ class="form-control"
@input="debouncedPreview"
/>
<span
@@ -184,8 +184,8 @@ export default {
<div class="form-group">
<label for="badge-preview">{{ s__('Badges|Badge image preview') }}</label>
<badge
- id="badge-preview"
v-show="renderedBadge && !isRendering"
+ id="badge-preview"
:image-url="renderedImageUrl"
:link-url="renderedLinkUrl"
/>
@@ -202,16 +202,16 @@ export default {
<div class="row-content-block">
<loading-button
- type="submit"
- container-class="btn btn-success"
:disabled="!canSubmit"
:loading="isSaving"
:label="submitButtonLabel"
+ type="submit"
+ container-class="btn btn-success"
/>
<button
+ v-if="isEditing"
class="btn btn-cancel"
type="button"
- v-if="isEditing"
@click="onCancel"
>{{ __('Cancel') }}</button>
</div>
diff --git a/app/assets/javascripts/badges/components/badge_list_row.vue b/app/assets/javascripts/badges/components/badge_list_row.vue
index af062bdf8c6..98aa00af0d7 100644
--- a/app/assets/javascripts/badges/components/badge_list_row.vue
+++ b/app/assets/javascripts/badges/components/badge_list_row.vue
@@ -41,9 +41,9 @@ export default {
<template>
<div class="gl-responsive-table-row-layout gl-responsive-table-row">
<badge
- class="table-section section-30"
:image-url="badge.renderedImageUrl"
:link-url="badge.renderedLinkUrl"
+ class="table-section section-30"
/>
<span class="table-section section-50 str-truncated">{{ badge.linkUrl }}</span>
<div class="table-section section-10">
@@ -54,29 +54,29 @@ export default {
v-if="canEditBadge"
class="table-action-buttons">
<button
+ :disabled="badge.isDeleting"
class="btn btn-default append-right-8"
type="button"
- :disabled="badge.isDeleting"
@click="editBadge(badge)"
>
<icon
- name="pencil"
:size="16"
:aria-label="__('Edit')"
+ name="pencil"
/>
</button>
<button
+ :disabled="badge.isDeleting"
class="btn btn-danger"
type="button"
data-toggle="modal"
data-target="#delete-badge-modal"
- :disabled="badge.isDeleting"
@click="updateBadgeInModal(badge)"
>
<icon
- name="remove"
:size="16"
:aria-label="__('Delete')"
+ name="remove"
/>
</button>
<loading-icon
diff --git a/app/assets/javascripts/badges/components/badge_settings.vue b/app/assets/javascripts/badges/components/badge_settings.vue
index 83f78394238..cc47e56dd1e 100644
--- a/app/assets/javascripts/badges/components/badge_settings.vue
+++ b/app/assets/javascripts/badges/components/badge_settings.vue
@@ -44,8 +44,8 @@ export default {
<gl-modal
id="delete-badge-modal"
:header-title-text="s__('Badges|Delete badge?')"
- footer-primary-button-variant="danger"
:footer-primary-button-text="s__('Badges|Delete badge')"
+ footer-primary-button-variant="danger"
@submit="onSubmitModal">
<div class="well">
<badge
diff --git a/app/assets/javascripts/boards/components/board.js b/app/assets/javascripts/boards/components/board.js
index b4637a86900..7920e08e4d8 100644
--- a/app/assets/javascripts/boards/components/board.js
+++ b/app/assets/javascripts/boards/components/board.js
@@ -13,17 +13,28 @@ window.gl = window.gl || {};
window.gl.issueBoards = window.gl.issueBoards || {};
gl.issueBoards.Board = Vue.extend({
- template: '#js-board-template',
components: {
boardList,
'board-delete': gl.issueBoards.BoardDelete,
BoardBlankState,
},
props: {
- list: Object,
- disabled: Boolean,
- issueLinkBase: String,
- rootPath: String,
+ list: {
+ type: Object,
+ default: () => ({}),
+ },
+ disabled: {
+ type: Boolean,
+ required: true,
+ },
+ issueLinkBase: {
+ type: String,
+ required: true,
+ },
+ rootPath: {
+ type: String,
+ required: true,
+ },
boardId: {
type: String,
required: true,
@@ -47,20 +58,6 @@ gl.issueBoards.Board = Vue.extend({
deep: true,
}
},
- methods: {
- showNewIssueForm() {
- this.$refs['board-list'].showIssueForm = !this.$refs['board-list'].showIssueForm;
- },
- toggleExpanded(e) {
- if (this.list.isExpandable && !e.target.classList.contains('js-no-trigger-collapse')) {
- this.list.isExpanded = !this.list.isExpanded;
-
- if (AccessorUtilities.isLocalStorageAccessSafe()) {
- localStorage.setItem(`boards.${this.boardId}.${this.list.type}.expanded`, this.list.isExpanded);
- }
- }
- },
- },
mounted () {
this.sortableOptions = gl.issueBoards.getBoardSortableDefaultOptions({
disabled: this.disabled,
@@ -90,4 +87,19 @@ gl.issueBoards.Board = Vue.extend({
this.list.isExpanded = !isCollapsed;
}
},
+ methods: {
+ showNewIssueForm() {
+ this.$refs['board-list'].showIssueForm = !this.$refs['board-list'].showIssueForm;
+ },
+ toggleExpanded(e) {
+ if (this.list.isExpandable && !e.target.classList.contains('js-no-trigger-collapse')) {
+ this.list.isExpanded = !this.list.isExpanded;
+
+ if (AccessorUtilities.isLocalStorageAccessSafe()) {
+ localStorage.setItem(`boards.${this.boardId}.${this.list.type}.expanded`, this.list.isExpanded);
+ }
+ }
+ },
+ },
+ template: '#js-board-template',
});
diff --git a/app/assets/javascripts/boards/components/board_blank_state.vue b/app/assets/javascripts/boards/components/board_blank_state.vue
index 2049eeb9c30..286529b4d13 100644
--- a/app/assets/javascripts/boards/components/board_blank_state.vue
+++ b/app/assets/javascripts/boards/components/board_blank_state.vue
@@ -72,8 +72,8 @@ export default {
:key="index"
>
<span
- class="label-color"
- :style="{ backgroundColor: label.color }">
+ :style="{ backgroundColor: label.color }"
+ class="label-color">
</span>
{{ label.title }}
</li>
diff --git a/app/assets/javascripts/boards/components/board_card.vue b/app/assets/javascripts/boards/components/board_card.vue
index 33e3369b971..b7d3574bc80 100644
--- a/app/assets/javascripts/boards/components/board_card.vue
+++ b/app/assets/javascripts/boards/components/board_card.vue
@@ -77,7 +77,6 @@ export default {
<template>
<li
- class="board-card"
:class="{
'user-can-drag': !disabled && issue.id,
'is-disabled': disabled || !issue.id,
@@ -85,6 +84,7 @@ export default {
}"
:index="index"
:data-issue-id="issue.id"
+ class="board-card"
@mousedown="mouseDown"
@mousemove="mouseMove"
@mouseup="showIssue($event)">
diff --git a/app/assets/javascripts/boards/components/board_delete.js b/app/assets/javascripts/boards/components/board_delete.js
index 7be98825fda..4482b3b3e70 100644
--- a/app/assets/javascripts/boards/components/board_delete.js
+++ b/app/assets/javascripts/boards/components/board_delete.js
@@ -8,7 +8,10 @@ window.gl.issueBoards = window.gl.issueBoards || {};
gl.issueBoards.BoardDelete = Vue.extend({
props: {
- list: Object
+ list: {
+ type: Object,
+ default: () => ({}),
+ },
},
methods: {
deleteBoard () {
diff --git a/app/assets/javascripts/boards/components/board_list.vue b/app/assets/javascripts/boards/components/board_list.vue
index 0692c96e767..5c7565234d8 100644
--- a/app/assets/javascripts/boards/components/board_list.vue
+++ b/app/assets/javascripts/boards/components/board_list.vue
@@ -205,22 +205,22 @@ export default {
<template>
<div class="board-list-component">
<div
+ v-if="loading"
class="board-list-loading text-center"
- aria-label="Loading issues"
- v-if="loading">
+ aria-label="Loading issues">
<loading-icon />
</div>
<board-new-issue
+ v-if="list.type !== 'closed' && showIssueForm"
:group-id="groupId"
- :list="list"
- v-if="list.type !== 'closed' && showIssueForm"/>
+ :list="list"/>
<ul
- class="board-list js-board-list"
v-show="!loading"
ref="list"
:data-board="list.id"
:data-board-type="list.type"
- :class="{ 'is-smaller': showIssueForm }">
+ :class="{ 'is-smaller': showIssueForm }"
+ class="board-list js-board-list">
<board-card
v-for="(issue, index) in issues"
ref="issue"
@@ -233,8 +233,8 @@ export default {
:disabled="disabled"
:key="issue.id" />
<li
- class="board-list-count text-center"
v-if="showCount"
+ class="board-list-count text-center"
data-issue-id="-1">
<loading-icon
v-show="list.loadingMore"
diff --git a/app/assets/javascripts/boards/components/board_new_issue.vue b/app/assets/javascripts/boards/components/board_new_issue.vue
index 297c9eff38c..ec23b1e7c11 100644
--- a/app/assets/javascripts/boards/components/board_new_issue.vue
+++ b/app/assets/javascripts/boards/components/board_new_issue.vue
@@ -96,26 +96,26 @@ export default {
<div class="board-card">
<form @submit="submit($event)">
<div
- class="flash-container"
v-if="error"
+ class="flash-container"
>
<div class="flash-alert">
An error occurred. Please try again.
</div>
</div>
<label
- class="label-light"
:for="list.id + '-title'"
+ class="label-light"
>
Title
</label>
<input
+ ref="input"
+ v-model="title"
+ :id="list.id + '-title'"
class="form-control"
type="text"
- v-model="title"
- ref="input"
autocomplete="off"
- :id="list.id + '-title'"
/>
<project-select
v-if="groupId"
@@ -123,10 +123,10 @@ export default {
/>
<div class="clearfix prepend-top-10">
<button
+ ref="submit-button"
+ :disabled="disabled"
class="btn btn-success float-left"
type="submit"
- :disabled="disabled"
- ref="submit-button"
>
Submit issue
</button>
diff --git a/app/assets/javascripts/boards/components/board_sidebar.js b/app/assets/javascripts/boards/components/board_sidebar.js
index c4ee4f6c855..82fe6b0c5fb 100644
--- a/app/assets/javascripts/boards/components/board_sidebar.js
+++ b/app/assets/javascripts/boards/components/board_sidebar.js
@@ -21,8 +21,17 @@ window.gl = window.gl || {};
window.gl.issueBoards = window.gl.issueBoards || {};
gl.issueBoards.BoardSidebar = Vue.extend({
+ components: {
+ assigneeTitle,
+ assignees,
+ removeBtn: gl.issueBoards.RemoveIssueBtn,
+ subscriptions,
+ },
props: {
- currentUser: Object
+ currentUser: {
+ type: Object,
+ default: () => ({}),
+ },
},
data() {
return {
@@ -64,6 +73,26 @@ gl.issueBoards.BoardSidebar = Vue.extend({
deep: true
},
},
+ created () {
+ // Get events from glDropdown
+ eventHub.$on('sidebar.removeAssignee', this.removeAssignee);
+ eventHub.$on('sidebar.addAssignee', this.addAssignee);
+ eventHub.$on('sidebar.removeAllAssignees', this.removeAllAssignees);
+ eventHub.$on('sidebar.saveAssignees', this.saveAssignees);
+ },
+ beforeDestroy() {
+ eventHub.$off('sidebar.removeAssignee', this.removeAssignee);
+ eventHub.$off('sidebar.addAssignee', this.addAssignee);
+ eventHub.$off('sidebar.removeAllAssignees', this.removeAllAssignees);
+ eventHub.$off('sidebar.saveAssignees', this.saveAssignees);
+ },
+ mounted () {
+ new IssuableContext(this.currentUser);
+ new MilestoneSelect();
+ new DueDateSelectors();
+ new LabelsSelect();
+ new Sidebar();
+ },
methods: {
closeSidebar () {
this.detail.issue = {};
@@ -97,30 +126,4 @@ gl.issueBoards.BoardSidebar = Vue.extend({
});
},
},
- created () {
- // Get events from glDropdown
- eventHub.$on('sidebar.removeAssignee', this.removeAssignee);
- eventHub.$on('sidebar.addAssignee', this.addAssignee);
- eventHub.$on('sidebar.removeAllAssignees', this.removeAllAssignees);
- eventHub.$on('sidebar.saveAssignees', this.saveAssignees);
- },
- beforeDestroy() {
- eventHub.$off('sidebar.removeAssignee', this.removeAssignee);
- eventHub.$off('sidebar.addAssignee', this.addAssignee);
- eventHub.$off('sidebar.removeAllAssignees', this.removeAllAssignees);
- eventHub.$off('sidebar.saveAssignees', this.saveAssignees);
- },
- mounted () {
- new IssuableContext(this.currentUser);
- new MilestoneSelect();
- new DueDateSelectors();
- new LabelsSelect();
- new Sidebar();
- },
- components: {
- assigneeTitle,
- assignees,
- removeBtn: gl.issueBoards.RemoveIssueBtn,
- subscriptions,
- },
});
diff --git a/app/assets/javascripts/boards/components/issue_card_inner.js b/app/assets/javascripts/boards/components/issue_card_inner.js
index dcc07810d01..f7d7b910e2f 100644
--- a/app/assets/javascripts/boards/components/issue_card_inner.js
+++ b/app/assets/javascripts/boards/components/issue_card_inner.js
@@ -9,6 +9,9 @@ window.gl = window.gl || {};
window.gl.issueBoards = window.gl.issueBoards || {};
gl.issueBoards.IssueCardInner = Vue.extend({
+ components: {
+ UserAvatarLink,
+ },
props: {
issue: {
type: Object,
@@ -35,6 +38,7 @@ gl.issueBoards.IssueCardInner = Vue.extend({
groupId: {
type: Number,
required: false,
+ default: null,
},
},
data() {
@@ -44,9 +48,6 @@ gl.issueBoards.IssueCardInner = Vue.extend({
maxCounter: 99,
};
},
- components: {
- UserAvatarLink,
- },
computed: {
numberOverLimit() {
return this.issue.assignees.length - this.limitBeforeCounter;
diff --git a/app/assets/javascripts/boards/components/modal/empty_state.js b/app/assets/javascripts/boards/components/modal/empty_state.js
index 1e5f2383223..888bc9d7ef2 100644
--- a/app/assets/javascripts/boards/components/modal/empty_state.js
+++ b/app/assets/javascripts/boards/components/modal/empty_state.js
@@ -4,9 +4,6 @@ import modalMixin from '../../mixins/modal_mixins';
gl.issueBoards.ModalEmptyState = Vue.extend({
mixins: [modalMixin],
- data() {
- return ModalStore.store;
- },
props: {
newIssuePath: {
type: String,
@@ -17,6 +14,9 @@ gl.issueBoards.ModalEmptyState = Vue.extend({
required: true,
},
},
+ data() {
+ return ModalStore.store;
+ },
computed: {
contents() {
const obj = {
diff --git a/app/assets/javascripts/boards/components/modal/footer.js b/app/assets/javascripts/boards/components/modal/footer.js
index 11bb3e98334..2745ca219ad 100644
--- a/app/assets/javascripts/boards/components/modal/footer.js
+++ b/app/assets/javascripts/boards/components/modal/footer.js
@@ -7,6 +7,9 @@ import ModalStore from '../../stores/modal_store';
import modalMixin from '../../mixins/modal_mixins';
gl.issueBoards.ModalFooter = Vue.extend({
+ components: {
+ 'lists-dropdown': gl.issueBoards.ModalFooterListsDropdown,
+ },
mixins: [modalMixin],
data() {
return {
@@ -52,9 +55,6 @@ gl.issueBoards.ModalFooter = Vue.extend({
this.toggleModal(false);
},
},
- components: {
- 'lists-dropdown': gl.issueBoards.ModalFooterListsDropdown,
- },
template: `
<footer
class="form-actions add-issues-footer">
diff --git a/app/assets/javascripts/boards/components/modal/header.js b/app/assets/javascripts/boards/components/modal/header.js
index 67c29ebca72..5e511bb8935 100644
--- a/app/assets/javascripts/boards/components/modal/header.js
+++ b/app/assets/javascripts/boards/components/modal/header.js
@@ -5,6 +5,10 @@ import ModalStore from '../../stores/modal_store';
import modalMixin from '../../mixins/modal_mixins';
gl.issueBoards.ModalHeader = Vue.extend({
+ components: {
+ 'modal-tabs': gl.issueBoards.ModalTabs,
+ modalFilters,
+ },
mixins: [modalMixin],
props: {
projectId: {
@@ -42,10 +46,6 @@ gl.issueBoards.ModalHeader = Vue.extend({
ModalStore.toggleAll();
},
},
- components: {
- 'modal-tabs': gl.issueBoards.ModalTabs,
- modalFilters,
- },
template: `
<div>
<header class="add-issues-header form-actions">
diff --git a/app/assets/javascripts/boards/components/modal/index.js b/app/assets/javascripts/boards/components/modal/index.js
index 3083b3e4405..c8b2f45f177 100644
--- a/app/assets/javascripts/boards/components/modal/index.js
+++ b/app/assets/javascripts/boards/components/modal/index.js
@@ -10,6 +10,13 @@ import './empty_state';
import ModalStore from '../../stores/modal_store';
gl.issueBoards.IssuesModal = Vue.extend({
+ components: {
+ 'modal-header': gl.issueBoards.ModalHeader,
+ 'modal-list': gl.issueBoards.ModalList,
+ 'modal-footer': gl.issueBoards.ModalFooter,
+ 'empty-state': gl.issueBoards.ModalEmptyState,
+ loadingIcon,
+ },
props: {
newIssuePath: {
type: String,
@@ -43,6 +50,22 @@ gl.issueBoards.IssuesModal = Vue.extend({
data() {
return ModalStore.store;
},
+ computed: {
+ showList() {
+ if (this.activeTab === 'selected') {
+ return this.selectedIssues.length > 0;
+ }
+
+ return this.issuesCount > 0;
+ },
+ showEmptyState() {
+ if (!this.loading && this.issuesCount === 0) {
+ return true;
+ }
+
+ return this.activeTab === 'selected' && this.selectedIssues.length === 0;
+ },
+ },
watch: {
page() {
this.loadIssues();
@@ -80,6 +103,9 @@ gl.issueBoards.IssuesModal = Vue.extend({
deep: true,
},
},
+ created() {
+ this.page = 1;
+ },
methods: {
loadIssues(clearIssues = false) {
if (!this.showAddIssuesModal) return false;
@@ -112,32 +138,6 @@ gl.issueBoards.IssuesModal = Vue.extend({
});
},
},
- computed: {
- showList() {
- if (this.activeTab === 'selected') {
- return this.selectedIssues.length > 0;
- }
-
- return this.issuesCount > 0;
- },
- showEmptyState() {
- if (!this.loading && this.issuesCount === 0) {
- return true;
- }
-
- return this.activeTab === 'selected' && this.selectedIssues.length === 0;
- },
- },
- created() {
- this.page = 1;
- },
- components: {
- 'modal-header': gl.issueBoards.ModalHeader,
- 'modal-list': gl.issueBoards.ModalList,
- 'modal-footer': gl.issueBoards.ModalFooter,
- 'empty-state': gl.issueBoards.ModalEmptyState,
- loadingIcon,
- },
template: `
<div
class="add-issues-modal"
diff --git a/app/assets/javascripts/boards/components/modal/list.js b/app/assets/javascripts/boards/components/modal/list.js
index f86896d2178..11061c72a7b 100644
--- a/app/assets/javascripts/boards/components/modal/list.js
+++ b/app/assets/javascripts/boards/components/modal/list.js
@@ -3,6 +3,9 @@ import bp from '../../../breakpoints';
import ModalStore from '../../stores/modal_store';
gl.issueBoards.ModalList = Vue.extend({
+ components: {
+ 'issue-card-inner': gl.issueBoards.IssueCardInner,
+ },
props: {
issueLinkBase: {
type: String,
@@ -20,13 +23,6 @@ gl.issueBoards.ModalList = Vue.extend({
data() {
return ModalStore.store;
},
- watch: {
- activeTab() {
- if (this.activeTab === 'all') {
- ModalStore.purgeUnselectedIssues();
- }
- },
- },
computed: {
loopIssues() {
if (this.activeTab === 'all') {
@@ -50,6 +46,25 @@ gl.issueBoards.ModalList = Vue.extend({
return groups;
},
},
+ watch: {
+ activeTab() {
+ if (this.activeTab === 'all') {
+ ModalStore.purgeUnselectedIssues();
+ }
+ },
+ },
+ mounted() {
+ this.scrollHandlerWrapper = this.scrollHandler.bind(this);
+ this.setColumnCountWrapper = this.setColumnCount.bind(this);
+ this.setColumnCount();
+
+ this.$refs.list.addEventListener('scroll', this.scrollHandlerWrapper);
+ window.addEventListener('resize', this.setColumnCountWrapper);
+ },
+ beforeDestroy() {
+ this.$refs.list.removeEventListener('scroll', this.scrollHandlerWrapper);
+ window.removeEventListener('resize', this.setColumnCountWrapper);
+ },
methods: {
scrollHandler() {
const currentPage = Math.floor(this.issues.length / this.perPage);
@@ -96,21 +111,6 @@ gl.issueBoards.ModalList = Vue.extend({
}
},
},
- mounted() {
- this.scrollHandlerWrapper = this.scrollHandler.bind(this);
- this.setColumnCountWrapper = this.setColumnCount.bind(this);
- this.setColumnCount();
-
- this.$refs.list.addEventListener('scroll', this.scrollHandlerWrapper);
- window.addEventListener('resize', this.setColumnCountWrapper);
- },
- beforeDestroy() {
- this.$refs.list.removeEventListener('scroll', this.scrollHandlerWrapper);
- window.removeEventListener('resize', this.setColumnCountWrapper);
- },
- components: {
- 'issue-card-inner': gl.issueBoards.IssueCardInner,
- },
template: `
<section
class="add-issues-list add-issues-list-columns"
diff --git a/app/assets/javascripts/boards/models/list.js b/app/assets/javascripts/boards/models/list.js
index a79dd62e2e4..1f0fe7f9e85 100644
--- a/app/assets/javascripts/boards/models/list.js
+++ b/app/assets/javascripts/boards/models/list.js
@@ -55,7 +55,8 @@ class List {
entityType = 'assignee_id';
}
- return gl.boardService.createList(this.label.id)
+ return gl.boardService
+ .createList(entity.id, entityType)
.then(res => res.data)
.then(data => {
this.id = data.id;
diff --git a/app/assets/javascripts/clusters/components/application_row.vue b/app/assets/javascripts/clusters/components/application_row.vue
index 98c0b9c22a8..ec52fdfdf32 100644
--- a/app/assets/javascripts/clusters/components/application_row.vue
+++ b/app/assets/javascripts/clusters/components/application_row.vue
@@ -125,8 +125,8 @@
<template>
<div
- class="gl-responsive-table-row gl-responsive-table-row-col-span"
:class="rowJsClass"
+ class="gl-responsive-table-row gl-responsive-table-row-col-span"
>
<div
class="gl-responsive-table-row-layout"
@@ -155,8 +155,8 @@
<slot name="description"></slot>
</div>
<div
- class="table-section table-button-footer section-align-top"
:class="{ 'section-20': showManageButton, 'section-15': !showManageButton }"
+ class="table-section table-button-footer section-align-top"
role="gridcell"
>
<div
@@ -164,18 +164,18 @@
class="btn-group table-action-buttons"
>
<a
- class="btn"
:href="manageLink"
+ class="btn"
>
{{ manageButtonLabel }}
</a>
</div>
<div class="btn-group table-action-buttons">
<loading-button
- class="js-cluster-application-install-button"
:loading="installButtonLoading"
:disabled="installButtonDisabled"
:label="installButtonLabel"
+ class="js-cluster-application-install-button"
@click="installClicked"
/>
</div>
diff --git a/app/assets/javascripts/clusters/components/applications.vue b/app/assets/javascripts/clusters/components/applications.vue
index 9d6be555a2c..8ee7279e544 100644
--- a/app/assets/javascripts/clusters/components/applications.vue
+++ b/app/assets/javascripts/clusters/components/applications.vue
@@ -152,11 +152,11 @@ export default {
<application-row
id="helm"
:title="applications.helm.title"
- title-link="https://docs.helm.sh/"
:status="applications.helm.status"
:status-reason="applications.helm.statusReason"
:request-status="applications.helm.requestStatus"
:request-reason="applications.helm.requestReason"
+ title-link="https://docs.helm.sh/"
>
<div slot="description">
{{ s__(`ClusterIntegration|Helm streamlines installing
@@ -168,11 +168,11 @@ export default {
<application-row
:id="ingressId"
:title="applications.ingress.title"
- title-link="https://kubernetes.io/docs/concepts/services-networking/ingress/"
:status="applications.ingress.status"
:status-reason="applications.ingress.statusReason"
:request-status="applications.ingress.requestStatus"
:request-reason="applications.ingress.requestReason"
+ title-link="https://kubernetes.io/docs/concepts/services-networking/ingress/"
>
<div slot="description">
<p>
@@ -191,10 +191,10 @@ export default {
class="input-group"
>
<input
- type="text"
id="ingress-ip-address"
- class="form-control js-ip-address"
:value="ingressExternalIp"
+ type="text"
+ class="form-control js-ip-address"
readonly
/>
<span class="input-group-append">
@@ -255,12 +255,12 @@ export default {
<application-row
id="prometheus"
:title="applications.prometheus.title"
- title-link="https://prometheus.io/docs/introduction/overview/"
:manage-link="managePrometheusPath"
:status="applications.prometheus.status"
:status-reason="applications.prometheus.statusReason"
:request-status="applications.prometheus.requestStatus"
:request-reason="applications.prometheus.requestReason"
+ title-link="https://prometheus.io/docs/introduction/overview/"
>
<div
slot="description"
@@ -271,11 +271,11 @@ export default {
<application-row
id="runner"
:title="applications.runner.title"
- title-link="https://docs.gitlab.com/runner/"
:status="applications.runner.status"
:status-reason="applications.runner.statusReason"
:request-status="applications.runner.requestStatus"
:request-reason="applications.runner.requestReason"
+ title-link="https://docs.gitlab.com/runner/"
>
<div slot="description">
{{ s__(`ClusterIntegration|GitLab Runner connects to this
@@ -287,12 +287,12 @@ export default {
<application-row
id="jupyter"
:title="applications.jupyter.title"
- title-link="https://jupyterhub.readthedocs.io/en/stable/"
:status="applications.jupyter.status"
:status-reason="applications.jupyter.statusReason"
:request-status="applications.jupyter.requestStatus"
:request-reason="applications.jupyter.requestReason"
:install-application-request-params="{ hostname: applications.jupyter.hostname }"
+ title-link="https://jupyterhub.readthedocs.io/en/stable/"
>
<div slot="description">
<p>
@@ -311,10 +311,10 @@ export default {
<div class="input-group">
<input
- type="text"
- class="form-control js-hostname"
v-model="applications.jupyter.hostname"
:readonly="jupyterInstalled"
+ type="text"
+ class="form-control js-hostname"
/>
<span
class="input-group-btn"
diff --git a/app/assets/javascripts/commit/pipelines/pipelines_table.vue b/app/assets/javascripts/commit/pipelines/pipelines_table.vue
index 24d63b99a29..95c4be64d35 100644
--- a/app/assets/javascripts/commit/pipelines/pipelines_table.vue
+++ b/app/assets/javascripts/commit/pipelines/pipelines_table.vue
@@ -77,9 +77,9 @@
<div class="content-list pipelines">
<loading-icon
+ v-if="isLoading"
:label="s__('Pipelines|Loading Pipelines')"
size="3"
- v-if="isLoading"
class="prepend-top-20"
/>
@@ -91,8 +91,8 @@
/>
<div
- class="table-holder"
v-else-if="shouldRenderTable"
+ class="table-holder"
>
<pipelines-table-component
:pipelines="state.pipelines"
diff --git a/app/assets/javascripts/cycle_analytics/components/banner.vue b/app/assets/javascripts/cycle_analytics/components/banner.vue
index 3204b8dd8e7..410d4873e55 100644
--- a/app/assets/javascripts/cycle_analytics/components/banner.vue
+++ b/app/assets/javascripts/cycle_analytics/components/banner.vue
@@ -23,9 +23,9 @@
<template>
<div class="landing content-block">
<button
+ :aria-label="__('Dismiss Cycle Analytics introduction box')"
class="js-ca-dismiss-button dismiss-button"
type="button"
- :aria-label="__('Dismiss Cycle Analytics introduction box')"
@click="dismissOverviewDialog"
>
<i
diff --git a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue
index 5be17081b58..b626b187651 100644
--- a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue
+++ b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue
@@ -19,14 +19,14 @@
class="events-info float-right"
>
<i
- class="fa fa-warning"
v-tooltip
- aria-hidden="true"
:title="n__(
'Limited to showing %d event at most',
'Limited to showing %d events at most',
50
)"
+ class="fa fa-warning"
+ aria-hidden="true"
data-placement="top"
>
</i>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_component.vue
index 907638d798a..312fe75dde4 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_component.vue
+++ b/app/assets/javascripts/cycle_analytics/components/stage_component.vue
@@ -38,8 +38,8 @@
<user-avatar-image :img-src="issue.author.avatarUrl"/>
<h5 class="item-title issue-title">
<a
- class="issue-title"
:href="issue.url"
+ class="issue-title"
>
{{ issue.title }}
</a>
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_review_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_review_component.vue
index 34aa04083e6..d4735d030fc 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_review_component.vue
+++ b/app/assets/javascripts/cycle_analytics/components/stage_review_component.vue
@@ -74,12 +74,12 @@
</template>
<template v-else>
<span
- class="merge-request-branch"
v-if="mergeRequest.branch"
+ class="merge-request-branch"
>
<icon
- name="fork"
:size="16"
+ name="fork"
/>
<a :href="mergeRequest.branch.url">
{{ mergeRequest.branch.name }}
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue
index 92f2a95a66a..22637485c01 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue
+++ b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue
@@ -38,8 +38,8 @@
<ul class="stage-event-list">
<li
v-for="(build, i) in items"
- class="stage-event-item item-build-component"
:key="i"
+ class="stage-event-item item-build-component"
>
<div class="item-details">
<!-- FIXME: Pass an alt attribute here for accessibility -->
@@ -52,8 +52,8 @@
#{{ build.id }}
</a>
<icon
- name="fork"
:size="16"
+ name="fork"
/>
<a
:href="build.branch.url"
diff --git a/app/assets/javascripts/cycle_analytics/components/stage_test_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_test_component.vue
index b84bb6ed792..a0796f299e7 100644
--- a/app/assets/javascripts/cycle_analytics/components/stage_test_component.vue
+++ b/app/assets/javascripts/cycle_analytics/components/stage_test_component.vue
@@ -64,8 +64,8 @@
#{{ build.id }}
</a>
<icon
- name="fork"
:size="16"
+ name="fork"
/>
<a
:href="build.branch.url"
diff --git a/app/assets/javascripts/deploy_keys/components/action_btn.vue b/app/assets/javascripts/deploy_keys/components/action_btn.vue
index 67dda0e29cb..7399fc97d45 100644
--- a/app/assets/javascripts/deploy_keys/components/action_btn.vue
+++ b/app/assets/javascripts/deploy_keys/components/action_btn.vue
@@ -40,9 +40,9 @@ export default {
<template>
<button
- class="btn"
:class="[{ disabled: isLoading }, btnCssClass]"
:disabled="isLoading"
+ class="btn"
@click="doAction">
<slot></slot>
<loading-icon
diff --git a/app/assets/javascripts/deploy_keys/components/app.vue b/app/assets/javascripts/deploy_keys/components/app.vue
index c41fe55db63..2cfa13fdc75 100644
--- a/app/assets/javascripts/deploy_keys/components/app.vue
+++ b/app/assets/javascripts/deploy_keys/components/app.vue
@@ -116,8 +116,8 @@ export default {
<div class="append-bottom-default deploy-keys">
<loading-icon
v-if="isLoading && !hasKeys"
- size="2"
:label="s__('DeployKeys|Loading deploy keys')"
+ size="2"
/>
<template v-else-if="hasKeys">
<div class="top-area scrolling-tabs-container inner-page-scroll-tabs">
@@ -138,16 +138,16 @@ export default {
<navigation-tabs
:tabs="tabs"
- @onChangeTab="onChangeTab"
scope="deployKeys"
+ @onChangeTab="onChangeTab"
/>
</div>
<keys-panel
- class="qa-project-deploy-keys"
:project-id="projectId"
:keys="keys[currentTab]"
:store="store"
:endpoint="endpoint"
+ class="qa-project-deploy-keys"
/>
</template>
</div>
diff --git a/app/assets/javascripts/deploy_keys/components/key.vue b/app/assets/javascripts/deploy_keys/components/key.vue
index 6c2af7fa768..f66ca070445 100644
--- a/app/assets/javascripts/deploy_keys/components/key.vue
+++ b/app/assets/javascripts/deploy_keys/components/key.vue
@@ -135,9 +135,9 @@ export default {
<div class="table-mobile-content deploy-project-list">
<template v-if="projects.length > 0">
<a
- class="label deploy-project-label"
- :title="projectTooltipTitle(firstProject)"
v-tooltip
+ :title="projectTooltipTitle(firstProject)"
+ class="label deploy-project-label"
>
<span>
{{ firstProject.project.full_name }}
@@ -145,22 +145,22 @@ export default {
<icon :name="firstProject.can_push ? 'lock-open' : 'lock'"/>
</a>
<a
+ v-tooltip
v-if="isExpandable"
+ :title="restProjectsTooltip"
class="label deploy-project-label"
@click="toggleExpanded"
- :title="restProjectsTooltip"
- v-tooltip
>
<span>{{ restProjectsLabel }}</span>
</a>
<a
- v-else-if="isExpanded"
+ v-tooltip
v-for="deployKeysProject in restProjects"
+ v-else-if="isExpanded"
:key="deployKeysProject.project.full_path"
- class="label deploy-project-label"
:href="deployKeysProject.project.full_path"
:title="projectTooltipTitle(deployKeysProject)"
- v-tooltip
+ class="label deploy-project-label"
>
<span>
{{ deployKeysProject.project.full_name }}
@@ -181,8 +181,8 @@ export default {
</div>
<div class="table-mobile-content text-secondary key-created-at">
<span
- :title="tooltipTitle(deployKey.created_at)"
- v-tooltip>
+ v-tooltip
+ :title="tooltipTitle(deployKey.created_at)">
<icon name="calendar"/>
<span>{{ timeFormated(deployKey.created_at) }}</span>
</span>
@@ -198,34 +198,34 @@ export default {
{{ __('Enable') }}
</action-btn>
<a
+ v-tooltip
v-if="deployKey.can_edit"
- class="btn btn-default text-secondary"
:href="editDeployKeyPath"
:title="__('Edit')"
+ class="btn btn-default text-secondary"
data-container="body"
- v-tooltip
>
<icon name="pencil"/>
</a>
<action-btn
+ v-tooltip
v-if="isRemovable"
:deploy-key="deployKey"
+ :title="__('Remove')"
btn-css-class="btn-danger"
type="remove"
- :title="__('Remove')"
data-container="body"
- v-tooltip
>
<icon name="remove"/>
</action-btn>
<action-btn
+ v-tooltip
v-else-if="isEnabled"
:deploy-key="deployKey"
+ :title="__('Disable')"
btn-css-class="btn-warning"
type="disable"
- :title="__('Disable')"
data-container="body"
- v-tooltip
>
<icon name="cancel"/>
</action-btn>
diff --git a/app/assets/javascripts/deploy_keys/components/keys_panel.vue b/app/assets/javascripts/deploy_keys/components/keys_panel.vue
index 3b146c7389a..2f057ca29f6 100644
--- a/app/assets/javascripts/deploy_keys/components/keys_panel.vue
+++ b/app/assets/javascripts/deploy_keys/components/keys_panel.vue
@@ -59,8 +59,8 @@ export default {
/>
</template>
<div
- class="settings-message text-center"
v-else
+ class="settings-message text-center"
>
{{ s__('DeployKeys|No deploy keys found. Create one with the form above.') }}
</div>
diff --git a/app/assets/javascripts/diff_notes/components/comment_resolve_btn.js b/app/assets/javascripts/diff_notes/components/comment_resolve_btn.js
index d1260ff5373..ed24d1775f4 100644
--- a/app/assets/javascripts/diff_notes/components/comment_resolve_btn.js
+++ b/app/assets/javascripts/diff_notes/components/comment_resolve_btn.js
@@ -6,7 +6,10 @@ import Vue from 'vue';
const CommentAndResolveBtn = Vue.extend({
props: {
- discussionId: String,
+ discussionId: {
+ type: String,
+ required: true,
+ },
},
data() {
return {
diff --git a/app/assets/javascripts/diff_notes/components/diff_note_avatars.js b/app/assets/javascripts/diff_notes/components/diff_note_avatars.js
index fe9b0795609..40f7c2fe5f3 100644
--- a/app/assets/javascripts/diff_notes/components/diff_note_avatars.js
+++ b/app/assets/javascripts/diff_notes/components/diff_note_avatars.js
@@ -7,7 +7,15 @@ import Notes from '../../notes';
import userAvatarImage from '../../vue_shared/components/user_avatar/user_avatar_image.vue';
const DiffNoteAvatars = Vue.extend({
- props: ['discussionId'],
+ components: {
+ userAvatarImage,
+ },
+ props: {
+ discussionId: {
+ type: String,
+ required: true,
+ },
+ },
data() {
return {
isVisible: false,
@@ -17,77 +25,6 @@ const DiffNoteAvatars = Vue.extend({
collapseIcon,
};
},
- components: {
- userAvatarImage,
- },
- template: `
- <div class="diff-comment-avatar-holders"
- :class="discussionClassName"
- v-show="notesCount !== 0">
- <div v-if="!isVisible">
- <!-- FIXME: Pass an alt attribute here for accessibility -->
- <user-avatar-image
- v-for="note in notesSubset"
- :key="note.id"
- class="diff-comment-avatar js-diff-comment-avatar"
- @click.native="clickedAvatar($event)"
- :img-src="note.authorAvatar"
- :tooltip-text="getTooltipText(note)"
- :data-line-type="lineType"
- :size="19"
- data-html="true"
- />
- <span v-if="notesCount > shownAvatars"
- class="diff-comments-more-count has-tooltip js-diff-comment-avatar"
- data-container="body"
- data-placement="top"
- ref="extraComments"
- role="button"
- :data-line-type="lineType"
- :title="extraNotesTitle"
- @click="clickedAvatar($event)">{{ moreText }}</span>
- </div>
- <button class="diff-notes-collapse js-diff-comment-avatar"
- type="button"
- aria-label="Show comments"
- :data-line-type="lineType"
- @click="clickedAvatar($event)"
- v-if="isVisible"
- v-html="collapseIcon">
- </button>
- </div>
- `,
- mounted() {
- this.$nextTick(() => {
- this.addNoCommentClass();
- this.setDiscussionVisible();
-
- this.lineType = $(this.$el).closest('.diff-line-num').hasClass('old_line') ? 'old' : 'new';
- });
-
- $(document).on('toggle.comments', () => {
- this.$nextTick(() => {
- this.setDiscussionVisible();
- });
- });
- },
- beforeDestroy() {
- this.addNoCommentClass();
- $(document).off('toggle.comments');
- },
- watch: {
- storeState: {
- handler() {
- this.$nextTick(() => {
- $('.has-tooltip', this.$el).tooltip('_fixTitle');
-
- // We need to add/remove a class to an element that is outside the Vue instance
- this.addNoCommentClass();
- });
- },
- deep: true,
- },
- },
computed: {
discussionClassName() {
return `js-diff-avatars-${this.discussionId}`;
@@ -128,6 +65,37 @@ const DiffNoteAvatars = Vue.extend({
return `${plusSign}${this.notesCount - this.shownAvatars}`;
},
},
+ watch: {
+ storeState: {
+ handler() {
+ this.$nextTick(() => {
+ $('.has-tooltip', this.$el).tooltip('_fixTitle');
+
+ // We need to add/remove a class to an element that is outside the Vue instance
+ this.addNoCommentClass();
+ });
+ },
+ deep: true,
+ },
+ },
+ mounted() {
+ this.$nextTick(() => {
+ this.addNoCommentClass();
+ this.setDiscussionVisible();
+
+ this.lineType = $(this.$el).closest('.diff-line-num').hasClass('old_line') ? 'old' : 'new';
+ });
+
+ $(document).on('toggle.comments', () => {
+ this.$nextTick(() => {
+ this.setDiscussionVisible();
+ });
+ });
+ },
+ beforeDestroy() {
+ this.addNoCommentClass();
+ $(document).off('toggle.comments');
+ },
methods: {
clickedAvatar(e) {
Notes.instance.onAddDiffNote(e);
@@ -164,6 +132,43 @@ const DiffNoteAvatars = Vue.extend({
return `${note.authorName}: ${note.noteTruncated}`;
},
},
+ template: `
+ <div class="diff-comment-avatar-holders"
+ :class="discussionClassName"
+ v-show="notesCount !== 0">
+ <div v-if="!isVisible">
+ <!-- FIXME: Pass an alt attribute here for accessibility -->
+ <user-avatar-image
+ v-for="note in notesSubset"
+ :key="note.id"
+ class="diff-comment-avatar js-diff-comment-avatar"
+ @click.native="clickedAvatar($event)"
+ :img-src="note.authorAvatar"
+ :tooltip-text="getTooltipText(note)"
+ :data-line-type="lineType"
+ :size="19"
+ data-html="true"
+ />
+ <span v-if="notesCount > shownAvatars"
+ class="diff-comments-more-count has-tooltip js-diff-comment-avatar"
+ data-container="body"
+ data-placement="top"
+ ref="extraComments"
+ role="button"
+ :data-line-type="lineType"
+ :title="extraNotesTitle"
+ @click="clickedAvatar($event)">{{ moreText }}</span>
+ </div>
+ <button class="diff-notes-collapse js-diff-comment-avatar"
+ type="button"
+ aria-label="Show comments"
+ :data-line-type="lineType"
+ @click="clickedAvatar($event)"
+ v-if="isVisible"
+ v-html="collapseIcon">
+ </button>
+ </div>
+ `,
});
Vue.component('diff-note-avatars', DiffNoteAvatars);
diff --git a/app/assets/javascripts/diff_notes/components/jump_to_discussion.js b/app/assets/javascripts/diff_notes/components/jump_to_discussion.js
index 8f9186dfb9a..2ce4b050763 100644
--- a/app/assets/javascripts/diff_notes/components/jump_to_discussion.js
+++ b/app/assets/javascripts/diff_notes/components/jump_to_discussion.js
@@ -10,7 +10,10 @@ import '../mixins/discussion';
const JumpToDiscussion = Vue.extend({
mixins: [DiscussionMixins],
props: {
- discussionId: String
+ discussionId: {
+ type: String,
+ required: true,
+ },
},
data: function () {
return {
@@ -52,6 +55,9 @@ const JumpToDiscussion = Vue.extend({
return lastId;
}
},
+ created() {
+ this.discussion = this.discussions[this.discussionId];
+ },
methods: {
jumpToNextUnresolvedDiscussion: function () {
let discussionsSelector;
@@ -202,9 +208,6 @@ const JumpToDiscussion = Vue.extend({
});
}
},
- created() {
- this.discussion = this.discussions[this.discussionId];
- },
});
Vue.component('jump-to-discussion', JumpToDiscussion);
diff --git a/app/assets/javascripts/diff_notes/components/resolve_btn.js b/app/assets/javascripts/diff_notes/components/resolve_btn.js
index 8d66417abac..07f3be29090 100644
--- a/app/assets/javascripts/diff_notes/components/resolve_btn.js
+++ b/app/assets/javascripts/diff_notes/components/resolve_btn.js
@@ -8,14 +8,38 @@ import Flash from '../../flash';
const ResolveBtn = Vue.extend({
props: {
- noteId: Number,
- discussionId: String,
- resolved: Boolean,
- canResolve: Boolean,
- resolvedBy: String,
- authorName: String,
- authorAvatar: String,
- noteTruncated: String,
+ noteId: {
+ type: Number,
+ required: true,
+ },
+ discussionId: {
+ type: String,
+ required: true,
+ },
+ resolved: {
+ type: Boolean,
+ required: true,
+ },
+ canResolve: {
+ type: Boolean,
+ required: true,
+ },
+ resolvedBy: {
+ type: String,
+ required: true,
+ },
+ authorName: {
+ type: String,
+ required: true,
+ },
+ authorAvatar: {
+ type: String,
+ required: true,
+ },
+ noteTruncated: {
+ type: String,
+ required: true,
+ },
},
data: function () {
return {
@@ -23,12 +47,6 @@ const ResolveBtn = Vue.extend({
loading: false
};
},
- watch: {
- 'discussions': {
- handler: 'updateTooltip',
- deep: true
- }
- },
computed: {
discussion: function () {
return this.discussions[this.discussionId];
@@ -56,6 +74,32 @@ const ResolveBtn = Vue.extend({
return this.note.resolved_by;
},
},
+ watch: {
+ 'discussions': {
+ handler: 'updateTooltip',
+ deep: true
+ }
+ },
+ mounted: function () {
+ $(this.$refs.button).tooltip({
+ container: 'body'
+ });
+ },
+ beforeDestroy: function () {
+ CommentsStore.delete(this.discussionId, this.noteId);
+ },
+ created: function () {
+ CommentsStore.create({
+ discussionId: this.discussionId,
+ noteId: this.noteId,
+ canResolve: this.canResolve,
+ resolved: this.resolved,
+ resolvedBy: this.resolvedBy,
+ authorName: this.authorName,
+ authorAvatar: this.authorAvatar,
+ noteTruncated: this.noteTruncated,
+ });
+ },
methods: {
updateTooltip: function () {
this.$nextTick(() => {
@@ -95,26 +139,6 @@ const ResolveBtn = Vue.extend({
.catch(() => new Flash('An error occurred when trying to resolve a comment. Please try again.'));
}
},
- mounted: function () {
- $(this.$refs.button).tooltip({
- container: 'body'
- });
- },
- beforeDestroy: function () {
- CommentsStore.delete(this.discussionId, this.noteId);
- },
- created: function () {
- CommentsStore.create({
- discussionId: this.discussionId,
- noteId: this.noteId,
- canResolve: this.canResolve,
- resolved: this.resolved,
- resolvedBy: this.resolvedBy,
- authorName: this.authorName,
- authorAvatar: this.authorAvatar,
- noteTruncated: this.noteTruncated,
- });
- }
});
Vue.component('resolve-btn', ResolveBtn);
diff --git a/app/assets/javascripts/diff_notes/components/resolve_count.js b/app/assets/javascripts/diff_notes/components/resolve_count.js
index fe7cf8f5fc1..9f613410e81 100644
--- a/app/assets/javascripts/diff_notes/components/resolve_count.js
+++ b/app/assets/javascripts/diff_notes/components/resolve_count.js
@@ -9,7 +9,10 @@ import '../mixins/discussion';
window.ResolveCount = Vue.extend({
mixins: [DiscussionMixins],
props: {
- loggedOut: Boolean
+ loggedOut: {
+ type: Boolean,
+ required: true,
+ },
},
data: function () {
return {
diff --git a/app/assets/javascripts/diff_notes/components/resolve_discussion_btn.js b/app/assets/javascripts/diff_notes/components/resolve_discussion_btn.js
index 6a036e96171..210a00c5fc2 100644
--- a/app/assets/javascripts/diff_notes/components/resolve_discussion_btn.js
+++ b/app/assets/javascripts/diff_notes/components/resolve_discussion_btn.js
@@ -6,9 +6,18 @@ import Vue from 'vue';
const ResolveDiscussionBtn = Vue.extend({
props: {
- discussionId: String,
- mergeRequestId: Number,
- canResolve: Boolean,
+ discussionId: {
+ type: String,
+ required: true,
+ },
+ mergeRequestId: {
+ type: Number,
+ required: true,
+ },
+ canResolve: {
+ type: Boolean,
+ required: true,
+ },
},
data: function() {
return {
@@ -45,16 +54,16 @@ const ResolveDiscussionBtn = Vue.extend({
}
}
},
+ created: function () {
+ CommentsStore.createDiscussion(this.discussionId, this.canResolve);
+
+ this.discussion = CommentsStore.state[this.discussionId];
+ },
methods: {
resolve: function () {
ResolveService.toggleResolveForDiscussion(this.mergeRequestId, this.discussionId);
}
},
- created: function () {
- CommentsStore.createDiscussion(this.discussionId, this.canResolve);
-
- this.discussion = CommentsStore.state[this.discussionId];
- }
});
Vue.component('resolve-discussion-btn', ResolveDiscussionBtn);
diff --git a/app/assets/javascripts/environments/components/container.vue b/app/assets/javascripts/environments/components/container.vue
index 6bd7c6b49cb..9aa224fa407 100644
--- a/app/assets/javascripts/environments/components/container.vue
+++ b/app/assets/javascripts/environments/components/container.vue
@@ -43,17 +43,17 @@
<div class="environments-container">
<loading-icon
+ v-if="isLoading"
class="prepend-top-default"
label="Loading environments"
- v-if="isLoading"
size="3"
/>
<slot name="emptyState"></slot>
<div
- class="table-holder"
- v-if="!isLoading && environments.length > 0">
+ v-if="!isLoading && environments.length > 0"
+ class="table-holder">
<environment-table
:environments="environments"
diff --git a/app/assets/javascripts/environments/components/environment_actions.vue b/app/assets/javascripts/environments/components/environment_actions.vue
index 0b3fef9fcca..e3652fe739e 100644
--- a/app/assets/javascripts/environments/components/environment_actions.vue
+++ b/app/assets/javascripts/environments/components/environment_actions.vue
@@ -52,18 +52,18 @@
role="group">
<button
v-tooltip
+ :title="title"
+ :aria-label="title"
+ :disabled="isLoading"
type="button"
class="dropdown btn btn-default dropdown-new js-dropdown-play-icon-container"
data-container="body"
data-toggle="dropdown"
- :title="title"
- :aria-label="title"
- :disabled="isLoading"
>
<span>
<icon
- name="play"
:size="12"
+ name="play"
/>
<i
class="fa fa-caret-down"
@@ -79,15 +79,15 @@
v-for="(action, i) in actions"
:key="i">
<button
+ :class="{ disabled: isActionDisabled(action) }"
+ :disabled="isActionDisabled(action)"
type="button"
class="js-manual-action-link no-btn btn"
@click="onClickAction(action.play_path)"
- :class="{ disabled: isActionDisabled(action) }"
- :disabled="isActionDisabled(action)"
>
<icon
- name="play"
:size="12"
+ name="play"
/>
<span>
{{ action.name }}
diff --git a/app/assets/javascripts/environments/components/environment_external_url.vue b/app/assets/javascripts/environments/components/environment_external_url.vue
index ea6f1168c68..68195225d50 100644
--- a/app/assets/javascripts/environments/components/environment_external_url.vue
+++ b/app/assets/javascripts/environments/components/environment_external_url.vue
@@ -29,17 +29,17 @@
<template>
<a
v-tooltip
+ :title="title"
+ :aria-label="title"
+ :href="externalUrl"
class="btn external-url"
data-container="body"
target="_blank"
rel="noopener noreferrer nofollow"
- :title="title"
- :aria-label="title"
- :href="externalUrl"
>
<icon
- name="external-link"
:size="12"
+ name="external-link"
/>
</a>
</template>
diff --git a/app/assets/javascripts/environments/components/environment_item.vue b/app/assets/javascripts/environments/components/environment_item.vue
index 23aaab2c441..866e91057ec 100644
--- a/app/assets/javascripts/environments/components/environment_item.vue
+++ b/app/assets/javascripts/environments/components/environment_item.vue
@@ -427,11 +427,11 @@
</script>
<template>
<div
- class="gl-responsive-table-row"
:class="{
'js-child-row environment-child-row': model.isChildren,
'folder-row': model.isFolder,
}"
+ class="gl-responsive-table-row"
role="row">
<div
class="table-section section-10"
@@ -446,19 +446,19 @@
</div>
<a
v-if="!model.isFolder"
- class="environment-name flex-truncate-parent table-mobile-content"
- :href="environmentPath">
+ :href="environmentPath"
+ class="environment-name flex-truncate-parent table-mobile-content">
<span
- class="flex-truncate-child"
v-tooltip
:title="model.name"
+ class="flex-truncate-child"
>{{ model.name }}</span>
</a>
<span
v-else
class="folder-name"
- @click="onClickFolder"
- role="button">
+ role="button"
+ @click="onClickFolder">
<span class="folder-icon">
<i
@@ -503,11 +503,11 @@
<span v-if="!model.isFolder && deploymentHasUser">
by
<user-avatar-link
- class="js-deploy-user-container"
:link-href="deploymentUser.web_url"
:img-src="deploymentUser.avatar_url"
:img-alt="userImageAltDescription"
:tooltip-text="deploymentUser.username"
+ class="js-deploy-user-container"
/>
</span>
</div>
@@ -518,8 +518,8 @@
>
<a
v-if="shouldRenderBuildName"
- class="build-link flex-truncate-parent"
:href="buildPath"
+ class="build-link flex-truncate-parent"
>
<span class="flex-truncate-child">{{ buildName }}</span>
</a>
diff --git a/app/assets/javascripts/environments/components/environment_monitoring.vue b/app/assets/javascripts/environments/components/environment_monitoring.vue
index 8df1b6317e3..947e8c901e9 100644
--- a/app/assets/javascripts/environments/components/environment_monitoring.vue
+++ b/app/assets/javascripts/environments/components/environment_monitoring.vue
@@ -28,16 +28,16 @@
<template>
<a
v-tooltip
- class="btn monitoring-url d-none d-sm-none d-md-block"
- data-container="body"
- rel="noopener noreferrer nofollow"
:href="monitoringUrl"
:title="title"
:aria-label="title"
+ class="btn monitoring-url d-none d-sm-none d-md-block"
+ data-container="body"
+ rel="noopener noreferrer nofollow"
>
<icon
- name="chart"
:size="12"
+ name="chart"
/>
</a>
</template>
diff --git a/app/assets/javascripts/environments/components/environment_rollback.vue b/app/assets/javascripts/environments/components/environment_rollback.vue
index 7515d711c50..310835c5ea9 100644
--- a/app/assets/javascripts/environments/components/environment_rollback.vue
+++ b/app/assets/javascripts/environments/components/environment_rollback.vue
@@ -39,10 +39,10 @@
</script>
<template>
<button
+ :disabled="isLoading"
type="button"
class="btn d-none d-sm-none d-md-block"
@click="onClick"
- :disabled="isLoading"
>
<span v-if="isLastDeployment">
diff --git a/app/assets/javascripts/environments/components/environment_stop.vue b/app/assets/javascripts/environments/components/environment_stop.vue
index 7055f208451..faaaf899a0d 100644
--- a/app/assets/javascripts/environments/components/environment_stop.vue
+++ b/app/assets/javascripts/environments/components/environment_stop.vue
@@ -54,13 +54,13 @@
<template>
<button
v-tooltip
+ :disabled="isLoading"
+ :title="title"
+ :aria-label="title"
type="button"
class="btn stop-env-link d-none d-sm-none d-md-block"
data-container="body"
@click="onClick"
- :disabled="isLoading"
- :title="title"
- :aria-label="title"
>
<i
class="fa fa-stop stop-env-icon"
diff --git a/app/assets/javascripts/environments/components/environment_terminal_button.vue b/app/assets/javascripts/environments/components/environment_terminal_button.vue
index 0dbbbb75e07..f8e3165f8cd 100644
--- a/app/assets/javascripts/environments/components/environment_terminal_button.vue
+++ b/app/assets/javascripts/environments/components/environment_terminal_button.vue
@@ -30,15 +30,15 @@
<template>
<a
v-tooltip
- class="btn terminal-button d-none d-sm-none d-md-block"
- data-container="body"
:title="title"
:aria-label="title"
:href="terminalPath"
+ class="btn terminal-button d-none d-sm-none d-md-block"
+ data-container="body"
>
<icon
- name="terminal"
:size="12"
+ name="terminal"
/>
</a>
</template>
diff --git a/app/assets/javascripts/environments/components/environments_app.vue b/app/assets/javascripts/environments/components/environments_app.vue
index 3da762446c9..b18f02343d6 100644
--- a/app/assets/javascripts/environments/components/environments_app.vue
+++ b/app/assets/javascripts/environments/components/environments_app.vue
@@ -93,8 +93,8 @@
<div class="top-area">
<tabs
:tabs="tabs"
- @onChangeTab="onChangeTab"
scope="environments"
+ @onChangeTab="onChangeTab"
/>
<div
@@ -119,8 +119,8 @@
@onChangePage="onChangePage"
>
<empty-state
- slot="emptyState"
v-if="!isLoading && state.environments.length === 0"
+ slot="emptyState"
:new-path="newEnvironmentPath"
:help-path="helpPagePath"
:can-create-environment="canCreateEnvironment"
diff --git a/app/assets/javascripts/environments/folder/environments_folder_view.vue b/app/assets/javascripts/environments/folder/environments_folder_view.vue
index 5ef5e347387..5f72a39c5cb 100644
--- a/app/assets/javascripts/environments/folder/environments_folder_view.vue
+++ b/app/assets/javascripts/environments/folder/environments_folder_view.vue
@@ -39,8 +39,8 @@
<template>
<div :class="cssContainerClass">
<div
- class="top-area"
v-if="!isLoading"
+ class="top-area"
>
<h4 class="js-folder-name environments-folder-name">
@@ -49,8 +49,8 @@
<tabs
:tabs="tabs"
- @onChangeTab="onChangeTab"
scope="environments"
+ @onChangeTab="onChangeTab"
/>
</div>
diff --git a/app/assets/javascripts/filtered_search/components/recent_searches_dropdown_content.vue b/app/assets/javascripts/filtered_search/components/recent_searches_dropdown_content.vue
index 26618af9515..a8eb8d94be3 100644
--- a/app/assets/javascripts/filtered_search/components/recent_searches_dropdown_content.vue
+++ b/app/assets/javascripts/filtered_search/components/recent_searches_dropdown_content.vue
@@ -72,9 +72,9 @@ export default {
@click="onItemActivated(item.text)">
<span>
<span
- class="filtered-search-history-dropdown-token"
v-for="(token, index) in item.tokens"
:key="`dropdown-token-${index}`"
+ class="filtered-search-history-dropdown-token"
>
<span class="name">{{ token.prefix }}</span>
<span class="value">{{ token.suffix }}</span>
diff --git a/app/assets/javascripts/groups/components/app.vue b/app/assets/javascripts/groups/components/app.vue
index 22eb7bd44c5..1def38bb336 100644
--- a/app/assets/javascripts/groups/components/app.vue
+++ b/app/assets/javascripts/groups/components/app.vue
@@ -216,10 +216,10 @@ export default {
<template>
<div>
<loading-icon
- class="loading-animation prepend-top-20"
- size="2"
v-if="isLoading"
:label="s__('GroupsTree|Loading groups')"
+ class="loading-animation prepend-top-20"
+ size="2"
/>
<groups-component
v-if="!isLoading"
@@ -230,10 +230,10 @@ export default {
/>
<deprecated-modal
v-show="showModal"
- kind="warning"
:primary-button-label="__('Leave')"
:title="__('Are you sure?')"
:text="groupLeaveConfirmationMessage"
+ kind="warning"
@cancel="hideLeaveGroupModal"
@submit="leaveGroup"
/>
diff --git a/app/assets/javascripts/groups/components/group_item.vue b/app/assets/javascripts/groups/components/group_item.vue
index 7f64a9bd741..efbf2e3a295 100644
--- a/app/assets/javascripts/groups/components/group_item.vue
+++ b/app/assets/javascripts/groups/components/group_item.vue
@@ -71,14 +71,14 @@ export default {
<template>
<li
- @click.stop="onClickRowGroup"
:id="groupDomId"
:class="rowClass"
class="group-row"
+ @click.stop="onClickRowGroup"
>
<div
- class="group-row-contents"
- :class="{ 'project-row-contents': !isGroup }">
+ :class="{ 'project-row-contents': !isGroup }"
+ class="group-row-contents">
<item-actions
v-if="isGroup"
:group="group"
@@ -99,8 +99,8 @@ export default {
/>
</div>
<div
- class="avatar-container prepend-top-8 prepend-left-5 s24 d-none d-sm-block"
:class="{ 'content-loading': group.isChildrenLoading }"
+ class="avatar-container prepend-top-8 prepend-left-5 s24 d-none d-sm-block"
>
<a
:href="group.relativePath"
@@ -108,14 +108,14 @@ export default {
>
<img
v-if="hasAvatar"
- class="avatar s24"
:src="group.avatarUrl"
+ class="avatar s24"
/>
<identicon
v-else
- size-class="s24"
:entity-id="group.id"
:entity-name="group.name"
+ size-class="s24"
/>
</a>
</div>
diff --git a/app/assets/javascripts/groups/components/item_actions.vue b/app/assets/javascripts/groups/components/item_actions.vue
index 87065b3d6e3..24eec4901ec 100644
--- a/app/assets/javascripts/groups/components/item_actions.vue
+++ b/app/assets/javascripts/groups/components/item_actions.vue
@@ -54,13 +54,13 @@ export default {
<a
v-tooltip
v-if="group.canLeave"
- @click.prevent="onLeaveGroup"
:href="group.leavePath"
:title="leaveBtnTitle"
:aria-label="leaveBtnTitle"
data-container="body"
data-placement="bottom"
- class="leave-group btn no-expand">
+ class="leave-group btn no-expand"
+ @click.prevent="onLeaveGroup">
<icon name="leave"/>
</a>
</div>
diff --git a/app/assets/javascripts/groups/components/item_stats.vue b/app/assets/javascripts/groups/components/item_stats.vue
index 168b4e4af2c..87ab5480c15 100644
--- a/app/assets/javascripts/groups/components/item_stats.vue
+++ b/app/assets/javascripts/groups/components/item_stats.vue
@@ -45,44 +45,44 @@
<div class="stats">
<item-stats-value
v-if="isGroup"
- css-class="number-subgroups"
- icon-name="folder"
:title="__('Subgroups')"
:value="item.subgroupCount"
+ css-class="number-subgroups"
+ icon-name="folder"
/>
<item-stats-value
v-if="isGroup"
- css-class="number-projects"
- icon-name="bookmark"
:title="__('Projects')"
:value="item.projectCount"
+ css-class="number-projects"
+ icon-name="bookmark"
/>
<item-stats-value
v-if="isGroup"
- css-class="number-users"
- icon-name="users"
:title="__('Members')"
:value="item.memberCount"
+ css-class="number-users"
+ icon-name="users"
/>
<item-stats-value
v-if="isProject"
+ :value="item.starCount"
css-class="project-stars"
icon-name="star"
- :value="item.starCount"
/>
<item-stats-value
- css-class="item-visibility"
- tooltip-placement="left"
:icon-name="visibilityIcon"
:title="visibilityTooltip"
+ css-class="item-visibility"
+ tooltip-placement="left"
/>
<div
- class="last-updated"
v-if="isProject"
+ class="last-updated"
>
<time-ago-tooltip
- tooltip-placement="bottom"
:time="item.updatedAt"
+ tooltip-placement="bottom"
/>
</div>
</div>
diff --git a/app/assets/javascripts/groups/components/item_stats_value.vue b/app/assets/javascripts/groups/components/item_stats_value.vue
index 4d86ac8023c..ef9f2bca76c 100644
--- a/app/assets/javascripts/groups/components/item_stats_value.vue
+++ b/app/assets/javascripts/groups/components/item_stats_value.vue
@@ -52,10 +52,10 @@
<template>
<span
v-tooltip
- data-container="body"
:data-placement="tooltipPlacement"
:class="cssClass"
:title="title"
+ data-container="body"
>
<icon :name="iconName" />
<span
diff --git a/app/assets/javascripts/ide/components/activity_bar.vue b/app/assets/javascripts/ide/components/activity_bar.vue
index 6efcad6adea..62697e0ecc3 100644
--- a/app/assets/javascripts/ide/components/activity_bar.vue
+++ b/app/assets/javascripts/ide/components/activity_bar.vue
@@ -39,12 +39,12 @@ export default {
<li v-once>
<a
v-tooltip
- data-container="body"
- data-placement="right"
:href="goBackUrl"
- class="ide-sidebar-link"
:title="s__('IDE|Go back')"
:aria-label="s__('IDE|Go back')"
+ data-container="body"
+ data-placement="right"
+ class="ide-sidebar-link"
>
<icon
:size="16"
@@ -55,16 +55,16 @@ export default {
<li>
<button
v-tooltip
- data-container="body"
- data-placement="right"
- type="button"
- class="ide-sidebar-link js-ide-edit-mode"
:class="{
active: currentActivityView === $options.activityBarViews.edit
}"
- @click.prevent="changedActivityView($event, $options.activityBarViews.edit)"
:title="s__('IDE|Edit')"
:aria-label="s__('IDE|Edit')"
+ data-container="body"
+ data-placement="right"
+ type="button"
+ class="ide-sidebar-link js-ide-edit-mode"
+ @click.prevent="changedActivityView($event, $options.activityBarViews.edit)"
>
<icon
name="code"
@@ -74,16 +74,16 @@ export default {
<li>
<button
v-tooltip
- data-container="body"
- data-placement="right"
- type="button"
- class="ide-sidebar-link js-ide-review-mode"
:class="{
active: currentActivityView === $options.activityBarViews.review
}"
- @click.prevent="changedActivityView($event, $options.activityBarViews.review)"
:title="s__('IDE|Review')"
:aria-label="s__('IDE|Review')"
+ data-container="body"
+ data-placement="right"
+ type="button"
+ class="ide-sidebar-link js-ide-review-mode"
+ @click.prevent="changedActivityView($event, $options.activityBarViews.review)"
>
<icon
name="file-modified"
@@ -93,16 +93,16 @@ export default {
<li v-show="hasChanges">
<button
v-tooltip
- data-container="body"
- data-placement="right"
- type="button"
- class="ide-sidebar-link js-ide-commit-mode"
:class="{
active: currentActivityView === $options.activityBarViews.commit
}"
- @click.prevent="changedActivityView($event, $options.activityBarViews.commit)"
:title="s__('IDE|Commit')"
:aria-label="s__('IDE|Commit')"
+ data-container="body"
+ data-placement="right"
+ type="button"
+ class="ide-sidebar-link js-ide-commit-mode"
+ @click.prevent="changedActivityView($event, $options.activityBarViews.commit)"
>
<icon
name="commit"
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/form.vue b/app/assets/javascripts/ide/components/commit_sidebar/form.vue
index e2b42ab2642..955d9280728 100644
--- a/app/assets/javascripts/ide/components/commit_sidebar/form.vue
+++ b/app/assets/javascripts/ide/components/commit_sidebar/form.vue
@@ -91,7 +91,6 @@ export default {
<template>
<div
- class="multi-file-commit-form"
:class="{
'is-compact': isCompact,
'is-full': !isCompact
@@ -99,6 +98,7 @@ export default {
:style="{
height: componentHeight ? `${componentHeight}px` : null,
}"
+ class="multi-file-commit-form"
>
<transition
name="commit-form-slide-up"
@@ -108,12 +108,12 @@ export default {
>
<div
v-if="isCompact"
- class="commit-form-compact"
ref="compactEl"
+ class="commit-form-compact"
>
<button
- type="button"
:disabled="!hasChanges"
+ type="button"
class="btn btn-primary btn-sm btn-block"
@click="toggleIsSmall"
>
@@ -126,8 +126,8 @@ export default {
</div>
<form
v-if="!isCompact"
- @submit.prevent.stop="commitChanges"
ref="formEl"
+ @submit.prevent.stop="commitChanges"
>
<transition name="fade">
<success-message
@@ -143,8 +143,8 @@ export default {
<loading-button
:loading="submitCommitLoading"
:disabled="commitButtonDisabled"
- container-class="btn btn-success btn-sm float-left"
:label="__('Commit')"
+ container-class="btn btn-success btn-sm float-left"
@click="commitChanges"
/>
<button
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/list.vue b/app/assets/javascripts/ide/components/commit_sidebar/list.vue
index 1325fc993b2..3d59410cbc2 100644
--- a/app/assets/javascripts/ide/components/commit_sidebar/list.vue
+++ b/app/assets/javascripts/ide/components/commit_sidebar/list.vue
@@ -43,6 +43,15 @@ export default {
required: false,
default: false,
},
+ activeFileKey: {
+ type: String,
+ required: false,
+ default: null,
+ },
+ keyPrefix: {
+ type: String,
+ required: true,
+ },
},
data() {
return {
@@ -113,8 +122,9 @@ export default {
<list-item
:file="file"
:action-component="itemActionComponent"
- :key-prefix="title"
+ :key-prefix="keyPrefix"
:staged-list="stagedList"
+ :active-file-key="activeFileKey"
/>
</li>
</ul>
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/list_item.vue b/app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
index 03f3e4de83c..2ecf9af4bf0 100644
--- a/app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
+++ b/app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
@@ -30,6 +30,11 @@ export default {
required: false,
default: false,
},
+ activeFileKey: {
+ type: String,
+ required: false,
+ default: null,
+ },
},
computed: {
iconName() {
@@ -39,6 +44,12 @@ export default {
iconClass() {
return `multi-file-${this.file.tempFile ? 'addition' : 'modified'} append-right-8`;
},
+ fullKey() {
+ return `${this.keyPrefix}-${this.file.key}`;
+ },
+ isActive() {
+ return this.activeFileKey === this.fullKey;
+ },
},
methods: {
...mapActions([
@@ -51,7 +62,7 @@ export default {
openFileInEditor() {
return this.openPendingTab({
file: this.file,
- keyPrefix: this.keyPrefix.toLowerCase(),
+ keyPrefix: this.keyPrefix,
}).then(changeViewer => {
if (changeViewer) {
this.updateViewer(viewerTypes.diff);
@@ -70,7 +81,12 @@ export default {
</script>
<template>
- <div class="multi-file-commit-list-item">
+ <div
+ :class="{
+ 'is-active': isActive
+ }"
+ class="multi-file-commit-list-item"
+ >
<button
type="button"
class="multi-file-commit-list-path"
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/message_field.vue b/app/assets/javascripts/ide/components/commit_sidebar/message_field.vue
index 0ac0af2feaa..40496c80a46 100644
--- a/app/assets/javascripts/ide/components/commit_sidebar/message_field.vue
+++ b/app/assets/javascripts/ide/components/commit_sidebar/message_field.vue
@@ -66,10 +66,10 @@ export default {
<template>
<fieldset class="common-note-form ide-commit-message-field">
<div
- class="md-area"
:class="{
'is-focused': isFocused
}"
+ class="md-area"
>
<div
v-once
@@ -92,10 +92,10 @@ export default {
<div class="ide-commit-message-textarea-container">
<div class="ide-commit-message-highlights-container">
<div
- class="note-textarea highlights monospace"
:style="{
transform: `translate3d(0, ${-scrollTop}px, 0)`
}"
+ class="note-textarea highlights monospace"
>
<div
v-for="(line, index) in allLines"
@@ -113,15 +113,15 @@ export default {
</div>
</div>
<textarea
- class="note-textarea ide-commit-message-textarea"
- name="commit-message"
+ ref="textarea"
:placeholder="__('Write a commit message...')"
:value="text"
+ class="note-textarea ide-commit-message-textarea"
+ name="commit-message"
@scroll="handleScroll"
@input="onInput"
@focus="updateIsFocused(true)"
@blur="updateIsFocused(false)"
- ref="textarea"
>
</textarea>
</div>
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/radio_group.vue b/app/assets/javascripts/ide/components/commit_sidebar/radio_group.vue
index 00f2312ae51..35ab3fd11df 100644
--- a/app/assets/javascripts/ide/components/commit_sidebar/radio_group.vue
+++ b/app/assets/javascripts/ide/components/commit_sidebar/radio_group.vue
@@ -58,12 +58,12 @@ export default {
}"
>
<input
- type="radio"
- name="commit-action"
:value="value"
- @change="updateCommitAction($event.target.value)"
:checked="commitAction === value"
:disabled="disabled"
+ type="radio"
+ name="commit-action"
+ @change="updateCommitAction($event.target.value)"
/>
<span class="prepend-left-10">
<span
@@ -80,9 +80,9 @@ export default {
class="ide-commit-new-branch"
>
<input
+ :placeholder="newBranchName"
type="text"
class="form-control monospace"
- :placeholder="newBranchName"
@input="updateBranchName($event.target.value)"
/>
</div>
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/stage_button.vue b/app/assets/javascripts/ide/components/commit_sidebar/stage_button.vue
index 52dce8412ab..a786ec80ac2 100644
--- a/app/assets/javascripts/ide/components/commit_sidebar/stage_button.vue
+++ b/app/assets/javascripts/ide/components/commit_sidebar/stage_button.vue
@@ -29,30 +29,30 @@ export default {
>
<button
v-tooltip
- type="button"
- class="btn btn-blank append-right-5"
:aria-label="__('Stage changes')"
:title="__('Stage changes')"
+ type="button"
+ class="btn btn-blank append-right-5"
data-container="body"
@click.stop="stageChange(path)"
>
<icon
- name="mobile-issue-close"
:size="12"
+ name="mobile-issue-close"
/>
</button>
<button
v-tooltip
- type="button"
- class="btn btn-blank"
:aria-label="__('Discard changes')"
:title="__('Discard changes')"
+ type="button"
+ class="btn btn-blank"
data-container="body"
@click.stop="discardFileChanges(path)"
>
<icon
- name="remove"
:size="12"
+ name="remove"
/>
</button>
</div>
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/unstage_button.vue b/app/assets/javascripts/ide/components/commit_sidebar/unstage_button.vue
index 123d60da47e..34b366f63ac 100644
--- a/app/assets/javascripts/ide/components/commit_sidebar/unstage_button.vue
+++ b/app/assets/javascripts/ide/components/commit_sidebar/unstage_button.vue
@@ -29,16 +29,16 @@ export default {
>
<button
v-tooltip
- type="button"
- class="btn btn-blank"
:aria-label="__('Unstage changes')"
:title="__('Unstage changes')"
+ type="button"
+ class="btn btn-blank"
data-container="body"
@click="unstageChange(path)"
>
<icon
- name="history"
:size="12"
+ name="history"
/>
</button>
</div>
diff --git a/app/assets/javascripts/ide/components/editor_mode_dropdown.vue b/app/assets/javascripts/ide/components/editor_mode_dropdown.vue
index b9af4d27145..95598c9aca6 100644
--- a/app/assets/javascripts/ide/components/editor_mode_dropdown.vue
+++ b/app/assets/javascripts/ide/components/editor_mode_dropdown.vue
@@ -44,11 +44,11 @@ export default {
<ul>
<li>
<a
- href="#"
- @click.prevent="changeMode($options.viewerTypes.mr)"
:class="{
'is-active': viewer === $options.viewerTypes.mr,
}"
+ href="#"
+ @click.prevent="changeMode($options.viewerTypes.mr)"
>
<strong class="dropdown-menu-inner-title">
{{ mergeReviewLine }}
@@ -60,11 +60,11 @@ export default {
</li>
<li>
<a
- href="#"
- @click.prevent="changeMode($options.viewerTypes.diff)"
:class="{
'is-active': viewer === $options.viewerTypes.diff,
}"
+ href="#"
+ @click.prevent="changeMode($options.viewerTypes.diff)"
>
<strong class="dropdown-menu-inner-title">{{ __('Reviewing') }}</strong>
<span class="dropdown-menu-inner-content">
diff --git a/app/assets/javascripts/ide/components/external_link.vue b/app/assets/javascripts/ide/components/external_link.vue
index cf3316a8179..e24fe5bbccb 100644
--- a/app/assets/javascripts/ide/components/external_link.vue
+++ b/app/assets/javascripts/ide/components/external_link.vue
@@ -26,15 +26,15 @@ export default {
>
<a
:href="file.permalink"
- target="_blank"
:title="s__('IDE|Open in file view')"
+ target="_blank"
rel="noopener noreferrer"
>
<span class="vertical-align-middle">Open in file view</span>
<icon
+ :size="16"
name="external-link"
css-classes="vertical-align-middle space-right"
- :size="16"
/>
</a>
</div>
diff --git a/app/assets/javascripts/ide/components/file_finder/index.vue b/app/assets/javascripts/ide/components/file_finder/index.vue
index cabb3f59b17..0ba33053717 100644
--- a/app/assets/javascripts/ide/components/file_finder/index.vue
+++ b/app/assets/javascripts/ide/components/file_finder/index.vue
@@ -173,38 +173,38 @@ export default {
>
<div class="dropdown-input">
<input
+ ref="searchInput"
+ :placeholder="__('Search files')"
+ v-model="searchText"
type="search"
class="dropdown-input-field"
- :placeholder="__('Search files')"
autocomplete="off"
- v-model="searchText"
- ref="searchInput"
@keydown="onKeydown($event)"
@keyup="onKeyup($event)"
/>
<i
- aria-hidden="true"
- class="fa fa-search dropdown-input-search"
:class="{
hidden: showClearInputButton
}"
+ aria-hidden="true"
+ class="fa fa-search dropdown-input-search"
></i>
<i
- role="button"
:aria-label="__('Clear search input')"
- class="fa fa-times dropdown-input-clear"
:class="{
show: showClearInputButton
}"
+ role="button"
+ class="fa fa-times dropdown-input-clear"
@click="clearSearchInput"
></i>
</div>
<div>
<virtual-list
+ ref="virtualScrollList"
:size="listHeight"
:remain="listShowCount"
wtag="ul"
- ref="virtualScrollList"
>
<template v-if="filteredBlobsLength">
<li
@@ -212,11 +212,11 @@ export default {
:key="file.key"
>
<item
- class="disable-hover"
:file="file"
:search-text="searchText"
:focused="index === focusedIndex"
:index="index"
+ class="disable-hover"
@click="openFile"
@mouseover="onMouseOver"
@mousemove="onMouseMove"
diff --git a/app/assets/javascripts/ide/components/file_finder/item.vue b/app/assets/javascripts/ide/components/file_finder/item.vue
index d4427420207..a4cf3edb981 100644
--- a/app/assets/javascripts/ide/components/file_finder/item.vue
+++ b/app/assets/javascripts/ide/components/file_finder/item.vue
@@ -59,11 +59,11 @@ export default {
<template>
<button
- type="button"
- class="diff-changed-file"
:class="{
'is-focused': focused,
}"
+ type="button"
+ class="diff-changed-file"
@click.prevent="clickRow"
@mouseover="mouseOverRow"
@mousemove="mouseMove"
diff --git a/app/assets/javascripts/ide/components/ide.vue b/app/assets/javascripts/ide/components/ide.vue
index f5f832521c5..f5f7f967a92 100644
--- a/app/assets/javascripts/ide/components/ide.vue
+++ b/app/assets/javascripts/ide/components/ide.vue
@@ -93,8 +93,8 @@ export default {
:merge-request-id="currentMergeRequestId"
/>
<repo-editor
- class="multi-file-edit-pane-content"
:file="activeFile"
+ class="multi-file-edit-pane-content"
/>
</template>
<template
diff --git a/app/assets/javascripts/ide/components/ide_review.vue b/app/assets/javascripts/ide/components/ide_review.vue
index 99fa2465a84..f9978762c45 100644
--- a/app/assets/javascripts/ide/components/ide_review.vue
+++ b/app/assets/javascripts/ide/components/ide_review.vue
@@ -36,8 +36,8 @@ export default {
<template>
<ide-tree-list
:viewer-type="viewer"
- header-class="ide-review-header"
:disable-action-dropdown="true"
+ header-class="ide-review-header"
>
<template
slot="header"
diff --git a/app/assets/javascripts/ide/components/ide_side_bar.vue b/app/assets/javascripts/ide/components/ide_side_bar.vue
index 1dc2170edde..21906674c4b 100644
--- a/app/assets/javascripts/ide/components/ide_side_bar.vue
+++ b/app/assets/javascripts/ide/components/ide_side_bar.vue
@@ -115,17 +115,17 @@ export default {
<div class="multi-file-commit-panel-inner">
<template v-if="loading">
<div
- class="multi-file-loading-container"
v-for="n in 3"
:key="n"
+ class="multi-file-loading-container"
>
<skeleton-loading-container />
</div>
</template>
<template v-else>
<div
- class="context-header ide-context-header dropdown"
ref="mergeRequestDropdown"
+ class="context-header ide-context-header dropdown"
>
<button
type="button"
@@ -136,18 +136,18 @@ export default {
class="avatar-container s40 project-avatar"
>
<project-avatar-image
- class="avatar-container project-avatar"
:link-href="currentProject.path"
:img-src="currentProject.avatar_url"
:img-alt="currentProject.name"
:img-size="40"
+ class="avatar-container project-avatar"
/>
</div>
<identicon
v-else
- size-class="s40"
:entity-id="currentProject.id"
:entity-name="currentProject.name"
+ size-class="s40"
/>
<div class="ide-sidebar-project-title">
<div class="sidebar-context-title">
@@ -155,11 +155,11 @@ export default {
</div>
<div class="d-flex">
<div
+ v-tooltip
v-if="currentBranchId"
- class="sidebar-context-title ide-sidebar-branch-title"
ref="branchId"
- v-tooltip
:title="branchTooltipTitle"
+ class="sidebar-context-title ide-sidebar-branch-title"
>
<icon
name="branch"
@@ -168,10 +168,10 @@ export default {
</div>
<div
v-if="currentMergeRequestId"
- class="sidebar-context-title ide-sidebar-branch-title"
:class="{
'prepend-left-8': currentBranchId
}"
+ class="sidebar-context-title ide-sidebar-branch-title"
>
<icon
name="git-merge"
diff --git a/app/assets/javascripts/ide/components/ide_status_bar.vue b/app/assets/javascripts/ide/components/ide_status_bar.vue
index e40f137d998..0582ad32e92 100644
--- a/app/assets/javascripts/ide/components/ide_status_bar.vue
+++ b/app/assets/javascripts/ide/components/ide_status_bar.vue
@@ -75,22 +75,22 @@ export default {
<template>
<footer class="ide-status-bar">
<div
- class="ide-status-branch"
v-if="lastCommit && lastCommitFormatedAge"
+ class="ide-status-branch"
>
<span
- class="ide-status-pipeline"
v-if="latestPipeline && latestPipeline.details"
+ class="ide-status-pipeline"
>
<ci-icon
- :status="latestPipeline.details.status"
v-tooltip
+ :status="latestPipeline.details.status"
:title="latestPipeline.details.status.text"
/>
Pipeline
<a
- class="monospace"
- :href="latestPipeline.details.status.details_path">#{{ latestPipeline.id }}</a>
+ :href="latestPipeline.details.status.details_path"
+ class="monospace">#{{ latestPipeline.id }}</a>
{{ latestPipeline.details.status.text }}
for
</span>
@@ -100,18 +100,18 @@ export default {
/>
<a
v-tooltip
- class="commit-sha"
:title="lastCommit.message"
:href="getCommitPath(lastCommit.short_id)"
+ class="commit-sha"
>{{ lastCommit.short_id }}</a>
by
{{ lastCommit.author_name }}
<time
v-tooltip
- data-placement="top"
- data-container="body"
:datetime="lastCommit.committed_date"
:title="tooltipTitle(lastCommit.committed_date)"
+ data-placement="top"
+ data-container="body"
>
{{ lastCommitFormatedAge }}
</time>
@@ -129,8 +129,8 @@ export default {
{{ file.eol }}
</div>
<div
- class="ide-status-file"
- v-if="file && !file.binary">
+ v-if="file && !file.binary"
+ class="ide-status-file">
{{ file.editorRow }}:{{ file.editorColumn }}
</div>
<div
diff --git a/app/assets/javascripts/ide/components/ide_tree_list.vue b/app/assets/javascripts/ide/components/ide_tree_list.vue
index e64a09fcc90..0df99798d21 100644
--- a/app/assets/javascripts/ide/components/ide_tree_list.vue
+++ b/app/assets/javascripts/ide/components/ide_tree_list.vue
@@ -50,17 +50,17 @@ export default {
>
<template v-if="showLoading">
<div
- class="multi-file-loading-container"
v-for="n in 3"
:key="n"
+ class="multi-file-loading-container"
>
<skeleton-loading-container />
</div>
</template>
<template v-else>
<header
- class="ide-tree-header"
:class="headerClass"
+ class="ide-tree-header"
>
<slot name="header"></slot>
</header>
diff --git a/app/assets/javascripts/ide/components/jobs/detail.vue b/app/assets/javascripts/ide/components/jobs/detail.vue
index 6713b54efae..f39ce545656 100644
--- a/app/assets/javascripts/ide/components/jobs/detail.vue
+++ b/app/assets/javascripts/ide/components/jobs/detail.vue
@@ -93,10 +93,10 @@ export default {
<a
v-tooltip
:title="__('Show complete raw log')"
+ :href="detailJob.rawPath"
data-placement="top"
data-container="body"
class="controllers-buttons"
- :href="detailJob.rawPath"
target="_blank"
>
<i
@@ -105,20 +105,20 @@ export default {
></i>
</a>
<scroll-button
- direction="up"
:disabled="isScrolledToTop"
+ direction="up"
@click="scrollUp"
/>
<scroll-button
- direction="down"
:disabled="isScrolledToBottom"
+ direction="down"
@click="scrollDown"
/>
</div>
</div>
<pre
- class="build-trace mb-0 h-100"
ref="buildTrace"
+ class="build-trace mb-0 h-100"
@scroll="scrollBuildLog"
>
<code
diff --git a/app/assets/javascripts/ide/components/jobs/detail/description.vue b/app/assets/javascripts/ide/components/jobs/detail/description.vue
index def6bac3157..7e24974f7e5 100644
--- a/app/assets/javascripts/ide/components/jobs/detail/description.vue
+++ b/app/assets/javascripts/ide/components/jobs/detail/description.vue
@@ -24,10 +24,10 @@ export default {
<template>
<div class="d-flex align-items-center">
<ci-icon
- class="d-flex"
:status="job.status"
:borderless="true"
:size="24"
+ class="d-flex"
/>
<span class="prepend-left-8">
{{ job.name }}
@@ -38,8 +38,8 @@ export default {
>
{{ jobId }}
<icon
- name="external-link"
:size="12"
+ name="external-link"
/>
</a>
</span>
diff --git a/app/assets/javascripts/ide/components/jobs/detail/scroll_button.vue b/app/assets/javascripts/ide/components/jobs/detail/scroll_button.vue
index 4e19e6e9c84..103a407987f 100644
--- a/app/assets/javascripts/ide/components/jobs/detail/scroll_button.vue
+++ b/app/assets/javascripts/ide/components/jobs/detail/scroll_button.vue
@@ -47,15 +47,15 @@ export default {
<template>
<div
v-tooltip
+ :title="tooltipTitle"
class="controllers-buttons"
data-container="body"
data-placement="top"
- :title="tooltipTitle"
>
<button
+ :disabled="disabled"
class="btn-scroll btn-transparent btn-blank"
type="button"
- :disabled="disabled"
@click="clickedScroll"
>
<icon
diff --git a/app/assets/javascripts/ide/components/jobs/item.vue b/app/assets/javascripts/ide/components/jobs/item.vue
index c8e621504f0..7f4695a0451 100644
--- a/app/assets/javascripts/ide/components/jobs/item.vue
+++ b/app/assets/javascripts/ide/components/jobs/item.vue
@@ -27,8 +27,8 @@ export default {
<template>
<div class="ide-job-item">
<job-description
- class="append-right-default"
:job="job"
+ class="append-right-default"
/>
<div class="ml-auto align-self-center">
<button
diff --git a/app/assets/javascripts/ide/components/jobs/stage.vue b/app/assets/javascripts/ide/components/jobs/stage.vue
index b1428f885fb..15e881b7bc8 100644
--- a/app/assets/javascripts/ide/components/jobs/stage.vue
+++ b/app/assets/javascripts/ide/components/jobs/stage.vue
@@ -60,10 +60,10 @@ export default {
class="ide-stage card prepend-top-default"
>
<div
- class="card-header"
:class="{
'border-bottom-0': stage.isCollapsed
}"
+ class="card-header"
@click="toggleCollapsed"
>
<ci-icon
@@ -72,10 +72,10 @@ export default {
/>
<strong
v-tooltip="showTooltip"
+ ref="stageTitle"
:title="showTooltip ? stage.name : null"
data-container="body"
class="prepend-left-8 ide-stage-title"
- ref="stageTitle"
>
{{ stage.name }}
</strong>
@@ -93,8 +93,8 @@ export default {
/>
</div>
<div
- class="card-body"
v-show="!stage.isCollapsed"
+ class="card-body"
>
<loading-icon
v-if="showLoadingIcon"
diff --git a/app/assets/javascripts/ide/components/merge_requests/dropdown.vue b/app/assets/javascripts/ide/components/merge_requests/dropdown.vue
index 8cc8345db2e..4b9824bf04b 100644
--- a/app/assets/javascripts/ide/components/merge_requests/dropdown.vue
+++ b/app/assets/javascripts/ide/components/merge_requests/dropdown.vue
@@ -42,8 +42,8 @@ export default {
</span>
</template>
<list
- type="created"
:empty-text="__('You have not created any merge requests')"
+ type="created"
/>
</tab>
<tab>
@@ -54,8 +54,8 @@ export default {
</span>
</template>
<list
- type="assigned"
:empty-text="__('You do not have any assigned merge requests')"
+ type="assigned"
/>
</tab>
</tabs>
diff --git a/app/assets/javascripts/ide/components/merge_requests/item.vue b/app/assets/javascripts/ide/components/merge_requests/item.vue
index b50fc8a3dbb..4e18376bd48 100644
--- a/app/assets/javascripts/ide/components/merge_requests/item.vue
+++ b/app/assets/javascripts/ide/components/merge_requests/item.vue
@@ -47,8 +47,8 @@ export default {
<span class="d-flex append-right-default ide-merge-request-current-icon">
<icon
v-if="isActive"
- name="mobile-issue-close"
:size="18"
+ name="mobile-issue-close"
/>
</span>
<span>
diff --git a/app/assets/javascripts/ide/components/merge_requests/list.vue b/app/assets/javascripts/ide/components/merge_requests/list.vue
index 5896e3a147d..19d3e48ee10 100644
--- a/app/assets/javascripts/ide/components/merge_requests/list.vue
+++ b/app/assets/javascripts/ide/components/merge_requests/list.vue
@@ -80,12 +80,12 @@ export default {
<div>
<div class="dropdown-input mt-3 pb-3 mb-0 border-bottom">
<input
- type="search"
- class="dropdown-input-field"
+ ref="searchInput"
:placeholder="__('Search merge requests')"
v-model="search"
+ type="search"
+ class="dropdown-input-field"
@input="searchMergeRequests"
- ref="searchInput"
/>
<i
aria-hidden="true"
@@ -94,8 +94,8 @@ export default {
</div>
<div class="dropdown-content ide-merge-requests-dropdown-content d-flex">
<loading-icon
- class="mt-3 mb-3 align-self-center ml-auto mr-auto"
v-if="isLoading"
+ class="mt-3 mb-3 align-self-center ml-auto mr-auto"
size="2"
/>
<ul
diff --git a/app/assets/javascripts/ide/components/mr_file_icon.vue b/app/assets/javascripts/ide/components/mr_file_icon.vue
index 179a589d1ac..821be319cce 100644
--- a/app/assets/javascripts/ide/components/mr_file_icon.vue
+++ b/app/assets/javascripts/ide/components/mr_file_icon.vue
@@ -14,10 +14,10 @@ export default {
<template>
<icon
- name="git-merge"
v-tooltip
:title="__('Part of merge request changes')"
- css-classes="append-right-8"
:size="12"
+ name="git-merge"
+ css-classes="append-right-8"
/>
</template>
diff --git a/app/assets/javascripts/ide/components/new_dropdown/index.vue b/app/assets/javascripts/ide/components/new_dropdown/index.vue
index f0b29702497..1e398d7e1aa 100644
--- a/app/assets/javascripts/ide/components/new_dropdown/index.vue
+++ b/app/assets/javascripts/ide/components/new_dropdown/index.vue
@@ -55,10 +55,10 @@ export default {
<template>
<div class="ide-new-btn">
<div
- class="dropdown"
:class="{
show: dropdownOpen,
}"
+ class="dropdown"
>
<button
type="button"
@@ -67,19 +67,19 @@ export default {
@click.stop="openDropdown()"
>
<icon
- name="plus"
:size="12"
+ name="plus"
css-classes="float-left"
/>
<icon
- name="arrow-down"
:size="12"
+ name="arrow-down"
css-classes="float-left"
/>
</button>
<ul
- class="dropdown-menu dropdown-menu-right"
ref="dropdownMenu"
+ class="dropdown-menu dropdown-menu-right"
>
<li>
<a
diff --git a/app/assets/javascripts/ide/components/new_dropdown/modal.vue b/app/assets/javascripts/ide/components/new_dropdown/modal.vue
index dd2800179ff..1e9668d5154 100644
--- a/app/assets/javascripts/ide/components/new_dropdown/modal.vue
+++ b/app/assets/javascripts/ide/components/new_dropdown/modal.vue
@@ -71,18 +71,18 @@ export default {
>
<form
slot="body"
- @submit.prevent="createEntryInStore"
class="form-group row"
+ @submit.prevent="createEntryInStore"
>
<label class="label-light col-form-label col-sm-3">
{{ __('Name') }}
</label>
<div class="col-sm-9">
<input
+ ref="fieldName"
+ v-model="entryName"
type="text"
class="form-control"
- v-model="entryName"
- ref="fieldName"
/>
</div>
</form>
diff --git a/app/assets/javascripts/ide/components/new_dropdown/upload.vue b/app/assets/javascripts/ide/components/new_dropdown/upload.vue
index c165af5ce52..1814924be39 100644
--- a/app/assets/javascripts/ide/components/new_dropdown/upload.vue
+++ b/app/assets/javascripts/ide/components/new_dropdown/upload.vue
@@ -67,9 +67,9 @@
</a>
<input
id="file-upload"
+ ref="fileUpload"
type="file"
class="hidden"
- ref="fileUpload"
/>
</div>
</template>
diff --git a/app/assets/javascripts/ide/components/panes/right.vue b/app/assets/javascripts/ide/components/panes/right.vue
index dd7fc8f1e01..dedc2988618 100644
--- a/app/assets/javascripts/ide/components/panes/right.vue
+++ b/app/assets/javascripts/ide/components/panes/right.vue
@@ -44,10 +44,10 @@ export default {
>
<resizable-panel
v-if="rightPane"
- class="multi-file-commit-panel-inner"
:collapsible="false"
:initial-width="350"
:min-size="350"
+ class="multi-file-commit-panel-inner"
side="right"
>
<component :is="rightPane" />
@@ -57,13 +57,13 @@ export default {
<li>
<button
v-tooltip
- data-container="body"
- data-placement="left"
:title="__('Pipelines')"
- class="ide-sidebar-link is-right"
:class="{
active: pipelinesActive
}"
+ data-container="body"
+ data-placement="left"
+ class="ide-sidebar-link is-right"
type="button"
@click="clickTab($event, $options.rightSidebarViews.pipelines)"
>
diff --git a/app/assets/javascripts/ide/components/pipelines/list.vue b/app/assets/javascripts/ide/components/pipelines/list.vue
index 06455fac439..4d29e9f8060 100644
--- a/app/assets/javascripts/ide/components/pipelines/list.vue
+++ b/app/assets/javascripts/ide/components/pipelines/list.vue
@@ -75,8 +75,8 @@ export default {
>
#{{ latestPipeline.id }}
<icon
- name="external-link"
:size="12"
+ name="external-link"
/>
</a>
</span>
diff --git a/app/assets/javascripts/ide/components/repo_commit_section.vue b/app/assets/javascripts/ide/components/repo_commit_section.vue
index c5092d8e04d..01df0019fd4 100644
--- a/app/assets/javascripts/ide/components/repo_commit_section.vue
+++ b/app/assets/javascripts/ide/components/repo_commit_section.vue
@@ -6,7 +6,7 @@ import DeprecatedModal from '~/vue_shared/components/deprecated_modal.vue';
import CommitFilesList from './commit_sidebar/list.vue';
import EmptyState from './commit_sidebar/empty_state.vue';
import * as consts from '../stores/modules/commit/constants';
-import { activityBarViews } from '../constants';
+import { activityBarViews, stageKeys } from '../constants';
export default {
components: {
@@ -27,11 +27,14 @@ export default {
'unusedSeal',
]),
...mapState('commit', ['commitMessage', 'submitCommitLoading']),
- ...mapGetters(['lastOpenedFile', 'hasChanges', 'someUncommitedChanges']),
+ ...mapGetters(['lastOpenedFile', 'hasChanges', 'someUncommitedChanges', 'activeFile']),
...mapGetters('commit', ['commitButtonDisabled', 'discardDraftButtonDisabled']),
showStageUnstageArea() {
return !!(this.someUncommitedChanges || this.lastCommitMsg || !this.unusedSeal);
},
+ activeFileKey() {
+ return this.activeFile ? this.activeFile.key : null;
+ },
},
watch: {
hasChanges() {
@@ -44,6 +47,7 @@ export default {
if (this.lastOpenedFile) {
this.openPendingTab({
file: this.lastOpenedFile,
+ keyPrefix: this.lastOpenedFile.changed ? stageKeys.unstaged : stageKeys.staged,
})
.then(changeViewer => {
if (changeViewer) {
@@ -62,6 +66,7 @@ export default {
return this.updateCommitAction(consts.COMMIT_TO_NEW_BRANCH).then(() => this.commitChanges());
},
},
+ stageKeys,
};
</script>
@@ -72,8 +77,8 @@ export default {
<deprecated-modal
id="ide-create-branch-modal"
:primary-button-label="__('Create new branch')"
- kind="success"
:title="__('Branch has changed')"
+ kind="success"
@submit="forceCreateNewBranch"
>
<template slot="body">
@@ -85,22 +90,26 @@ export default {
v-if="showStageUnstageArea"
>
<commit-files-list
- class="is-first"
- icon-name="unstaged"
:title="__('Unstaged')"
+ :key-prefix="$options.stageKeys.unstaged"
:file-list="changedFiles"
- action="stageAllChanges"
:action-btn-text="__('Stage all')"
+ :active-file-key="activeFileKey"
+ class="is-first"
+ icon-name="unstaged"
+ action="stageAllChanges"
item-action-component="stage-button"
/>
<commit-files-list
- icon-name="staged"
:title="__('Staged')"
+ :key-prefix="$options.stageKeys.staged"
:file-list="stagedFiles"
- action="unstageAllChanges"
:action-btn-text="__('Unstage all')"
- item-action-component="unstage-button"
:staged-list="true"
+ :active-file-key="activeFileKey"
+ icon-name="staged"
+ action="unstageAllChanges"
+ item-action-component="unstage-button"
/>
</template>
<empty-state
diff --git a/app/assets/javascripts/ide/components/repo_editor.vue b/app/assets/javascripts/ide/components/repo_editor.vue
index d365745d78b..24b6a4fdea1 100644
--- a/app/assets/javascripts/ide/components/repo_editor.vue
+++ b/app/assets/javascripts/ide/components/repo_editor.vue
@@ -2,6 +2,7 @@
import { mapState, mapGetters, mapActions } from 'vuex';
import flash from '~/flash';
import ContentViewer from '~/vue_shared/components/content_viewer/content_viewer.vue';
+import DiffViewer from '~/vue_shared/components/diff_viewer/diff_viewer.vue';
import { activityBarViews, viewerTypes } from '../constants';
import Editor from '../lib/editor';
import ExternalLink from './external_link.vue';
@@ -9,6 +10,7 @@ import ExternalLink from './external_link.vue';
export default {
components: {
ContentViewer,
+ DiffViewer,
ExternalLink,
},
props: {
@@ -29,9 +31,18 @@ export default {
shouldHideEditor() {
return this.file && this.file.binary && !this.file.content;
},
+ showContentViewer() {
+ return (
+ (this.shouldHideEditor || this.file.viewMode === 'preview') &&
+ (this.viewer !== viewerTypes.mr || !this.file.mrChange)
+ );
+ },
+ showDiffViewer() {
+ return this.shouldHideEditor && this.file.mrChange && this.viewer === viewerTypes.mr;
+ },
editTabCSS() {
return {
- active: this.file.viewMode === 'edit',
+ active: this.file.viewMode === 'editor',
};
},
previewTabCSS() {
@@ -53,7 +64,7 @@ export default {
if (this.currentActivityView !== activityBarViews.edit) {
this.setFileViewMode({
file: this.file,
- viewMode: 'edit',
+ viewMode: 'editor',
});
}
}
@@ -62,7 +73,7 @@ export default {
if (this.currentActivityView !== activityBarViews.edit) {
this.setFileViewMode({
file: this.file,
- viewMode: 'edit',
+ viewMode: 'editor',
});
}
},
@@ -190,14 +201,14 @@ export default {
>
<div class="ide-mode-tabs clearfix" >
<ul
- class="nav-links float-left"
v-if="!shouldHideEditor && isEditModeActive"
+ class="nav-links float-left"
>
<li :class="editTabCSS">
<a
href="javascript:void(0);"
role="button"
- @click.prevent="setFileViewMode({ file, viewMode: 'edit' })">
+ @click.prevent="setFileViewMode({ file, viewMode: 'editor' })">
<template v-if="viewer === $options.viewerTypes.edit">
{{ __('Edit') }}
</template>
@@ -222,19 +233,27 @@ export default {
/>
</div>
<div
- v-show="!shouldHideEditor && file.viewMode === 'edit'"
+ v-show="!shouldHideEditor && file.viewMode ==='editor'"
ref="editor"
- class="multi-file-editor-holder"
:class="{
'is-readonly': isCommitModeActive,
}"
+ class="multi-file-editor-holder"
>
</div>
<content-viewer
- v-if="shouldHideEditor || file.viewMode === 'preview'"
+ v-if="showContentViewer"
:content="file.content || file.raw"
:path="file.rawPath || file.path"
:file-size="file.size"
:project-path="file.projectId"/>
+ <diff-viewer
+ v-if="showDiffViewer"
+ :diff-mode="file.mrChange.diffMode"
+ :new-path="file.mrChange.new_path"
+ :new-sha="currentMergeRequest.sha"
+ :old-path="file.mrChange.old_path"
+ :old-sha="currentMergeRequest.baseCommitSha"
+ :project-path="file.projectId"/>
</div>
</template>
diff --git a/app/assets/javascripts/ide/components/repo_file.vue b/app/assets/javascripts/ide/components/repo_file.vue
index f56aeced806..c34547fcc60 100644
--- a/app/assets/javascripts/ide/components/repo_file.vue
+++ b/app/assets/javascripts/ide/components/repo_file.vue
@@ -120,17 +120,17 @@ export default {
<template>
<div>
<div
- class="file"
:class="fileClass"
- @click="clickFile"
+ class="file"
role="button"
+ @click="clickFile"
>
<div
class="file-name"
>
<span
- class="ide-file-name str-truncated"
:style="levelIndentation"
+ class="ide-file-name str-truncated"
>
<file-icon
:file-name="file.name"
@@ -156,10 +156,10 @@ export default {
<icon
v-tooltip
:title="folderChangesTooltip"
+ :size="12"
data-container="body"
data-placement="right"
name="file-modified"
- :size="12"
css-classes="prepend-left-5 multi-file-modified"
/>
</span>
diff --git a/app/assets/javascripts/ide/components/repo_file_status_icon.vue b/app/assets/javascripts/ide/components/repo_file_status_icon.vue
index 97589e116c5..76a3333be50 100644
--- a/app/assets/javascripts/ide/components/repo_file_status_icon.vue
+++ b/app/assets/javascripts/ide/components/repo_file_status_icon.vue
@@ -26,8 +26,8 @@ export default {
<template>
<span
- v-if="file.file_lock"
v-tooltip
+ v-if="file.file_lock"
:title="lockTooltip"
data-container="body"
>
diff --git a/app/assets/javascripts/ide/components/repo_loading_file.vue b/app/assets/javascripts/ide/components/repo_loading_file.vue
index 3e47da88050..7a5ede82253 100644
--- a/app/assets/javascripts/ide/components/repo_loading_file.vue
+++ b/app/assets/javascripts/ide/components/repo_loading_file.vue
@@ -33,8 +33,8 @@
<td class="d-none d-sm-block">
<skeleton-loading-container
- class="animation-container-right"
:small="true"
+ class="animation-container-right"
/>
</td>
</template>
diff --git a/app/assets/javascripts/ide/components/repo_tab.vue b/app/assets/javascripts/ide/components/repo_tab.vue
index fb26b973236..1ad52c1bd83 100644
--- a/app/assets/javascripts/ide/components/repo_tab.vue
+++ b/app/assets/javascripts/ide/components/repo_tab.vue
@@ -76,8 +76,8 @@ export default {
@mouseout="mouseOutTab"
>
<div
- class="multi-file-tab"
:title="tab.url"
+ class="multi-file-tab"
>
<file-icon
:file-name="tab.name"
@@ -89,16 +89,16 @@ export default {
/>
</div>
<button
+ :aria-label="closeLabel"
+ :disabled="tab.pending"
type="button"
class="multi-file-tab-close"
@click.stop.prevent="closeFile(tab)"
- :aria-label="closeLabel"
- :disabled="tab.pending"
>
<icon
v-if="!showChangedIcon"
- name="close"
:size="12"
+ name="close"
/>
<changed-file-icon
v-else
diff --git a/app/assets/javascripts/ide/components/repo_tabs.vue b/app/assets/javascripts/ide/components/repo_tabs.vue
index 99e51097e12..c12a63e26be 100644
--- a/app/assets/javascripts/ide/components/repo_tabs.vue
+++ b/app/assets/javascripts/ide/components/repo_tabs.vue
@@ -52,8 +52,8 @@ export default {
<template>
<div class="multi-file-tabs">
<ul
- class="list-unstyled append-bottom-0"
ref="tabsScroller"
+ class="list-unstyled append-bottom-0"
>
<repo-tab
v-for="tab in files"
diff --git a/app/assets/javascripts/ide/components/resizable_panel.vue b/app/assets/javascripts/ide/components/resizable_panel.vue
index 5ea2a2f6825..7277fcb7617 100644
--- a/app/assets/javascripts/ide/components/resizable_panel.vue
+++ b/app/assets/javascripts/ide/components/resizable_panel.vue
@@ -63,11 +63,11 @@ export default {
<template>
<div
- class="multi-file-commit-panel"
:class="{
'is-collapsed': collapsed && collapsible,
}"
:style="panelStyle"
+ class="multi-file-commit-panel"
@click="toggleFullbarCollapsed"
>
<slot></slot>
@@ -77,9 +77,9 @@ export default {
:start-size="initialWidth"
:min-size="minSize"
:max-size="$options.maxSize"
+ :side="side === 'right' ? 'left' : 'right'"
@resize-start="setResizingStatus(true)"
@resize-end="setResizingStatus(false)"
- :side="side === 'right' ? 'left' : 'right'"
/>
</div>
</template>
diff --git a/app/assets/javascripts/ide/constants.js b/app/assets/javascripts/ide/constants.js
index 65886c02b92..12e0c3aeef0 100644
--- a/app/assets/javascripts/ide/constants.js
+++ b/app/assets/javascripts/ide/constants.js
@@ -21,7 +21,19 @@ export const viewerTypes = {
diff: 'diff',
};
+export const diffModes = {
+ replaced: 'replaced',
+ new: 'new',
+ deleted: 'deleted',
+ renamed: 'renamed',
+};
+
export const rightSidebarViews = {
pipelines: 'pipelines-list',
jobsDetail: 'jobs-detail',
};
+
+export const stageKeys = {
+ unstaged: 'unstaged',
+ staged: 'staged',
+};
diff --git a/app/assets/javascripts/ide/stores/mutations/file.js b/app/assets/javascripts/ide/stores/mutations/file.js
index 13f123b6630..5826f6cb828 100644
--- a/app/assets/javascripts/ide/stores/mutations/file.js
+++ b/app/assets/javascripts/ide/stores/mutations/file.js
@@ -1,5 +1,6 @@
/* eslint-disable no-param-reassign */
import * as types from '../mutation_types';
+import { diffModes } from '../../constants';
export default {
[types.SET_FILE_ACTIVE](state, { path, active }) {
@@ -85,8 +86,19 @@ export default {
});
},
[types.SET_FILE_MERGE_REQUEST_CHANGE](state, { file, mrChange }) {
+ let diffMode = diffModes.replaced;
+ if (mrChange.new_file) {
+ diffMode = diffModes.new;
+ } else if (mrChange.deleted_file) {
+ diffMode = diffModes.deleted;
+ } else if (mrChange.renamed_file) {
+ diffMode = diffModes.renamed;
+ }
Object.assign(state.entries[file.path], {
- mrChange,
+ mrChange: {
+ ...mrChange,
+ diffMode,
+ },
});
},
[types.SET_FILE_VIEWMODE](state, { file, viewMode }) {
diff --git a/app/assets/javascripts/ide/stores/utils.js b/app/assets/javascripts/ide/stores/utils.js
index e0b9766fbee..a04a33cd12d 100644
--- a/app/assets/javascripts/ide/stores/utils.js
+++ b/app/assets/javascripts/ide/stores/utils.js
@@ -39,7 +39,7 @@ export const dataStructure = () => ({
editorColumn: 1,
fileLanguage: '',
eol: '',
- viewMode: 'edit',
+ viewMode: 'editor',
previewMode: null,
size: 0,
parentPath: null,
diff --git a/app/assets/javascripts/issue_show/components/description.vue b/app/assets/javascripts/issue_show/components/description.vue
index ae577e04a56..1174177f561 100644
--- a/app/assets/javascripts/issue_show/components/description.vue
+++ b/app/assets/javascripts/issue_show/components/description.vue
@@ -110,25 +110,25 @@
<template>
<div
v-if="descriptionHtml"
- class="description"
:class="{
'js-task-list-container': canUpdate
}"
+ class="description"
>
<div
- class="wiki"
+ ref="gfm-content"
:class="{
'issue-realtime-pre-pulse': preAnimation,
'issue-realtime-trigger-pulse': pulseAnimation
}"
- v-html="descriptionHtml"
- ref="gfm-content">
+ class="wiki"
+ v-html="descriptionHtml">
</div>
<textarea
- class="hidden js-task-list-field"
v-if="descriptionText"
v-model="descriptionText"
:data-update-url="updateUrl"
+ class="hidden js-task-list-field"
>
</textarea>
diff --git a/app/assets/javascripts/issue_show/components/edit_actions.vue b/app/assets/javascripts/issue_show/components/edit_actions.vue
index 7ef5e679881..8cb0ab22bfb 100644
--- a/app/assets/javascripts/issue_show/components/edit_actions.vue
+++ b/app/assets/javascripts/issue_show/components/edit_actions.vue
@@ -51,16 +51,16 @@
<template>
<div class="prepend-top-default append-bottom-default clearfix">
<button
- class="btn btn-save float-left"
:class="{ disabled: formState.updateLoading || !isSubmitEnabled }"
- type="submit"
:disabled="formState.updateLoading || !isSubmitEnabled"
+ class="btn btn-save float-left"
+ type="submit"
@click.prevent="updateIssuable">
Save changes
<i
+ v-if="formState.updateLoading"
class="fa fa-spinner fa-spin"
- aria-hidden="true"
- v-if="formState.updateLoading">
+ aria-hidden="true">
</i>
</button>
<button
@@ -71,16 +71,16 @@
</button>
<button
v-if="shouldShowDeleteButton"
- class="btn btn-danger float-right append-right-default"
:class="{ disabled: deleteLoading }"
- type="button"
:disabled="deleteLoading"
+ class="btn btn-danger float-right append-right-default"
+ type="button"
@click="deleteIssuable">
Delete
<i
+ v-if="deleteLoading"
class="fa fa-spinner fa-spin"
- aria-hidden="true"
- v-if="deleteLoading">
+ aria-hidden="true">
</i>
</button>
</div>
diff --git a/app/assets/javascripts/issue_show/components/edited.vue b/app/assets/javascripts/issue_show/components/edited.vue
index 01097b5b35e..5ff5b1630b1 100644
--- a/app/assets/javascripts/issue_show/components/edited.vue
+++ b/app/assets/javascripts/issue_show/components/edited.vue
@@ -37,16 +37,16 @@
Edited
<time-ago-tooltip
v-if="updatedAt"
- tooltip-placement="bottom"
:time="updatedAt"
+ tooltip-placement="bottom"
/>
<span
v-if="hasUpdatedBy"
>
by
<a
- class="author_link"
:href="updatedByPath"
+ class="author_link"
>
<span>{{ updatedByName }}</span>
</a>
diff --git a/app/assets/javascripts/issue_show/components/fields/description.vue b/app/assets/javascripts/issue_show/components/fields/description.vue
index 33110d27050..5f58f671c73 100644
--- a/app/assets/javascripts/issue_show/components/fields/description.vue
+++ b/app/assets/javascripts/issue_show/components/fields/description.vue
@@ -52,12 +52,12 @@
>
<textarea
id="issue-description"
+ ref="textarea"
+ slot="textarea"
+ v-model="formState.description"
class="note-textarea js-gfm-input js-autosize markdown-area"
data-supports-quick-actions="false"
aria-label="Description"
- v-model="formState.description"
- ref="textarea"
- slot="textarea"
placeholder="Write a comment or drag your files here…"
@keydown.meta.enter="updateIssuable"
@keydown.ctrl.enter="updateIssuable">
diff --git a/app/assets/javascripts/issue_show/components/fields/description_template.vue b/app/assets/javascripts/issue_show/components/fields/description_template.vue
index 7db0488e306..e90d9fad94e 100644
--- a/app/assets/javascripts/issue_show/components/fields/description_template.vue
+++ b/app/assets/javascripts/issue_show/components/fields/description_template.vue
@@ -48,15 +48,15 @@
class="dropdown js-issuable-selector-wrap"
data-issuable-type="issue">
<button
+ ref="toggle"
+ :data-namespace-path="projectNamespace"
+ :data-project-path="projectPath"
+ :data-data="issuableTemplatesJson"
class="dropdown-menu-toggle js-issuable-selector"
type="button"
- ref="toggle"
data-field-name="issuable_template"
data-selected="null"
- data-toggle="dropdown"
- :data-namespace-path="projectNamespace"
- :data-project-path="projectPath"
- :data-data="issuableTemplatesJson">
+ data-toggle="dropdown">
<span class="dropdown-toggle-text">
Choose a template
</span>
diff --git a/app/assets/javascripts/issue_show/components/fields/title.vue b/app/assets/javascripts/issue_show/components/fields/title.vue
index c3abb9fd9d5..7d1526a64b4 100644
--- a/app/assets/javascripts/issue_show/components/fields/title.vue
+++ b/app/assets/javascripts/issue_show/components/fields/title.vue
@@ -21,11 +21,11 @@
</label>
<input
id="issuable-title"
+ v-model="formState.title"
class="form-control"
type="text"
placeholder="Title"
aria-label="Title"
- v-model="formState.title"
@keydown.meta.enter="updateIssuable"
@keydown.ctrl.enter="updateIssuable" />
</fieldset>
diff --git a/app/assets/javascripts/issue_show/components/form.vue b/app/assets/javascripts/issue_show/components/form.vue
index ab8bd34762f..5bfc072e3da 100644
--- a/app/assets/javascripts/issue_show/components/form.vue
+++ b/app/assets/javascripts/issue_show/components/form.vue
@@ -72,8 +72,8 @@
<locked-warning v-if="formState.lockedWarningVisible" />
<div class="row">
<div
- class="col-sm-4 col-lg-3"
- v-if="hasIssuableTemplates">
+ v-if="hasIssuableTemplates"
+ class="col-sm-4 col-lg-3">
<description-template
:form-state="formState"
:issuable-templates="issuableTemplates"
diff --git a/app/assets/javascripts/issue_show/components/title.vue b/app/assets/javascripts/issue_show/components/title.vue
index aec890a2ff6..12101c0daa5 100644
--- a/app/assets/javascripts/issue_show/components/title.vue
+++ b/app/assets/javascripts/issue_show/components/title.vue
@@ -67,11 +67,11 @@
<template>
<div class="title-container">
<h2
- class="title"
:class="{
'issue-realtime-pre-pulse': preAnimation,
'issue-realtime-trigger-pulse': pulseAnimation
}"
+ class="title"
v-html="titleHtml"
>
</h2>
@@ -80,11 +80,11 @@
v-if="showInlineEditButton && canUpdate"
type="button"
class="btn btn-default btn-edit btn-svg js-issuable-edit"
- v-html="pencilIcon"
title="Edit title and description"
data-placement="bottom"
data-container="body"
@click="edit"
+ v-html="pencilIcon"
>
</button>
</div>
diff --git a/app/assets/javascripts/jobs/components/header.vue b/app/assets/javascripts/jobs/components/header.vue
index 5704d753277..1e7f4b2c3f7 100644
--- a/app/assets/javascripts/jobs/components/header.vue
+++ b/app/assets/javascripts/jobs/components/header.vue
@@ -74,13 +74,13 @@ export default {
<ci-header
v-if="shouldRenderContent"
:status="status"
- item-name="Job"
:item-id="job.id"
:time="headerTime"
:user="job.user"
:actions="actions"
:has-sidebar-button="true"
:should-render-triggered-label="jobStarted"
+ item-name="Job"
/>
<loading-icon
v-if="isLoading"
diff --git a/app/assets/javascripts/jobs/components/sidebar_details_block.vue b/app/assets/javascripts/jobs/components/sidebar_details_block.vue
index 8f3c66b0cbe..d2adf628050 100644
--- a/app/assets/javascripts/jobs/components/sidebar_details_block.vue
+++ b/app/assets/javascripts/jobs/components/sidebar_details_block.vue
@@ -101,8 +101,8 @@ export default {
{{ __('Retry') }}
</a>
<button
- type="button"
:aria-label="__('Toggle Sidebar')"
+ type="button"
class="btn btn-blank gutter-toggle float-right d-block d-md-none js-sidebar-build-toggle"
>
<i
@@ -114,20 +114,20 @@ export default {
</div>
<template v-if="shouldRenderContent">
<div
- class="block retry-link"
v-if="job.retry_path || job.new_issue_path"
+ class="block retry-link"
>
<a
v-if="job.new_issue_path"
- class="js-new-issue btn btn-new btn-inverted"
:href="job.new_issue_path"
+ class="js-new-issue btn btn-new btn-inverted"
>
{{ __('New issue') }}
</a>
<a
v-if="canUserRetry"
- class="js-retry-job btn btn-inverted-secondary"
:href="job.retry_path"
+ class="js-retry-job btn btn-inverted-secondary"
data-method="post"
rel="nofollow"
>
@@ -136,8 +136,8 @@ export default {
</div>
<div :class="{block : renderBlock }">
<p
- class="build-detail-row js-job-mr"
v-if="job.merge_request"
+ class="build-detail-row js-job-mr"
>
<span class="build-light-text">
{{ __('Merge Request:') }}
@@ -148,51 +148,51 @@ export default {
</p>
<detail-row
- class="js-job-duration"
v-if="job.duration"
- title="Duration"
:value="duration"
+ class="js-job-duration"
+ title="Duration"
/>
<detail-row
- class="js-job-finished"
v-if="job.finished_at"
- title="Finished"
:value="timeFormated(job.finished_at)"
+ class="js-job-finished"
+ title="Finished"
/>
<detail-row
- class="js-job-erased"
v-if="job.erased_at"
- title="Erased"
:value="timeFormated(job.erased_at)"
+ class="js-job-erased"
+ title="Erased"
/>
<detail-row
- class="js-job-queued"
v-if="job.queued"
- title="Queued"
:value="queued"
+ class="js-job-queued"
+ title="Queued"
/>
<detail-row
- class="js-job-timeout"
v-if="hasTimeout"
- title="Timeout"
:help-url="runnerHelpUrl"
:value="timeout"
+ class="js-job-timeout"
+ title="Timeout"
/>
<detail-row
- class="js-job-runner"
v-if="job.runner"
- title="Runner"
:value="runnerId"
+ class="js-job-runner"
+ title="Runner"
/>
<detail-row
- class="js-job-coverage"
v-if="job.coverage"
- title="Coverage"
:value="coverage"
+ class="js-job-coverage"
+ title="Coverage"
/>
<p
- class="build-detail-row js-job-tags"
v-if="job.tags.length"
+ class="build-detail-row js-job-tags"
>
<span class="build-light-text">
{{ __('Tags:') }}
@@ -210,8 +210,8 @@ export default {
class="btn-group prepend-top-5"
role="group">
<a
- class="js-cancel-job btn btn-sm btn-default"
:href="job.cancel_path"
+ class="js-cancel-job btn btn-sm btn-default"
data-method="post"
rel="nofollow"
>
@@ -221,8 +221,8 @@ export default {
</div>
</template>
<loading-icon
- class="prepend-top-10"
v-if="isLoading"
+ class="prepend-top-10"
size="2"
/>
</div>
diff --git a/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js b/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js
index 2cb238529aa..e4ed8111824 100644
--- a/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js
+++ b/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js
@@ -11,9 +11,18 @@ import { __ } from '~/locale';
global.mergeConflicts.diffFileEditor = Vue.extend({
props: {
- file: Object,
- onCancelDiscardConfirmation: Function,
- onAcceptDiscardConfirmation: Function
+ file: {
+ type: Object,
+ required: true,
+ },
+ onCancelDiscardConfirmation: {
+ type: Function,
+ required: true,
+ },
+ onAcceptDiscardConfirmation: {
+ type: Function,
+ required: true,
+ },
},
data() {
return {
diff --git a/app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.js b/app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.js
index 56d6678e1bd..827cf5f478d 100644
--- a/app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.js
+++ b/app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.js
@@ -1,14 +1,19 @@
-/* eslint-disable no-param-reassign, comma-dangle */
+/* eslint-disable no-param-reassign */
import Vue from 'vue';
+import actionsMixin from '../mixins/line_conflict_actions';
+import utilsMixin from '../mixins/line_conflict_utils';
-((global) => {
+(global => {
global.mergeConflicts = global.mergeConflicts || {};
global.mergeConflicts.inlineConflictLines = Vue.extend({
+ mixins: [utilsMixin, actionsMixin],
props: {
- file: Object
+ file: {
+ type: Object,
+ required: true,
+ },
},
- mixins: [global.mergeConflicts.utils, global.mergeConflicts.actions],
});
})(window.gl || (window.gl = {}));
diff --git a/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js b/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js
index 0fc4a13450a..57e73e38d88 100644
--- a/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js
+++ b/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js
@@ -1,15 +1,20 @@
/* eslint-disable no-param-reassign, comma-dangle */
import Vue from 'vue';
+import actionsMixin from '../mixins/line_conflict_actions';
+import utilsMixin from '../mixins/line_conflict_utils';
((global) => {
global.mergeConflicts = global.mergeConflicts || {};
global.mergeConflicts.parallelConflictLines = Vue.extend({
+ mixins: [utilsMixin, actionsMixin],
props: {
- file: Object
+ file: {
+ type: Object,
+ required: true,
+ },
},
- mixins: [global.mergeConflicts.utils, global.mergeConflicts.actions],
template: `
<table>
<tr class="line_holder parallel" v-for="section in file.parallelLines">
diff --git a/app/assets/javascripts/merge_conflicts/merge_conflict_service.js b/app/assets/javascripts/merge_conflicts/merge_conflict_service.js
index c68b47c9348..64d69159222 100644
--- a/app/assets/javascripts/merge_conflicts/merge_conflict_service.js
+++ b/app/assets/javascripts/merge_conflicts/merge_conflict_service.js
@@ -1,23 +1,16 @@
-/* eslint-disable no-param-reassign, comma-dangle */
import axios from '../lib/utils/axios_utils';
-((global) => {
- global.mergeConflicts = global.mergeConflicts || {};
-
- class mergeConflictsService {
- constructor(options) {
- this.conflictsPath = options.conflictsPath;
- this.resolveConflictsPath = options.resolveConflictsPath;
- }
-
- fetchConflictsData() {
- return axios.get(this.conflictsPath);
- }
+export default class MergeConflictsService {
+ constructor(options) {
+ this.conflictsPath = options.conflictsPath;
+ this.resolveConflictsPath = options.resolveConflictsPath;
+ }
- submitResolveConflicts(data) {
- return axios.post(this.resolveConflictsPath, data);
- }
+ fetchConflictsData() {
+ return axios.get(this.conflictsPath);
}
- global.mergeConflicts.mergeConflictsService = mergeConflictsService;
-})(window.gl || (window.gl = {}));
+ submitResolveConflicts(data) {
+ return axios.post(this.resolveConflictsPath, data);
+ }
+}
diff --git a/app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js b/app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js
index 4abd5433bb5..326d4523cce 100644
--- a/app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js
+++ b/app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js
@@ -5,7 +5,7 @@ import Vue from 'vue';
import Flash from '../flash';
import initIssuableSidebar from '../init_issuable_sidebar';
import './merge_conflict_store';
-import './merge_conflict_service';
+import MergeConflictsService from './merge_conflict_service';
import './mixins/line_conflict_utils';
import './mixins/line_conflict_actions';
import './components/diff_file_editor';
@@ -17,7 +17,7 @@ export default function initMergeConflicts() {
const INTERACTIVE_RESOLVE_MODE = 'interactive';
const conflictsEl = document.querySelector('#conflicts');
const mergeConflictsStore = gl.mergeConflicts.mergeConflictsStore;
- const mergeConflictsService = new gl.mergeConflicts.mergeConflictsService({
+ const mergeConflictsService = new MergeConflictsService({
conflictsPath: conflictsEl.dataset.conflictsPath,
resolveConflictsPath: conflictsEl.dataset.resolveConflictsPath
});
diff --git a/app/assets/javascripts/merge_conflicts/mixins/line_conflict_actions.js b/app/assets/javascripts/merge_conflicts/mixins/line_conflict_actions.js
index 53e000d7e9e..364ae2b2688 100644
--- a/app/assets/javascripts/merge_conflicts/mixins/line_conflict_actions.js
+++ b/app/assets/javascripts/merge_conflicts/mixins/line_conflict_actions.js
@@ -1,13 +1,7 @@
-/* eslint-disable no-param-reassign, comma-dangle */
-
-((global) => {
- global.mergeConflicts = global.mergeConflicts || {};
-
- global.mergeConflicts.actions = {
- methods: {
- handleSelected(file, sectionId, selection) {
- gl.mergeConflicts.mergeConflictsStore.handleSelected(file, sectionId, selection);
- }
- }
- };
-})(window.gl || (window.gl = {}));
+export default {
+ methods: {
+ handleSelected(file, sectionId, selection) {
+ gl.mergeConflicts.mergeConflictsStore.handleSelected(file, sectionId, selection);
+ },
+ },
+};
diff --git a/app/assets/javascripts/merge_conflicts/mixins/line_conflict_utils.js b/app/assets/javascripts/merge_conflicts/mixins/line_conflict_utils.js
index 0f475f62ee6..d25032fb142 100644
--- a/app/assets/javascripts/merge_conflicts/mixins/line_conflict_utils.js
+++ b/app/assets/javascripts/merge_conflicts/mixins/line_conflict_utils.js
@@ -1,19 +1,13 @@
-/* eslint-disable no-param-reassign, quote-props, comma-dangle */
-
-((global) => {
- global.mergeConflicts = global.mergeConflicts || {};
-
- global.mergeConflicts.utils = {
- methods: {
- lineCssClass(line) {
- return {
- 'head': line.isHead,
- 'origin': line.isOrigin,
- 'match': line.hasMatch,
- 'selected': line.isSelected,
- 'unselected': line.isUnselected
- };
- }
- }
- };
-})(window.gl || (window.gl = {}));
+export default {
+ methods: {
+ lineCssClass(line) {
+ return {
+ head: line.isHead,
+ origin: line.isOrigin,
+ match: line.hasMatch,
+ selected: line.isSelected,
+ unselected: line.isUnselected,
+ };
+ },
+ },
+};
diff --git a/app/assets/javascripts/milestone_select.js b/app/assets/javascripts/milestone_select.js
index f8b3d3061f0..d269c45203a 100644
--- a/app/assets/javascripts/milestone_select.js
+++ b/app/assets/javascripts/milestone_select.js
@@ -56,7 +56,7 @@ export default class MilestoneSelect {
if (issueUpdateURL) {
milestoneLinkTemplate = _.template(
- '<a href="/<%- full_path %>/milestones/<%- iid %>" class="bold has-tooltip" data-container="body" title="<%- remaining %>"><%- title %></a>',
+ '<a href="<%- web_url %>" class="bold has-tooltip" data-container="body" title="<%- remaining %>"><%- title %></a>',
);
milestoneLinkNoneTemplate = '<span class="no-value">None</span>';
}
diff --git a/app/assets/javascripts/monitoring/components/empty_state.vue b/app/assets/javascripts/monitoring/components/empty_state.vue
index c77f451c2d3..82b9a4b1adb 100644
--- a/app/assets/javascripts/monitoring/components/empty_state.vue
+++ b/app/assets/javascripts/monitoring/components/empty_state.vue
@@ -107,8 +107,8 @@ export default {
<div class="state-button">
<a
v-if="currentState.buttonPath"
- class="btn btn-success"
:href="currentState.buttonPath"
+ class="btn btn-success"
>
{{ currentState.buttonText }}
</a>
@@ -116,8 +116,8 @@ export default {
<div class="state-button">
<a
v-if="currentState.secondaryButtonPath"
- class="btn"
:href="currentState.secondaryButtonPath"
+ class="btn"
>
{{ currentState.secondaryButtonText }}
</a>
diff --git a/app/assets/javascripts/monitoring/components/graph.vue b/app/assets/javascripts/monitoring/components/graph.vue
index 503ee1ce3d1..20400154100 100644
--- a/app/assets/javascripts/monitoring/components/graph.vue
+++ b/app/assets/javascripts/monitoring/components/graph.vue
@@ -241,16 +241,16 @@ export default {
</div>
</div>
<div
- class="prometheus-svg-container"
:style="paddingBottomRootSvg"
+ class="prometheus-svg-container"
>
<svg
- :viewBox="outerViewBox"
ref="baseSvg"
+ :viewBox="outerViewBox"
>
<g
- class="x-axis"
:transform="axisTransform"
+ class="x-axis"
/>
<g
class="y-axis"
@@ -265,9 +265,9 @@ export default {
:unit-of-display="unitOfDisplay"
/>
<svg
- class="graph-data"
- :viewBox="innerViewBox"
ref="graphData"
+ :viewBox="innerViewBox"
+ class="graph-data"
>
<graph-path
v-for="(path, index) in timeSeries"
@@ -287,11 +287,11 @@ export default {
:graph-height-offset="graphHeightOffset"
/>
<rect
- class="prometheus-graph-overlay"
+ ref="graphOverlay"
:width="(graphWidth - 70)"
:height="(graphHeight - 100)"
+ class="prometheus-graph-overlay"
transform="translate(-5, 20)"
- ref="graphOverlay"
@mousemove="handleMouseOverGraph($event)"
/>
</svg>
diff --git a/app/assets/javascripts/monitoring/components/graph/axis.vue b/app/assets/javascripts/monitoring/components/graph/axis.vue
index fc4b3689dfd..8a604a51eb2 100644
--- a/app/assets/javascripts/monitoring/components/graph/axis.vue
+++ b/app/assets/javascripts/monitoring/components/graph/axis.vue
@@ -92,48 +92,48 @@ export default {
<template>
<g class="axis-label-container">
<line
+ :y1="yPosition"
+ :x2="graphWidth + 20"
+ :y2="yPosition"
class="label-x-axis-line"
stroke="#000000"
stroke-width="1"
x1="10"
- :y1="yPosition"
- :x2="graphWidth + 20"
- :y2="yPosition"
/>
<line
+ :x2="10"
+ :y2="yPosition"
class="label-y-axis-line"
stroke="#000000"
stroke-width="1"
x1="10"
y1="0"
- :x2="10"
- :y2="yPosition"
/>
<rect
- class="rect-axis-text"
:transform="rectTransform"
:width="yLabelWidth"
:height="yLabelHeight"
+ class="rect-axis-text"
/>
<text
+ ref="ylabel"
+ :transform="textTransform"
class="label-axis-text y-label-text"
text-anchor="middle"
- :transform="textTransform"
- ref="ylabel"
>
{{ yAxisLabelSentenceCase }}
</text>
<rect
- class="rect-axis-text"
:x="xPosition + 60"
:y="graphHeight - 80"
+ class="rect-axis-text"
width="35"
height="50"
/>
<text
- class="label-axis-text x-label-text"
:x="xPosition + 60"
:y="yPosition"
+ class="label-axis-text x-label-text"
dy=".35em"
>
{{ timeString }}
diff --git a/app/assets/javascripts/monitoring/components/graph/deployment.vue b/app/assets/javascripts/monitoring/components/graph/deployment.vue
index 4012191ceb9..a7289ed53e8 100644
--- a/app/assets/javascripts/monitoring/components/graph/deployment.vue
+++ b/app/assets/javascripts/monitoring/components/graph/deployment.vue
@@ -33,18 +33,18 @@ export default {
:key="index"
:transform="transformDeploymentGroup(deployment)">
<rect
+ :height="calculatedHeight"
x="0"
y="0"
- :height="calculatedHeight"
width="3"
fill="url(#shadow-gradient)"
/>
<line
+ :y2="calculatedHeight"
class="deployment-line"
x1="0"
y1="0"
x2="0"
- :y2="calculatedHeight"
stroke="#000"
/>
</g>
diff --git a/app/assets/javascripts/monitoring/components/graph/flag.vue b/app/assets/javascripts/monitoring/components/graph/flag.vue
index 8a771107de8..282c5c24384 100644
--- a/app/assets/javascripts/monitoring/components/graph/flag.vue
+++ b/app/assets/javascripts/monitoring/components/graph/flag.vue
@@ -117,13 +117,13 @@ export default {
<template>
<div
- class="prometheus-graph-cursor"
:style="cursorStyle"
+ class="prometheus-graph-cursor"
>
<div
v-if="showFlagContent"
- class="prometheus-graph-flag popover"
:class="flagOrientation"
+ class="prometheus-graph-flag popover"
>
<div class="arrow"></div>
<div class="popover-title">
@@ -139,8 +139,8 @@ export default {
>
<div>
<icon
- name="commit"
:size="12"
+ name="commit"
/>
<a :href="deploymentFlagData.commitUrl">
{{ deploymentFlagData.sha.slice(0, 8) }}
@@ -150,8 +150,8 @@ export default {
v-if="deploymentFlagData.tag"
>
<icon
- name="label"
:size="12"
+ name="label"
/>
<a :href="deploymentFlagData.tagUrl">
{{ deploymentFlagData.ref }}
diff --git a/app/assets/javascripts/monitoring/components/graph/legend.vue b/app/assets/javascripts/monitoring/components/graph/legend.vue
index da9280cf1f1..3276f3a1ceb 100644
--- a/app/assets/javascripts/monitoring/components/graph/legend.vue
+++ b/app/assets/javascripts/monitoring/components/graph/legend.vue
@@ -31,8 +31,8 @@ export default {
<table class="prometheus-table">
<tr
v-for="(series, index) in timeSeries"
- :key="index"
v-if="series.shouldRenderLegend"
+ :key="index"
:class="isStable(series)"
>
<td>
@@ -40,11 +40,11 @@ export default {
</td>
<track-line :track="series" />
<td
- class="legend-metric-title"
- v-if="timeSeries.length > 1">
+ v-if="timeSeries.length > 1"
+ class="legend-metric-title">
<track-info
- :track="series"
- v-if="series.metricTag" />
+ v-if="series.metricTag"
+ :track="series" />
<track-info
v-else
:track="series">
@@ -62,8 +62,8 @@ export default {
:key="`track-line-${trackIndex}`"/>
<td :key="`track-info-${trackIndex}`">
<track-info
- class="legend-metric-title"
- :track="track" />
+ :track="track"
+ class="legend-metric-title" />
</td>
</template>
</tr>
diff --git a/app/assets/javascripts/monitoring/components/graph/path.vue b/app/assets/javascripts/monitoring/components/graph/path.vue
index 52f8aa2ee3f..a9b7ce586ce 100644
--- a/app/assets/javascripts/monitoring/components/graph/path.vue
+++ b/app/assets/javascripts/monitoring/components/graph/path.vue
@@ -44,26 +44,26 @@ export default {
<template>
<g transform="translate(-5, 20)">
<circle
- class="circle-path"
+ v-if="showDot"
:cx="currentCoordinates.currentX"
:cy="currentCoordinates.currentY"
:fill="lineColor"
:stroke="lineColor"
+ class="circle-path"
r="3"
- v-if="showDot"
/>
<path
- class="metric-area"
:d="generatedAreaPath"
:fill="areaColor"
+ class="metric-area"
/>
<path
- class="metric-line"
:d="generatedLinePath"
:stroke="lineColor"
+ :stroke-dasharray="strokeDashArray"
+ class="metric-line"
fill="none"
stroke-width="1"
- :stroke-dasharray="strokeDashArray"
/>
</g>
</template>
diff --git a/app/assets/javascripts/monitoring/components/graph/track_line.vue b/app/assets/javascripts/monitoring/components/graph/track_line.vue
index 18be65fd1ef..ba3f93b39ff 100644
--- a/app/assets/javascripts/monitoring/components/graph/track_line.vue
+++ b/app/assets/javascripts/monitoring/components/graph/track_line.vue
@@ -24,11 +24,11 @@ export default {
<line
:stroke-dasharray="stylizedLine"
:stroke="track.lineColor"
- stroke-width="4"
:x1="0"
:x2="16"
:y1="4"
:y2="4"
+ stroke-width="4"
/>
</svg>
</td>
diff --git a/app/assets/javascripts/notebook/cells/code.vue b/app/assets/javascripts/notebook/cells/code.vue
index b4067d229aa..18cef82cec0 100644
--- a/app/assets/javascripts/notebook/cells/code.vue
+++ b/app/assets/javascripts/notebook/cells/code.vue
@@ -39,10 +39,10 @@ export default {
<template>
<div class="cell">
<code-cell
- type="input"
:raw-code="rawInputCode"
:count="cell.execution_count"
- :code-css-class="codeCssClass" />
+ :code-css-class="codeCssClass"
+ type="input" />
<output-cell
v-if="hasOutput"
:count="cell.execution_count"
diff --git a/app/assets/javascripts/notebook/cells/code/index.vue b/app/assets/javascripts/notebook/cells/code/index.vue
index 0f3083f05b2..7d2a1a33b98 100644
--- a/app/assets/javascripts/notebook/cells/code/index.vue
+++ b/app/assets/javascripts/notebook/cells/code/index.vue
@@ -48,9 +48,9 @@
:type="promptType"
:count="count" />
<pre
- class="language-python"
- :class="codeCssClass"
ref="code"
+ :class="codeCssClass"
+ class="language-python"
v-text="code">
</pre>
</div>
diff --git a/app/assets/javascripts/notebook/cells/output/index.vue b/app/assets/javascripts/notebook/cells/output/index.vue
index 91b2269a83a..4183b976814 100644
--- a/app/assets/javascripts/notebook/cells/output/index.vue
+++ b/app/assets/javascripts/notebook/cells/output/index.vue
@@ -78,10 +78,10 @@
<template>
<component
:is="componentName"
- type="output"
:output-type="outputType"
:count="count"
:raw-code="rawCode"
:code-css-class="codeCssClass"
+ type="output"
/>
</template>
diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue
index 17943d7abfb..ad6dd3d9a09 100644
--- a/app/assets/javascripts/notes/components/comment_form.vue
+++ b/app/assets/javascripts/notes/components/comment_form.vue
@@ -312,8 +312,8 @@ Please check your network connection and try again.`;
<div>
<note-signed-out-widget v-if="!isLoggedIn" />
<discussion-locked-widget
- issuable-type="issue"
v-else-if="isLocked(getNoteableData) && !canCreateNote"
+ issuable-type="issue"
/>
<ul
v-else-if="canCreateNote"
@@ -345,22 +345,22 @@ Please check your network connection and try again.`;
/>
<markdown-field
+ ref="markdownField"
:markdown-preview-path="markdownPreviewPath"
:markdown-docs-path="markdownDocsPath"
:quick-actions-docs-path="quickActionsDocsPath"
- :add-spacing-classes="false"
- ref="markdownField">
+ :add-spacing-classes="false">
<textarea
id="note-body"
+ ref="textarea"
+ slot="textarea"
+ v-model="note"
+ :disabled="isSubmitting"
name="note[note]"
class="note-textarea js-vue-comment-form
js-gfm-input js-autosize markdown-area js-vue-textarea"
data-supports-quick-actions="true"
aria-label="Description"
- v-model="note"
- ref="textarea"
- slot="textarea"
- :disabled="isSubmitting"
placeholder="Write a comment or drag your files here…"
@keydown.up="editCurrentUserLastNote()"
@keydown.meta.enter="handleSave()"
@@ -372,10 +372,10 @@ js-gfm-input js-autosize markdown-area js-vue-textarea"
class="float-left btn-group
append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown">
<button
- @click.prevent="handleSave()"
:disabled="isSubmitButtonDisabled"
class="btn btn-create comment-btn js-comment-button js-comment-submit-button"
- type="submit">
+ type="submit"
+ @click.prevent="handleSave()">
{{ __(commentButtonTitle) }}
</button>
<button
@@ -434,20 +434,20 @@ append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown"
<loading-button
v-if="canUpdateIssue"
:loading="isToggleStateButtonLoading"
- @click="handleSave(true)"
:container-class="[
actionButtonClassNames,
'btn btn-comment btn-comment-and-close js-action-button'
]"
:disabled="isToggleStateButtonLoading || isSubmitting"
:label="issueActionButtonTitle"
+ @click="handleSave(true)"
/>
<button
- type="button"
v-if="note.length"
- @click="discard"
- class="btn btn-cancel js-note-discard">
+ type="button"
+ class="btn btn-cancel js-note-discard"
+ @click="discard">
Discard draft
</button>
</div>
diff --git a/app/assets/javascripts/notes/components/diff_file_header.vue b/app/assets/javascripts/notes/components/diff_file_header.vue
index 94d9dc69964..fc7b52be241 100644
--- a/app/assets/javascripts/notes/components/diff_file_header.vue
+++ b/app/assets/javascripts/notes/components/diff_file_header.vue
@@ -29,12 +29,12 @@ export default {
<span>
<icon name="archive" />
<strong
- v-html="diffFile.submoduleLink"
class="file-title-name"
+ v-html="diffFile.submoduleLink"
></strong>
<clipboard-button
- title="Copy file path to clipboard"
:text="diffFile.submoduleLink"
+ title="Copy file path to clipboard"
css-class="btn-default btn-transparent btn-clipboard"
/>
</span>
@@ -48,16 +48,16 @@ export default {
<span v-html="diffFile.blobIcon"></span>
<span v-if="diffFile.renamedFile">
<strong
- class="file-title-name has-tooltip"
:title="diffFile.oldPath"
+ class="file-title-name has-tooltip"
data-container="body"
>
{{ diffFile.oldPath }}
</strong>
&rarr;
<strong
- class="file-title-name has-tooltip"
:title="diffFile.newPath"
+ class="file-title-name has-tooltip"
data-container="body"
>
{{ diffFile.newPath }}
@@ -66,8 +66,8 @@ export default {
<strong
v-else
- class="file-title-name has-tooltip"
:title="diffFile.oldPath"
+ class="file-title-name has-tooltip"
data-container="body"
>
{{ diffFile.filePath }}
@@ -78,8 +78,8 @@ export default {
</component>
<clipboard-button
- title="Copy file path to clipboard"
:text="diffFile.filePath"
+ title="Copy file path to clipboard"
css-class="btn-default btn-transparent btn-clipboard"
/>
diff --git a/app/assets/javascripts/notes/components/diff_with_note.vue b/app/assets/javascripts/notes/components/diff_with_note.vue
index ee01ec85bbb..cafb28910eb 100644
--- a/app/assets/javascripts/notes/components/diff_with_note.vue
+++ b/app/assets/javascripts/notes/components/diff_with_note.vue
@@ -60,8 +60,8 @@ export default {
<template>
<div
ref="fileHolder"
- class="diff-file file-holder"
:class="diffFileClass"
+ class="diff-file file-holder"
>
<div class="js-file-title file-title file-title-flex-parent">
<diff-file-header
@@ -74,11 +74,11 @@ export default {
>
<table>
<component
+ v-for="(html, index) in diffRows"
:is="rowTag(html)"
:class="html.className"
- v-for="(html, index) in diffRows"
- v-html="html.outerHTML"
:key="index"
+ v-html="html.outerHTML"
/>
<tr class="notes_holder">
<td
diff --git a/app/assets/javascripts/notes/components/discussion_counter.vue b/app/assets/javascripts/notes/components/discussion_counter.vue
index cbe4774a360..68e17ac8055 100644
--- a/app/assets/javascripts/notes/components/discussion_counter.vue
+++ b/app/assets/javascripts/notes/components/discussion_counter.vue
@@ -95,8 +95,8 @@ export default {
class="btn-group"
role="group">
<a
- :href="resolveAllDiscussionsIssuePath"
v-tooltip
+ :href="resolveAllDiscussionsIssuePath"
title="Resolve all discussions in new issue"
data-container="body"
class="new-issue-for-discussion btn btn-default discussion-create-issue-btn">
@@ -108,11 +108,11 @@ export default {
class="btn-group"
role="group">
<button
- @click="jumpToFirstDiscussion"
v-tooltip
title="Jump to first unresolved discussion"
data-container="body"
- class="btn btn-default discussion-next-btn">
+ class="btn btn-default discussion-next-btn"
+ @click="jumpToFirstDiscussion">
<span v-html="nextDiscussionSvg"></span>
</button>
</div>
diff --git a/app/assets/javascripts/notes/components/discussion_locked_widget.vue b/app/assets/javascripts/notes/components/discussion_locked_widget.vue
index 13283b187d1..de0a5f8489b 100644
--- a/app/assets/javascripts/notes/components/discussion_locked_widget.vue
+++ b/app/assets/javascripts/notes/components/discussion_locked_widget.vue
@@ -14,8 +14,8 @@ export default {
<div class="disabled-comment text-center">
<span class="issuable-note-warning inline">
<icon
- name="lock"
:size="16"
+ name="lock"
class="icon"
/>
<span>
diff --git a/app/assets/javascripts/notes/components/note_actions.vue b/app/assets/javascripts/notes/components/note_actions.vue
index 626b0799581..0bf4258a257 100644
--- a/app/assets/javascripts/notes/components/note_actions.vue
+++ b/app/assets/javascripts/notes/components/note_actions.vue
@@ -129,12 +129,12 @@ export default {
class="note-actions-item">
<button
v-tooltip
- @click="onResolve"
:class="{ 'is-disabled': !resolvable, 'is-active': isResolved }"
:title="resolveButtonTitle"
:aria-label="resolveButtonTitle"
type="button"
- class="line-resolve-btn note-action-button">
+ class="line-resolve-btn note-action-button"
+ @click="onResolve">
<template v-if="!isResolving">
<div
v-if="isResolved"
@@ -164,16 +164,16 @@ export default {
>
<loading-icon :inline="true" />
<span
- v-html="emojiSmiling"
- class="link-highlight award-control-icon-neutral">
+ class="link-highlight award-control-icon-neutral"
+ v-html="emojiSmiling">
</span>
<span
- v-html="emojiSmiley"
- class="link-highlight award-control-icon-positive">
+ class="link-highlight award-control-icon-positive"
+ v-html="emojiSmiley">
</span>
<span
- v-html="emojiSmile"
- class="link-highlight award-control-icon-super-positive">
+ class="link-highlight award-control-icon-super-positive"
+ v-html="emojiSmile">
</span>
</a>
</div>
@@ -181,16 +181,16 @@ export default {
v-if="canEdit"
class="note-actions-item">
<button
- @click="onEdit"
v-tooltip
type="button"
title="Edit comment"
class="note-action-button js-note-edit btn btn-transparent"
data-container="body"
- data-placement="bottom">
+ data-placement="bottom"
+ @click="onEdit">
<span
- v-html="editSvg"
- class="link-highlight">
+ class="link-highlight"
+ v-html="editSvg">
</span>
</button>
</div>
@@ -218,9 +218,9 @@ export default {
</li>
<li v-if="canEdit">
<button
- @click.prevent="onDelete"
class="btn btn-transparent js-note-delete js-note-delete"
- type="button">
+ type="button"
+ @click.prevent="onDelete">
<span class="text-danger">
Delete comment
</span>
diff --git a/app/assets/javascripts/notes/components/note_awards_list.vue b/app/assets/javascripts/notes/components/note_awards_list.vue
index e8fd155a1ee..521b4d16286 100644
--- a/app/assets/javascripts/notes/components/note_awards_list.vue
+++ b/app/assets/javascripts/notes/components/note_awards_list.vue
@@ -199,10 +199,10 @@ export default {
:key="index"
:class="getAwardClassBindings(awardList, awardName)"
:title="awardTitle(awardList)"
- @click="handleAward(awardName)"
class="btn award-control"
data-placement="bottom"
- type="button">
+ type="button"
+ @click="handleAward(awardName)">
<span v-html="getAwardHTML(awardName)"></span>
<span class="award-control-text js-counter">
{{ awardList.length }}
@@ -220,16 +220,16 @@ export default {
data-placement="bottom"
type="button">
<span
- v-html="emojiSmiling"
- class="award-control-icon award-control-icon-neutral">
+ class="award-control-icon award-control-icon-neutral"
+ v-html="emojiSmiling">
</span>
<span
- v-html="emojiSmiley"
- class="award-control-icon award-control-icon-positive">
+ class="award-control-icon award-control-icon-positive"
+ v-html="emojiSmiley">
</span>
<span
- v-html="emojiSmile"
- class="award-control-icon award-control-icon-super-positive">
+ class="award-control-icon award-control-icon-super-positive"
+ v-html="emojiSmile">
</span>
<i
aria-hidden="true"
diff --git a/app/assets/javascripts/notes/components/note_body.vue b/app/assets/javascripts/notes/components/note_body.vue
index 0cb626c14f4..864edcd2ec6 100644
--- a/app/assets/javascripts/notes/components/note_body.vue
+++ b/app/assets/javascripts/notes/components/note_body.vue
@@ -80,20 +80,20 @@ export default {
<template>
<div
- :class="{ 'js-task-list-container': canEdit }"
ref="note-body"
+ :class="{ 'js-task-list-container': canEdit }"
class="note-body">
<div
- v-html="note.note_html"
- class="note-text md"></div>
+ class="note-text md"
+ v-html="note.note_html"></div>
<note-form
v-if="isEditing"
ref="noteForm"
- @handleFormUpdate="handleFormUpdate"
- @cancelFormEdition="formCancelHandler"
:is-editing="isEditing"
:note-body="noteBody"
:note-id="note.id"
+ @handleFormUpdate="handleFormUpdate"
+ @cancelFormEdition="formCancelHandler"
/>
<textarea
v-if="canEdit"
diff --git a/app/assets/javascripts/notes/components/note_form.vue b/app/assets/javascripts/notes/components/note_form.vue
index 93b66986958..7254ef3357d 100644
--- a/app/assets/javascripts/notes/components/note_form.vue
+++ b/app/assets/javascripts/notes/components/note_form.vue
@@ -165,14 +165,14 @@ export default {
:add-spacing-classes="false">
<textarea
id="note_note"
+ ref="textarea"
+ slot="textarea"
+ :data-supports-quick-actions="!isEditing"
+ v-model="updatedNoteBody"
name="note[note]"
class="note-textarea js-gfm-input
js-autosize markdown-area js-vue-issue-note-form js-vue-textarea"
- :data-supports-quick-actions="!isEditing"
aria-label="Description"
- v-model="updatedNoteBody"
- ref="textarea"
- slot="textarea"
placeholder="Write a comment or drag your files here…"
@keydown.meta.enter="handleUpdate()"
@keydown.ctrl.enter="handleUpdate()"
@@ -182,23 +182,23 @@ js-autosize markdown-area js-vue-issue-note-form js-vue-textarea"
</markdown-field>
<div class="note-form-actions clearfix">
<button
- type="button"
- @click="handleUpdate()"
:disabled="isDisabled"
- class="js-vue-issue-save btn btn-save">
+ type="button"
+ class="js-vue-issue-save btn btn-save"
+ @click="handleUpdate()">
{{ saveButtonTitle }}
</button>
<button
v-if="note.resolvable"
- @click.prevent="handleUpdate(true)"
class="btn btn-nr btn-default append-right-10 js-comment-resolve-button"
+ @click.prevent="handleUpdate(true)"
>
{{ resolveButtonTitle }}
</button>
<button
- @click="cancelHandler()"
class="btn btn-cancel note-edit-cancel"
- type="button">
+ type="button"
+ @click="cancelHandler()">
Cancel
</button>
</div>
diff --git a/app/assets/javascripts/notes/components/note_header.vue b/app/assets/javascripts/notes/components/note_header.vue
index a4081957207..ffe3ba9c805 100644
--- a/app/assets/javascripts/notes/components/note_header.vue
+++ b/app/assets/javascripts/notes/components/note_header.vue
@@ -66,9 +66,9 @@ export default {
v-if="includeToggle"
class="discussion-actions">
<button
- @click="handleToggle"
class="note-action-button discussion-toggle-button js-vue-toggle-button"
- type="button">
+ type="button"
+ @click="handleToggle">
<i
:class="toggleChevronClass"
class="fa"
@@ -90,16 +90,16 @@ export default {
</template>
<span
v-if="actionTextHtml"
- v-html="actionTextHtml"
- class="system-note-message">
+ class="system-note-message"
+ v-html="actionTextHtml">
</span>
<span class="system-note-separator">
&middot;
</span>
<a
:href="noteTimestampLink"
- @click="updateTargetNoteHash"
- class="note-timestamp system-note-separator">
+ class="note-timestamp system-note-separator"
+ @click="updateTargetNoteHash">
<time-ago-tooltip
:time="createdAt"
tooltip-placement="bottom"
diff --git a/app/assets/javascripts/notes/components/noteable_discussion.vue b/app/assets/javascripts/notes/components/noteable_discussion.vue
index 7f5aacaa3a2..f9f5041a9f9 100644
--- a/app/assets/javascripts/notes/components/noteable_discussion.vue
+++ b/app/assets/javascripts/notes/components/noteable_discussion.vue
@@ -229,9 +229,9 @@ Please check your network connection and try again.`;
:note-id="discussion.id"
:include-toggle="true"
:expanded="note.expanded"
- @toggleHandler="toggleDiscussionHandler"
action-text="started a discussion"
class="discussion"
+ @toggleHandler="toggleDiscussionHandler"
/>
<note-edited-text
v-if="lastUpdatedAt"
@@ -269,19 +269,19 @@ Please check your network connection and try again.`;
class="btn-group"
role="group">
<button
- @click="showReplyForm"
type="button"
class="js-vue-discussion-reply btn btn-text-field"
- title="Add a reply">Reply...</button>
+ title="Add a reply"
+ @click="showReplyForm">Reply...</button>
</div>
<div
v-if="note.resolvable"
class="btn-group"
role="group">
<button
- @click="resolveHandler()"
type="button"
class="btn btn-default"
+ @click="resolveHandler()"
>
<i
v-if="isResolving"
@@ -301,8 +301,8 @@ Please check your network connection and try again.`;
class="btn-group"
role="group">
<a
- :href="note.resolve_with_issue_path"
v-tooltip
+ :href="note.resolve_with_issue_path"
class="new-issue-for-discussion btn
btn-default discussion-create-issue-btn"
title="Resolve this discussion in a new issue"
@@ -316,11 +316,11 @@ Please check your network connection and try again.`;
class="btn-group"
role="group">
<button
- @click="jumpToDiscussion"
v-tooltip
class="btn btn-default discussion-next-btn"
title="Jump to next unresolved discussion"
data-container="body"
+ @click="jumpToDiscussion"
>
<span v-html="nextDiscussionsSvg"></span>
</button>
@@ -330,12 +330,12 @@ Please check your network connection and try again.`;
</template>
<note-form
v-if="isReplying"
- save-button-title="Comment"
+ ref="noteForm"
:note="note"
:is-editing="false"
+ save-button-title="Comment"
@handleFormUpdate="saveReply"
- @cancelFormEdition="cancelReplyForm"
- ref="noteForm" />
+ @cancelFormEdition="cancelReplyForm" />
<note-signed-out-widget v-if="!canReply" />
</div>
</div>
diff --git a/app/assets/javascripts/notes/components/noteable_note.vue b/app/assets/javascripts/notes/components/noteable_note.vue
index 566f5c68e66..ec3ee407f0a 100644
--- a/app/assets/javascripts/notes/components/noteable_note.vue
+++ b/app/assets/javascripts/notes/components/noteable_note.vue
@@ -151,10 +151,10 @@ export default {
<template>
<li
- class="note timeline-entry"
:id="noteAnchorId"
:class="classNameBindings"
- :data-award-url="note.toggle_award_path">
+ :data-award-url="note.toggle_award_path"
+ class="note timeline-entry">
<div class="timeline-entry-inner">
<div class="timeline-icon">
<user-avatar-link
@@ -191,12 +191,12 @@ export default {
/>
</div>
<note-body
+ ref="noteBody"
:note="note"
:can-edit="note.current_user.can_edit"
:is-editing="isEditing"
@handleFormUpdate="formUpdateHandler"
@cancelFormEdition="formCancelHandler"
- ref="noteBody"
/>
</div>
</div>
diff --git a/app/assets/javascripts/pages/admin/jobs/index/components/stop_jobs_modal.vue b/app/assets/javascripts/pages/admin/jobs/index/components/stop_jobs_modal.vue
index ba1d8e4d8db..bc84666779e 100644
--- a/app/assets/javascripts/pages/admin/jobs/index/components/stop_jobs_modal.vue
+++ b/app/assets/javascripts/pages/admin/jobs/index/components/stop_jobs_modal.vue
@@ -40,8 +40,8 @@
<gl-modal
id="stop-jobs-modal"
:header-title-text="s__('AdminArea|Stop all jobs?')"
- footer-primary-button-variant="danger"
:footer-primary-button-text="s__('AdminArea|Stop jobs')"
+ footer-primary-button-variant="danger"
@submit="onSubmit"
>
{{ text }}
diff --git a/app/assets/javascripts/pages/admin/projects/index/components/delete_project_modal.vue b/app/assets/javascripts/pages/admin/projects/index/components/delete_project_modal.vue
index 343c65edb37..ff66d3a8ac4 100644
--- a/app/assets/javascripts/pages/admin/projects/index/components/delete_project_modal.vue
+++ b/app/assets/javascripts/pages/admin/projects/index/components/delete_project_modal.vue
@@ -83,9 +83,9 @@
id="delete-project-modal"
:title="title"
:text="text"
- kind="danger"
:primary-button-label="primaryButtonLabel"
:submit-disabled="!canSubmit"
+ kind="danger"
@submit="onSubmit"
@cancel="onCancel"
>
@@ -107,15 +107,15 @@
value="delete"
/>
<input
+ :value="csrfToken"
type="hidden"
name="authenticity_token"
- :value="csrfToken"
/>
<input
+ v-model="enteredProjectName"
name="projectName"
class="form-control"
type="text"
- v-model="enteredProjectName"
aria-labelledby="input-label"
autocomplete="off"
/>
diff --git a/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue b/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue
index 9ce176744ba..cc2805a1901 100644
--- a/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue
+++ b/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue
@@ -116,10 +116,10 @@
id="delete-user-modal"
:title="title"
:text="text"
- kind="danger"
:primary-button-label="primaryButtonLabel"
:secondary-button-label="secondaryButtonLabel"
:submit-disabled="!canSubmit"
+ kind="danger"
@submit="onSubmit"
@cancel="onCancel"
>
@@ -141,15 +141,15 @@
value="delete"
/>
<input
+ :value="csrfToken"
type="hidden"
name="authenticity_token"
- :value="csrfToken"
/>
<input
+ v-model="enteredUsername"
type="text"
name="username"
class="form-control"
- v-model="enteredUsername"
aria-labelledby="input-label"
autocomplete="off"
/>
@@ -160,11 +160,11 @@
slot-scope="props"
>
<button
+ :disabled="!canSubmit"
type="button"
class="btn js-secondary-button btn-warning"
- :disabled="!canSubmit"
- @click="onSecondaryAction"
data-dismiss="modal"
+ @click="onSecondaryAction"
>
{{ secondaryButtonLabel }}
</button>
diff --git a/app/assets/javascripts/pages/milestones/shared/components/delete_milestone_modal.vue b/app/assets/javascripts/pages/milestones/shared/components/delete_milestone_modal.vue
index 16f792d635a..4061c11ba8f 100644
--- a/app/assets/javascripts/pages/milestones/shared/components/delete_milestone_modal.vue
+++ b/app/assets/javascripts/pages/milestones/shared/components/delete_milestone_modal.vue
@@ -96,8 +96,8 @@ Once deleted, it cannot be undone or recovered.`),
id="delete-milestone-modal"
:title="title"
:text="text"
- kind="danger"
:primary-button-label="s__('Milestones|Delete milestone')"
+ kind="danger"
@submit="onSubmit">
<template
diff --git a/app/assets/javascripts/pages/milestones/shared/components/promote_milestone_modal.vue b/app/assets/javascripts/pages/milestones/shared/components/promote_milestone_modal.vue
index 2bda2aeb3a1..2c683a39f42 100644
--- a/app/assets/javascripts/pages/milestones/shared/components/promote_milestone_modal.vue
+++ b/app/assets/javascripts/pages/milestones/shared/components/promote_milestone_modal.vue
@@ -53,8 +53,8 @@
<template>
<gl-modal
id="promote-milestone-modal"
- footer-primary-button-variant="warning"
:footer-primary-button-text="s__('Milestones|Promote Milestone')"
+ footer-primary-button-variant="warning"
@submit="onSubmit"
>
<template
diff --git a/app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue b/app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue
index ad6df51bb7a..5d2247f6c6d 100644
--- a/app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue
+++ b/app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue
@@ -71,8 +71,8 @@
<template>
<gl-modal
id="promote-label-modal"
- footer-primary-button-variant="warning"
:footer-primary-button-text="s__('Labels|Promote Label')"
+ footer-primary-button-variant="warning"
@submit="onSubmit"
>
<div
diff --git a/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/interval_pattern_input.vue b/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/interval_pattern_input.vue
index 2d18fa2044b..d0613804067 100644
--- a/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/interval_pattern_input.vue
+++ b/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/interval_pattern_input.vue
@@ -65,11 +65,11 @@
<div class="cron-preset-radio-input">
<input
id="custom"
- class="label-light"
- type="radio"
:name="inputNameAttribute"
:value="cronInterval"
:checked="isEditable"
+ class="label-light"
+ type="radio"
@click="toggleCustomInput(true)"
/>
@@ -90,11 +90,11 @@
<div class="cron-preset-radio-input">
<input
id="every-day"
- class="label-light"
- type="radio"
v-model="cronInterval"
:name="inputNameAttribute"
:value="cronIntervalPresets.everyDay"
+ class="label-light"
+ type="radio"
@click="toggleCustomInput(false)"
/>
@@ -109,11 +109,11 @@
<div class="cron-preset-radio-input">
<input
id="every-week"
- class="label-light"
- type="radio"
v-model="cronInterval"
:name="inputNameAttribute"
:value="cronIntervalPresets.everyWeek"
+ class="label-light"
+ type="radio"
@click="toggleCustomInput(false)"
/>
@@ -128,11 +128,11 @@
<div class="cron-preset-radio-input">
<input
id="every-month"
- class="label-light"
- type="radio"
v-model="cronInterval"
:name="inputNameAttribute"
:value="cronIntervalPresets.everyMonth"
+ class="label-light"
+ type="radio"
@click="toggleCustomInput(false)"
/>
@@ -147,13 +147,13 @@
<div class="cron-interval-input-wrapper">
<input
id="schedule_cron"
- class="form-control inline cron-interval-input"
- type="text"
:placeholder="__('Define a custom pattern with cron syntax')"
- required="true"
v-model="cronInterval"
:name="inputNameAttribute"
:disabled="!isEditable"
+ class="form-control inline cron-interval-input"
+ type="text"
+ required="true"
/>
</div>
</div>
diff --git a/app/assets/javascripts/pages/projects/shared/permissions/components/project_feature_setting.vue b/app/assets/javascripts/pages/projects/shared/permissions/components/project_feature_setting.vue
index 9b13b2a524f..06101290f6c 100644
--- a/app/assets/javascripts/pages/projects/shared/permissions/components/project_feature_setting.vue
+++ b/app/assets/javascripts/pages/projects/shared/permissions/components/project_feature_setting.vue
@@ -72,25 +72,25 @@
<template>
<div
- class="project-feature-controls"
:data-for="name"
+ class="project-feature-controls"
>
<input
v-if="name"
- type="hidden"
:name="name"
:value="value"
+ type="hidden"
/>
<project-feature-toggle
:value="featureEnabled"
- @change="toggleFeature"
:disabled-input="disabledInput"
+ @change="toggleFeature"
/>
<div class="select-wrapper">
<select
+ :disabled="displaySelectInput"
class="form-control project-repo-select select-control"
@change="selectOption"
- :disabled="displaySelectInput"
>
<option
v-for="[optionValue, optionName] in displayOptions"
diff --git a/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue b/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue
index 06b0ab184ed..ae88b765abf 100644
--- a/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue
+++ b/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue
@@ -175,16 +175,16 @@
<div>
<div class="project-visibility-setting">
<project-setting-row
- label="Project visibility"
:help-path="visibilityHelpPath"
+ label="Project visibility"
>
<div class="project-feature-controls">
<div class="select-wrapper">
<select
- name="project[visibility_level]"
v-model="visibilityLevel"
- class="form-control select-control"
:disabled="!canChangeVisibilityLevel"
+ name="project[visibility_level]"
+ class="form-control select-control"
>
<option
:value="visibilityOptions.PRIVATE"
@@ -219,30 +219,30 @@
class="request-access"
>
<input
+ :value="requestAccessEnabled"
type="hidden"
name="project[request_access_enabled]"
- :value="requestAccessEnabled"
/>
<input
- type="checkbox"
v-model="requestAccessEnabled"
+ type="checkbox"
/>
Allow users to request access
</label>
</project-setting-row>
</div>
<div
- class="project-feature-settings"
:class="{ 'highlight-changes': highlightChangesClass }"
+ class="project-feature-settings"
>
<project-setting-row
label="Issues"
help-text="Lightweight issue tracking system for this project"
>
<project-feature-setting
- name="project[project_feature_attributes][issues_access_level]"
:options="featureAccessLevelOptions"
v-model="issuesAccessLevel"
+ name="project[project_feature_attributes][issues_access_level]"
/>
</project-setting-row>
<project-setting-row
@@ -250,9 +250,9 @@
help-text="View and edit files in this project"
>
<project-feature-setting
- name="project[project_feature_attributes][repository_access_level]"
:options="featureAccessLevelOptions"
v-model="repositoryAccessLevel"
+ name="project[project_feature_attributes][repository_access_level]"
/>
</project-setting-row>
<div class="project-feature-setting-group">
@@ -261,10 +261,10 @@
help-text="Submit changes to be merged upstream"
>
<project-feature-setting
- name="project[project_feature_attributes][merge_requests_access_level]"
:options="repoFeatureAccessLevelOptions"
v-model="mergeRequestsAccessLevel"
:disabled-input="!repositoryEnabled"
+ name="project[project_feature_attributes][merge_requests_access_level]"
/>
</project-setting-row>
<project-setting-row
@@ -272,34 +272,34 @@
help-text="Build, test, and deploy your changes"
>
<project-feature-setting
- name="project[project_feature_attributes][builds_access_level]"
:options="repoFeatureAccessLevelOptions"
v-model="buildsAccessLevel"
:disabled-input="!repositoryEnabled"
+ name="project[project_feature_attributes][builds_access_level]"
/>
</project-setting-row>
<project-setting-row
v-if="registryAvailable"
- label="Container registry"
:help-path="registryHelpPath"
+ label="Container registry"
help-text="Every project can have its own space to store its Docker images"
>
<project-feature-toggle
- name="project[container_registry_enabled]"
v-model="containerRegistryEnabled"
:disabled-input="!repositoryEnabled"
+ name="project[container_registry_enabled]"
/>
</project-setting-row>
<project-setting-row
v-if="lfsAvailable"
- label="Git Large File Storage"
:help-path="lfsHelpPath"
+ label="Git Large File Storage"
help-text="Manages large files such as audio, video, and graphics files"
>
<project-feature-toggle
- name="project[lfs_enabled]"
v-model="lfsEnabled"
:disabled-input="!repositoryEnabled"
+ name="project[lfs_enabled]"
/>
</project-setting-row>
</div>
@@ -308,9 +308,9 @@
help-text="Pages for project documentation"
>
<project-feature-setting
- name="project[project_feature_attributes][wiki_access_level]"
:options="featureAccessLevelOptions"
v-model="wikiAccessLevel"
+ name="project[project_feature_attributes][wiki_access_level]"
/>
</project-setting-row>
<project-setting-row
@@ -318,9 +318,9 @@
help-text="Share code pastes with others out of Git repository"
>
<project-feature-setting
- name="project[project_feature_attributes][snippets_access_level]"
:options="featureAccessLevelOptions"
v-model="snippetsAccessLevel"
+ name="project[project_feature_attributes][snippets_access_level]"
/>
</project-setting-row>
</div>
diff --git a/app/assets/javascripts/pages/projects/wikis/components/delete_wiki_modal.vue b/app/assets/javascripts/pages/projects/wikis/components/delete_wiki_modal.vue
index 5765eed4d45..0289209ff1e 100644
--- a/app/assets/javascripts/pages/projects/wikis/components/delete_wiki_modal.vue
+++ b/app/assets/javascripts/pages/projects/wikis/components/delete_wiki_modal.vue
@@ -50,8 +50,8 @@ export default {
<gl-modal
id="delete-wiki-modal"
:header-title-text="title"
- footer-primary-button-variant="danger"
:footer-primary-button-text="s__('WikiPageConfirmDelete|Delete page')"
+ footer-primary-button-variant="danger"
@submit="onSubmit"
>
{{ message }}
@@ -68,9 +68,9 @@ export default {
value="delete"
/>
<input
+ :value="csrfToken"
type="hidden"
name="authenticity_token"
- :value="csrfToken"
/>
</form>
</gl-modal>
diff --git a/app/assets/javascripts/pages/sessions/new/username_validator.js b/app/assets/javascripts/pages/sessions/new/username_validator.js
index 825de01b5a2..87213c94eda 100644
--- a/app/assets/javascripts/pages/sessions/new/username_validator.js
+++ b/app/assets/javascripts/pages/sessions/new/username_validator.js
@@ -62,13 +62,13 @@ export default class UsernameValidator {
return this.setPendingState();
}
- if (!this.state.available) {
- return this.setUnavailableState();
- }
-
if (!this.state.valid) {
return this.setInvalidState();
}
+
+ if (!this.state.available) {
+ return this.setUnavailableState();
+ }
}
interceptInvalid(event) {
@@ -89,7 +89,6 @@ export default class UsernameValidator {
setAvailabilityState(usernameTaken) {
if (usernameTaken) {
- this.state.valid = false;
this.state.available = false;
} else {
this.state.available = true;
diff --git a/app/assets/javascripts/pdf/index.vue b/app/assets/javascripts/pdf/index.vue
index 00f32d9de78..2f480ecdc69 100644
--- a/app/assets/javascripts/pdf/index.vue
+++ b/app/assets/javascripts/pdf/index.vue
@@ -56,8 +56,8 @@
<template>
<div
- class="pdf-viewer"
- v-if="hasPDF">
+ v-if="hasPDF"
+ class="pdf-viewer">
<page
v-for="(page, index) in pages"
:key="index"
diff --git a/app/assets/javascripts/pdf/page/index.vue b/app/assets/javascripts/pdf/page/index.vue
index fcba819beba..9f06833d560 100644
--- a/app/assets/javascripts/pdf/page/index.vue
+++ b/app/assets/javascripts/pdf/page/index.vue
@@ -43,9 +43,9 @@
<template>
<canvas
- class="pdf-page"
ref="canvas"
:data-page="number"
+ class="pdf-page"
>
</canvas>
</template>
diff --git a/app/assets/javascripts/performance_bar/components/detailed_metric.vue b/app/assets/javascripts/performance_bar/components/detailed_metric.vue
index 96189e7033a..d765ff3b41c 100644
--- a/app/assets/javascripts/performance_bar/components/detailed_metric.vue
+++ b/app/assets/javascripts/performance_bar/components/detailed_metric.vue
@@ -39,9 +39,9 @@ export default {
</script>
<template>
<div
+ v-if="currentRequest.details"
:id="`peek-view-${metric}`"
class="view"
- v-if="currentRequest.details"
>
<button
:data-target="`#modal-peek-${metric}-details`"
diff --git a/app/assets/javascripts/pipelines/components/graph/action_component.vue b/app/assets/javascripts/pipelines/components/graph/action_component.vue
index 82b4ce083fb..db0505a55fe 100644
--- a/app/assets/javascripts/pipelines/components/graph/action_component.vue
+++ b/app/assets/javascripts/pipelines/components/graph/action_component.vue
@@ -83,15 +83,15 @@ export default {
</script>
<template>
<button
- type="button"
- @click="onClickAction"
v-tooltip
:title="tooltipText"
+ :class="cssClass"
+ :disabled="isDisabled"
+ type="button"
class="js-ci-action btn btn-blank
btn-transparent ci-action-icon-container ci-action-icon-wrapper"
- :class="cssClass"
data-container="body"
- :disabled="isDisabled"
+ @click="onClickAction"
>
<icon :name="actionIcon"/>
</button>
diff --git a/app/assets/javascripts/pipelines/components/graph/dropdown_job_component.vue b/app/assets/javascripts/pipelines/components/graph/dropdown_job_component.vue
index e64afc94ef9..04120d45834 100644
--- a/app/assets/javascripts/pipelines/components/graph/dropdown_job_component.vue
+++ b/app/assets/javascripts/pipelines/components/graph/dropdown_job_component.vue
@@ -82,12 +82,12 @@ export default {
<div class="ci-job-dropdown-container dropdown dropright">
<button
v-tooltip
+ :title="tooltipText"
type="button"
data-toggle="dropdown"
data-container="body"
data-boundary="viewport"
class="dropdown-menu-toggle build-content"
- :title="tooltipText"
>
<job-name-component
diff --git a/app/assets/javascripts/pipelines/components/graph/job_component.vue b/app/assets/javascripts/pipelines/components/graph/job_component.vue
index dc16d395bcb..886e62ab1a7 100644
--- a/app/assets/javascripts/pipelines/components/graph/job_component.vue
+++ b/app/assets/javascripts/pipelines/components/graph/job_component.vue
@@ -107,11 +107,11 @@ export default {
</a>
<div
- v-else
v-tooltip
- class="js-job-component-tooltip non-details-job-component"
+ v-else
:title="tooltipText"
:class="cssClassJobName"
+ class="js-job-component-tooltip non-details-job-component"
data-html="true"
data-container="body"
>
diff --git a/app/assets/javascripts/pipelines/components/graph/stage_column_component.vue b/app/assets/javascripts/pipelines/components/graph/stage_column_component.vue
index f32368947e8..2c728582b7c 100644
--- a/app/assets/javascripts/pipelines/components/graph/stage_column_component.vue
+++ b/app/assets/javascripts/pipelines/components/graph/stage_column_component.vue
@@ -52,8 +52,8 @@ export default {
</script>
<template>
<li
- class="stage-column"
- :class="stageConnectorClass">
+ :class="stageConnectorClass"
+ class="stage-column">
<div class="stage-name">
{{ title }}
</div>
@@ -62,9 +62,9 @@ export default {
<li
v-for="(job, index) in jobs"
:key="job.id"
- class="build"
:class="buildConnnectorClass(index)"
:id="jobId(job)"
+ class="build"
>
<div class="curve"></div>
diff --git a/app/assets/javascripts/pipelines/components/header_component.vue b/app/assets/javascripts/pipelines/components/header_component.vue
index e08c2092680..5b212ee8931 100644
--- a/app/assets/javascripts/pipelines/components/header_component.vue
+++ b/app/assets/javascripts/pipelines/components/header_component.vue
@@ -82,11 +82,11 @@
<ci-header
v-if="shouldRenderContent"
:status="status"
- item-name="Pipeline"
:item-id="pipeline.id"
:time="pipeline.created_at"
:user="pipeline.user"
:actions="actions"
+ item-name="Pipeline"
@actionClicked="postAction"
/>
<loading-icon
diff --git a/app/assets/javascripts/pipelines/components/nav_controls.vue b/app/assets/javascripts/pipelines/components/nav_controls.vue
index eba5678e3e5..1fce9f16ee0 100644
--- a/app/assets/javascripts/pipelines/components/nav_controls.vue
+++ b/app/assets/javascripts/pipelines/components/nav_controls.vue
@@ -50,10 +50,10 @@
<loading-button
v-if="resetCachePath"
- @click="onClickResetCache"
:loading="isResetCacheButtonLoading"
- class="btn btn-default js-clear-cache"
:label="s__('Pipelines|Clear Runner Caches')"
+ class="btn btn-default js-clear-cache"
+ @click="onClickResetCache"
/>
<a
diff --git a/app/assets/javascripts/pipelines/components/pipeline_url.vue b/app/assets/javascripts/pipelines/components/pipeline_url.vue
index 4d965733f95..a107e579457 100644
--- a/app/assets/javascripts/pipelines/components/pipeline_url.vue
+++ b/app/assets/javascripts/pipelines/components/pipeline_url.vue
@@ -55,10 +55,10 @@
<span>by</span>
<user-avatar-link
v-if="user"
- class="js-pipeline-url-user"
:link-href="pipeline.user.path"
:img-src="pipeline.user.avatar_url"
:tooltip-text="pipeline.user.name"
+ class="js-pipeline-url-user"
/>
<span
v-if="!user"
@@ -67,31 +67,31 @@
</span>
<div class="label-container">
<span
- v-if="pipeline.flags.latest"
v-tooltip
+ v-if="pipeline.flags.latest"
class="js-pipeline-url-latest badge badge-success"
title="Latest pipeline for this branch">
latest
</span>
<span
- v-if="pipeline.flags.yaml_errors"
v-tooltip
- class="js-pipeline-url-yaml badge badge-danger"
- :title="pipeline.yaml_errors">
+ v-if="pipeline.flags.yaml_errors"
+ :title="pipeline.yaml_errors"
+ class="js-pipeline-url-yaml badge badge-danger">
yaml invalid
</span>
<span
- v-if="pipeline.flags.failure_reason"
v-tooltip
- class="js-pipeline-url-failure badge badge-danger"
- :title="pipeline.failure_reason">
+ v-if="pipeline.flags.failure_reason"
+ :title="pipeline.failure_reason"
+ class="js-pipeline-url-failure badge badge-danger">
error
</span>
<a
+ v-popover="popoverOptions"
v-if="pipeline.flags.auto_devops"
tabindex="0"
class="js-pipeline-url-autodevops badge badge-info autodevops-badge"
- v-popover="popoverOptions"
role="button">
Auto DevOps
</a>
diff --git a/app/assets/javascripts/pipelines/components/pipelines.vue b/app/assets/javascripts/pipelines/components/pipelines.vue
index 497a09cec65..b31b4bad7a0 100644
--- a/app/assets/javascripts/pipelines/components/pipelines.vue
+++ b/app/assets/javascripts/pipelines/components/pipelines.vue
@@ -282,8 +282,8 @@
<template>
<div class="pipelines-container">
<div
- class="top-area scrolling-tabs-container inner-page-scroll-tabs"
v-if="shouldRenderTabs || shouldRenderButtons"
+ class="top-area scrolling-tabs-container inner-page-scroll-tabs"
>
<div class="fade-left">
<i
@@ -303,8 +303,8 @@
<navigation-tabs
v-if="shouldRenderTabs"
:tabs="tabs"
- @onChangeTab="onChangeTab"
scope="pipelines"
+ @onChangeTab="onChangeTab"
/>
<navigation-controls
@@ -312,8 +312,8 @@
:new-pipeline-path="newPipelinePath"
:reset-cache-path="resetCachePath"
:ci-lint-path="ciLintPath"
- @resetRunnersCache="handleResetRunnersCache"
:is-reset-cache-button-loading="isResetCacheButtonLoading"
+ @resetRunnersCache="handleResetRunnersCache"
/>
</div>
@@ -347,8 +347,8 @@
/>
<div
- class="table-holder"
v-else-if="stateToRender === $options.stateMap.tableList"
+ class="table-holder"
>
<pipelines-table-component
diff --git a/app/assets/javascripts/pipelines/components/pipelines_actions.vue b/app/assets/javascripts/pipelines/components/pipelines_actions.vue
index e9bc3cf14ca..5070c253f11 100644
--- a/app/assets/javascripts/pipelines/components/pipelines_actions.vue
+++ b/app/assets/javascripts/pipelines/components/pipelines_actions.vue
@@ -44,13 +44,13 @@
<div class="btn-group">
<button
v-tooltip
+ :disabled="isLoading"
type="button"
class="dropdown-new btn btn-default js-pipeline-dropdown-manual-actions"
title="Manual job"
data-toggle="dropdown"
data-placement="top"
aria-label="Manual job"
- :disabled="isLoading"
>
<icon
name="play"
@@ -69,11 +69,11 @@
:key="i"
>
<button
+ :class="{ disabled: isActionDisabled(action) }"
+ :disabled="isActionDisabled(action)"
type="button"
class="js-pipeline-action-link no-btn btn"
@click="onClickAction(action.path)"
- :class="{ disabled: isActionDisabled(action) }"
- :disabled="isActionDisabled(action)"
>
{{ action.name }}
</button>
diff --git a/app/assets/javascripts/pipelines/components/pipelines_artifacts.vue b/app/assets/javascripts/pipelines/components/pipelines_artifacts.vue
index 31fcc9dd412..490df47e154 100644
--- a/app/assets/javascripts/pipelines/components/pipelines_artifacts.vue
+++ b/app/assets/javascripts/pipelines/components/pipelines_artifacts.vue
@@ -42,9 +42,9 @@
v-for="(artifact, i) in artifacts"
:key="i">
<a
+ :href="artifact.path"
rel="nofollow"
download
- :href="artifact.path"
>
Download {{ artifact.name }} artifacts
</a>
diff --git a/app/assets/javascripts/pipelines/components/pipelines_table.vue b/app/assets/javascripts/pipelines/components/pipelines_table.vue
index 4318abe97e0..2e777783636 100644
--- a/app/assets/javascripts/pipelines/components/pipelines_table.vue
+++ b/app/assets/javascripts/pipelines/components/pipelines_table.vue
@@ -114,8 +114,8 @@
<modal
id="confirmation-modal"
:header-title-text="modalTitle"
- footer-primary-button-variant="danger"
:footer-primary-button-text="s__('Pipeline|Stop pipeline')"
+ footer-primary-button-variant="danger"
@submit="onSubmit"
>
<span v-html="modalText"></span>
diff --git a/app/assets/javascripts/pipelines/components/pipelines_table_row.vue b/app/assets/javascripts/pipelines/components/pipelines_table_row.vue
index a3c17479e6f..b2744a30c2a 100644
--- a/app/assets/javascripts/pipelines/components/pipelines_table_row.vue
+++ b/app/assets/javascripts/pipelines/components/pipelines_table_row.vue
@@ -301,9 +301,9 @@
<div class="table-mobile-content">
<template v-if="pipeline.details.stages.length > 0">
<div
- class="stage-container dropdown js-mini-pipeline-graph"
v-for="(stage, index) in pipeline.details.stages"
- :key="index">
+ :key="index"
+ class="stage-container dropdown js-mini-pipeline-graph">
<pipeline-stage
:type="$options.pipelinesTable"
:stage="stage"
@@ -331,28 +331,28 @@
<pipelines-artifacts-component
v-if="pipeline.details.artifacts.length"
- class="d-none d-sm-none d-md-block"
:artifacts="pipeline.details.artifacts"
+ class="d-none d-sm-none d-md-block"
/>
<loading-button
v-if="pipeline.flags.retryable"
- @click="handleRetryClick"
- container-class="js-pipelines-retry-button btn btn-default btn-retry"
:loading="isRetrying"
:disabled="isRetrying"
+ container-class="js-pipelines-retry-button btn btn-default btn-retry"
+ @click="handleRetryClick"
>
<icon name="repeat" />
</loading-button>
<loading-button
v-if="pipeline.flags.cancelable"
- @click="handleCancelClick"
+ :loading="isCancelling"
+ :disabled="isCancelling"
data-toggle="modal"
data-target="#confirmation-modal"
container-class="js-pipelines-cancel-button btn btn-remove"
- :loading="isCancelling"
- :disabled="isCancelling"
+ @click="handleCancelClick"
>
<icon name="close" />
</loading-button>
diff --git a/app/assets/javascripts/pipelines/components/stage.vue b/app/assets/javascripts/pipelines/components/stage.vue
index f9769815796..4dd2fb9fbed 100644
--- a/app/assets/javascripts/pipelines/components/stage.vue
+++ b/app/assets/javascripts/pipelines/components/stage.vue
@@ -158,22 +158,22 @@ export default {
<div class="dropdown">
<button
v-tooltip
+ id="stageDropdown"
+ ref="dropdown"
:class="triggerButtonClass"
- @click="onClickStage"
- class="mini-pipeline-graph-dropdown-toggle js-builds-dropdown-button"
:title="stage.title"
+ class="mini-pipeline-graph-dropdown-toggle js-builds-dropdown-button"
data-placement="top"
data-toggle="dropdown"
type="button"
- id="stageDropdown"
aria-haspopup="true"
aria-expanded="false"
- ref="dropdown"
+ @click="onClickStage"
>
<span
- aria-hidden="true"
:aria-label="stage.title"
+ aria-hidden="true"
>
<icon :name="borderlessIcon" />
</span>
diff --git a/app/assets/javascripts/pipelines/components/time_ago.vue b/app/assets/javascripts/pipelines/components/time_ago.vue
index 79dbdca4010..0a97df2dc18 100644
--- a/app/assets/javascripts/pipelines/components/time_ago.vue
+++ b/app/assets/javascripts/pipelines/components/time_ago.vue
@@ -66,8 +66,8 @@
</div>
<div class="table-mobile-content">
<p
- class="duration"
v-if="hasDuration"
+ class="duration"
>
<span v-html="iconTimerSvg">
</span>
@@ -75,8 +75,8 @@
</p>
<p
- class="finished-at d-none d-sm-none d-md-block"
v-if="hasFinishedTime"
+ class="finished-at d-none d-sm-none d-md-block"
>
<i
@@ -87,9 +87,9 @@
<time
v-tooltip
+ :title="tooltipTitle(finishedTime)"
data-placement="top"
- data-container="body"
- :title="tooltipTitle(finishedTime)">
+ data-container="body">
{{ timeFormated(finishedTime) }}
</time>
</p>
diff --git a/app/assets/javascripts/profile/account/components/delete_account_modal.vue b/app/assets/javascripts/profile/account/components/delete_account_modal.vue
index f50002afbf2..974629fa2af 100644
--- a/app/assets/javascripts/profile/account/components/delete_account_modal.vue
+++ b/app/assets/javascripts/profile/account/components/delete_account_modal.vue
@@ -80,10 +80,10 @@ Once you confirm %{deleteAccount}, it cannot be undone or recovered.`),
id="delete-account-modal"
:title="s__('Profiles|Delete your account?')"
:text="text"
- kind="danger"
:primary-button-label="s__('Profiles|Delete account')"
- @submit="onSubmit"
- :submit-disabled="!canSubmit()">
+ :submit-disabled="!canSubmit()"
+ kind="danger"
+ @submit="onSubmit">
<template
slot="body"
@@ -101,9 +101,9 @@ Once you confirm %{deleteAccount}, it cannot be undone or recovered.`),
value="delete"
/>
<input
+ :value="csrfToken"
type="hidden"
name="authenticity_token"
- :value="csrfToken"
/>
<p
@@ -114,18 +114,18 @@ Once you confirm %{deleteAccount}, it cannot be undone or recovered.`),
<input
v-if="confirmWithPassword"
+ v-model="enteredPassword"
name="password"
class="form-control"
type="password"
- v-model="enteredPassword"
aria-labelledby="input-label"
/>
<input
v-else
+ v-model="enteredUsername"
name="username"
class="form-control"
type="text"
- v-model="enteredUsername"
aria-labelledby="input-label"
/>
</form>
diff --git a/app/assets/javascripts/profile/account/components/update_username.vue b/app/assets/javascripts/profile/account/components/update_username.vue
index b37febe523c..ef484ddfd61 100644
--- a/app/assets/javascripts/profile/account/components/update_username.vue
+++ b/app/assets/javascripts/profile/account/components/update_username.vue
@@ -93,10 +93,10 @@ Please update your Git repository remotes as soon as possible.`),
</div>
<input
:id="$options.inputId"
- class="form-control"
- required="required"
v-model="newUsername"
:disabled="isRequestPending"
+ class="form-control"
+ required="required"
/>
</div>
<p class="form-text text-muted">
@@ -105,18 +105,18 @@ Please update your Git repository remotes as soon as possible.`),
</div>
<button
:data-target="`#${$options.modalId}`"
+ :disabled="isRequestPending || newUsername === username"
class="btn btn-warning"
type="button"
data-toggle="modal"
- :disabled="isRequestPending || newUsername === username"
>
{{ $options.buttonText }}
</button>
<gl-modal
:id="$options.modalId"
:header-title-text="s__('Profiles|Change username') + '?'"
- footer-primary-button-variant="warning"
:footer-primary-button-text="$options.buttonText"
+ footer-primary-button-variant="warning"
@submit="onConfirm"
>
<span v-html="modalText"></span>
diff --git a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue
index 6ed35c0a981..d4497924ad8 100644
--- a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue
+++ b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue
@@ -131,12 +131,12 @@ export default {
</div>
</div>
<span
- class="form-text"
+ v-if="hasErrors"
:class="{
'text-danger': hasErrors,
'text-muted': !hasErrors
}"
- v-if="hasErrors"
+ class="form-text"
>
{{ errorMessage }}
</span>
diff --git a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue
index 542d4d21a22..08d0a122579 100644
--- a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue
+++ b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue
@@ -192,11 +192,11 @@ export default {
</div>
</div>
<span
- class="form-text"
:class="{
'text-danger': hasErrors,
'text-muted': !hasErrors
}"
+ class="form-text"
v-html="helpText"
></span>
</div>
diff --git a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_zone_dropdown.vue b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_zone_dropdown.vue
index bc28f8b5df4..b5476684c6a 100644
--- a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_zone_dropdown.vue
+++ b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_zone_dropdown.vue
@@ -105,12 +105,12 @@ export default {
</div>
</div>
<span
- class="form-text"
+ v-if="hasErrors"
:class="{
'text-danger': hasErrors,
'text-muted': !hasErrors
}"
- v-if="hasErrors"
+ class="form-text"
>
{{ errorMessage }}
</span>
diff --git a/app/assets/javascripts/projects/tree/components/commit_pipeline_status_component.vue b/app/assets/javascripts/projects/tree/components/commit_pipeline_status_component.vue
index 63f20a0041d..c772fca14bb 100644
--- a/app/assets/javascripts/projects/tree/components/commit_pipeline_status_component.vue
+++ b/app/assets/javascripts/projects/tree/components/commit_pipeline_status_component.vue
@@ -100,9 +100,9 @@
<template>
<div>
<loading-icon
+ v-if="isLoading"
label="Loading pipeline status"
size="3"
- v-if="isLoading"
/>
<a
v-else
@@ -112,8 +112,8 @@
v-tooltip
:title="statusTitle"
:aria-label="statusTitle"
- data-container="body"
:status="ciStatus"
+ data-container="body"
/>
</a>
</div>
diff --git a/app/assets/javascripts/projects_dropdown/components/app.vue b/app/assets/javascripts/projects_dropdown/components/app.vue
index 0bbd8a41753..73d49488299 100644
--- a/app/assets/javascripts/projects_dropdown/components/app.vue
+++ b/app/assets/javascripts/projects_dropdown/components/app.vue
@@ -132,14 +132,14 @@ export default {
<div>
<search/>
<loading-icon
- class="loading-animation prepend-top-20"
- size="2"
v-if="isLoadingProjects"
:label="s__('ProjectsDropdown|Loading projects')"
+ class="loading-animation prepend-top-20"
+ size="2"
/>
<div
- class="section-header"
v-if="isFrequentsListVisible"
+ class="section-header"
>
{{ s__('ProjectsDropdown|Frequently visited') }}
</div>
diff --git a/app/assets/javascripts/projects_dropdown/components/projects_list_frequent.vue b/app/assets/javascripts/projects_dropdown/components/projects_list_frequent.vue
index 246dbeaaded..625e0aa548c 100644
--- a/app/assets/javascripts/projects_dropdown/components/projects_list_frequent.vue
+++ b/app/assets/javascripts/projects_dropdown/components/projects_list_frequent.vue
@@ -37,14 +37,14 @@
class="list-unstyled"
>
<li
- class="section-empty"
v-if="isListEmpty"
+ class="section-empty"
>
{{ listEmptyMessage }}
</li>
<projects-list-item
- v-else
v-for="(project, index) in projects"
+ v-else
:key="index"
:project-id="project.id"
:project-name="project.name"
diff --git a/app/assets/javascripts/projects_dropdown/components/projects_list_item.vue b/app/assets/javascripts/projects_dropdown/components/projects_list_item.vue
index 759cdd1ded9..eafbf6c99e2 100644
--- a/app/assets/javascripts/projects_dropdown/components/projects_list_item.vue
+++ b/app/assets/javascripts/projects_dropdown/components/projects_list_item.vue
@@ -79,36 +79,36 @@
class="projects-list-item-container"
>
<a
- class="clearfix"
:href="webUrl"
+ class="clearfix"
>
<div
class="project-item-avatar-container"
>
<img
v-if="hasAvatar"
- class="avatar s32"
:src="avatarUrl"
+ class="avatar s32"
/>
<identicon
v-else
- size-class="s32"
:entity-id="projectId"
:entity-name="projectName"
+ size-class="s32"
/>
</div>
<div
class="project-item-metadata-container"
>
<div
- class="project-title"
:title="projectName"
+ class="project-title"
v-html="highlightedProjectName"
>
</div>
<div
- class="project-namespace"
:title="namespace"
+ class="project-namespace"
>{{ truncatedNamespace }}</div>
</div>
</a>
diff --git a/app/assets/javascripts/projects_dropdown/components/projects_list_search.vue b/app/assets/javascripts/projects_dropdown/components/projects_list_search.vue
index 8d0c29177e6..76e9cb9e53f 100644
--- a/app/assets/javascripts/projects_dropdown/components/projects_list_search.vue
+++ b/app/assets/javascripts/projects_dropdown/components/projects_list_search.vue
@@ -48,8 +48,8 @@ export default {
{{ listEmptyMessage }}
</li>
<projects-list-item
- v-else
v-for="(project, index) in projects"
+ v-else
:key="index"
:project-id="project.id"
:project-name="project.name"
diff --git a/app/assets/javascripts/projects_dropdown/components/search.vue b/app/assets/javascripts/projects_dropdown/components/search.vue
index 7fcd62dcdb8..28f2a18f2a6 100644
--- a/app/assets/javascripts/projects_dropdown/components/search.vue
+++ b/app/assets/javascripts/projects_dropdown/components/search.vue
@@ -49,11 +49,11 @@
class="search-input-container d-none d-sm-block"
>
<input
- type="search"
- class="form-control"
ref="search"
v-model="searchQuery"
:placeholder="s__('ProjectsDropdown|Search your projects')"
+ type="search"
+ class="form-control"
/>
<i
v-if="!searchQuery"
diff --git a/app/assets/javascripts/registry/components/app.vue b/app/assets/javascripts/registry/components/app.vue
index ea0f7199a70..31f88675912 100644
--- a/app/assets/javascripts/registry/components/app.vue
+++ b/app/assets/javascripts/registry/components/app.vue
@@ -48,8 +48,8 @@
/>
<collapsible-container
- v-else-if="!isLoading && repos.length"
v-for="(item, index) in repos"
+ v-else-if="!isLoading && repos.length"
:key="index"
:repo="item"
/>
diff --git a/app/assets/javascripts/registry/components/collapsible_container.vue b/app/assets/javascripts/registry/components/collapsible_container.vue
index 2fc3778820b..4116c4a0489 100644
--- a/app/assets/javascripts/registry/components/collapsible_container.vue
+++ b/app/assets/javascripts/registry/components/collapsible_container.vue
@@ -62,15 +62,15 @@
<div class="container-image-head">
<button
type="button"
- @click="toggleRepo"
class="js-toggle-repo btn-link"
+ @click="toggleRepo"
>
<i
- class="fa"
:class="{
'fa-chevron-right': !isOpen,
'fa-chevron-up': isOpen,
}"
+ class="fa"
aria-hidden="true"
>
</i>
@@ -86,12 +86,12 @@
<div class="controls d-none d-sm-block float-right">
<button
+ v-tooltip
v-if="repo.canDelete"
- type="button"
- class="js-remove-repo btn btn-danger"
:title="s__('ContainerRegistry|Remove repository')"
:aria-label="s__('ContainerRegistry|Remove repository')"
- v-tooltip
+ type="button"
+ class="js-remove-repo btn btn-danger"
@click="handleDeleteRepository"
>
<i
diff --git a/app/assets/javascripts/registry/components/table_registry.vue b/app/assets/javascripts/registry/components/table_registry.vue
index e4a4b3bb129..9f4973c3490 100644
--- a/app/assets/javascripts/registry/components/table_registry.vue
+++ b/app/assets/javascripts/registry/components/table_registry.vue
@@ -118,13 +118,13 @@
<td class="content">
<button
+ v-tooltip
v-if="item.canDelete"
- type="button"
- class="js-delete-registry btn btn-danger d-none d-sm-block float-right"
:title="s__('ContainerRegistry|Remove tag')"
:aria-label="s__('ContainerRegistry|Remove tag')"
+ type="button"
+ class="js-delete-registry btn btn-danger d-none d-sm-block float-right"
data-container="body"
- v-tooltip
@click="handleDeleteRegistry(item)"
>
<i
diff --git a/app/assets/javascripts/sidebar/components/assignees/assignees.vue b/app/assets/javascripts/sidebar/components/assignees/assignees.vue
index 5a374d84796..d22a1e1ac66 100644
--- a/app/assets/javascripts/sidebar/components/assignees/assignees.vue
+++ b/app/assets/javascripts/sidebar/components/assignees/assignees.vue
@@ -125,13 +125,13 @@ export default {
<template>
<div>
<div
- class="sidebar-collapsed-icon sidebar-collapsed-user"
- :class="{ 'multiple-users': hasMoreThanOneAssignee }"
v-tooltip
+ :class="{ 'multiple-users': hasMoreThanOneAssignee }"
+ :title="collapsedTooltipTitle"
+ class="sidebar-collapsed-icon sidebar-collapsed-user"
data-container="body"
data-placement="left"
data-boundary="viewport"
- :title="collapsedTooltipTitle"
>
<i
v-if="hasNoUsers"
@@ -140,17 +140,17 @@ export default {
>
</i>
<button
- type="button"
- class="btn-link"
v-for="(user, index) in users"
v-if="shouldRenderCollapsedAssignee(index)"
:key="user.id"
+ type="button"
+ class="btn-link"
>
<img
- width="24"
- class="avatar avatar-inline s24"
:alt="assigneeAlt(user)"
:src="avatarUrl(user)"
+ width="24"
+ class="avatar avatar-inline s24"
/>
<span class="author">
{{ user.name }}
@@ -186,14 +186,14 @@ export default {
</template>
<template v-else-if="hasOneUser">
<a
- class="author_link bold"
:href="assigneeUrl(firstUser)"
+ class="author_link bold"
>
<img
- width="32"
- class="avatar avatar-inline s32"
:alt="assigneeAlt(firstUser)"
:src="avatarUrl(firstUser)"
+ width="32"
+ class="avatar avatar-inline s32"
/>
<span class="author">
{{ firstUser.name }}
@@ -206,23 +206,23 @@ export default {
<template v-else>
<div class="user-list">
<div
- class="user-item"
v-for="(user, index) in users"
v-if="renderAssignee(index)"
:key="user.id"
+ class="user-item"
>
<a
+ :href="assigneeUrl(user)"
+ :data-title="user.name"
class="user-link has-tooltip"
data-container="body"
data-placement="bottom"
- :href="assigneeUrl(user)"
- :data-title="user.name"
>
<img
- width="32"
- class="avatar avatar-inline s32"
:alt="assigneeAlt(user)"
:src="avatarUrl(user)"
+ width="32"
+ class="avatar avatar-inline s32"
/>
</a>
</div>
diff --git a/app/assets/javascripts/sidebar/components/assignees/sidebar_assignees.vue b/app/assets/javascripts/sidebar/components/assignees/sidebar_assignees.vue
index b04a2eff798..123c92aff64 100644
--- a/app/assets/javascripts/sidebar/components/assignees/sidebar_assignees.vue
+++ b/app/assets/javascripts/sidebar/components/assignees/sidebar_assignees.vue
@@ -90,12 +90,12 @@ export default {
/>
<assignees
v-if="!store.isFetching.assignees"
- class="value"
:root-path="store.rootPath"
:users="store.assignees"
:editable="store.editable"
- @assign-self="assignSelf"
:issuable-type="issuableType"
+ class="value"
+ @assign-self="assignSelf"
/>
</div>
</template>
diff --git a/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue b/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue
index 3f6e2f05396..1b866cca4b1 100644
--- a/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue
+++ b/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue
@@ -70,13 +70,13 @@ export default {
<template>
<div class="block issuable-sidebar-item confidentiality">
<div
- class="sidebar-collapsed-icon"
- @click="toggleForm"
v-tooltip
+ :title="tooltipLabel"
+ class="sidebar-collapsed-icon"
data-container="body"
data-placement="left"
data-boundary="viewport"
- :title="tooltipLabel"
+ @click="toggleForm"
>
<icon
:name="confidentialityIcon"
@@ -104,8 +104,8 @@ export default {
v-if="!isConfidential"
class="no-value sidebar-item-value">
<icon
- name="eye"
:size="16"
+ name="eye"
aria-hidden="true"
class="sidebar-item-icon inline"
/>
@@ -115,8 +115,8 @@ export default {
v-else
class="value sidebar-item-value hide-collapsed">
<icon
- name="eye-slash"
:size="16"
+ name="eye-slash"
aria-hidden="true"
class="sidebar-item-icon inline is-active"
/>
diff --git a/app/assets/javascripts/sidebar/components/lock/edit_form.vue b/app/assets/javascripts/sidebar/components/lock/edit_form.vue
index d392977e5e2..4906dad22e1 100644
--- a/app/assets/javascripts/sidebar/components/lock/edit_form.vue
+++ b/app/assets/javascripts/sidebar/components/lock/edit_form.vue
@@ -44,14 +44,14 @@ export default {
<div class="dropdown show">
<div class="dropdown-menu sidebar-item-warning-message">
<p
- class="text"
v-if="isLocked"
+ class="text"
v-html="unlockWarning">
</p>
<p
- class="text"
v-else
+ class="text"
v-html="lockWarning">
</p>
diff --git a/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue b/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
index fb69c741dcd..10bedf8af1f 100644
--- a/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
+++ b/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
@@ -94,13 +94,13 @@ export default {
<template>
<div class="block issuable-sidebar-item lock">
<div
- class="sidebar-collapsed-icon"
- @click="toggleForm"
v-tooltip
+ :title="tooltipLabel"
+ class="sidebar-collapsed-icon"
data-container="body"
data-placement="left"
data-boundary="viewport"
- :title="tooltipLabel"
+ @click="toggleForm"
>
<icon
:name="lockIcon"
@@ -134,8 +134,8 @@ export default {
class="value sidebar-item-value"
>
<icon
- name="lock"
:size="16"
+ name="lock"
aria-hidden="true"
class="sidebar-item-icon inline is-active"
/>
@@ -147,8 +147,8 @@ export default {
class="no-value sidebar-item-value hide-collapsed"
>
<icon
- name="lock-open"
:size="16"
+ name="lock-open"
aria-hidden="true"
class="sidebar-item-icon inline"
/>
diff --git a/app/assets/javascripts/sidebar/components/participants/participants.vue b/app/assets/javascripts/sidebar/components/participants/participants.vue
index 0a945fc7fd5..33dd6c981b6 100644
--- a/app/assets/javascripts/sidebar/components/participants/participants.vue
+++ b/app/assets/javascripts/sidebar/components/participants/participants.vue
@@ -80,12 +80,12 @@
<template>
<div>
<div
- class="sidebar-collapsed-icon"
v-tooltip
+ :title="participantLabel"
+ class="sidebar-collapsed-icon"
data-container="body"
data-placement="left"
data-boundary="viewport"
- :title="participantLabel"
@click="onClickCollapsedIcon"
>
<i
@@ -119,15 +119,15 @@
class="participants-author js-participants-author"
>
<a
- class="author_link"
:href="participant.web_url"
+ class="author_link"
>
<user-avatar-image
:lazy="true"
:img-src="participant.avatar_url"
- css-classes="avatar-inline"
:size="24"
:tooltip-text="participant.name"
+ css-classes="avatar-inline"
tooltip-placement="bottom"
/>
</a>
diff --git a/app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue b/app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue
index 6745c1aafff..448c8fc3602 100644
--- a/app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue
+++ b/app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue
@@ -97,9 +97,9 @@
</span>
<toggle-button
ref="toggleButton"
- class="float-right hide-collapsed js-issuable-subscribe-button"
:is-loading="showLoadingState"
:value="subscribed"
+ class="float-right hide-collapsed js-issuable-subscribe-button"
@change="toggleSubscription"
/>
</div>
diff --git a/app/assets/javascripts/sidebar/components/time_tracking/collapsed_state.vue b/app/assets/javascripts/sidebar/components/time_tracking/collapsed_state.vue
index 209af1ce152..1d030c4f67f 100644
--- a/app/assets/javascripts/sidebar/components/time_tracking/collapsed_state.vue
+++ b/app/assets/javascripts/sidebar/components/time_tracking/collapsed_state.vue
@@ -110,12 +110,12 @@
<template>
<div
- class="sidebar-collapsed-icon"
v-tooltip
+ :title="tooltipText"
+ class="sidebar-collapsed-icon"
data-container="body"
data-placement="left"
data-boundary="viewport"
- :title="tooltipText"
>
<icon name="timer" />
<div class="time-tracking-collapsed-summary">
diff --git a/app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.vue b/app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.vue
index 0e139cd7f5e..d335c3f55af 100644
--- a/app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.vue
+++ b/app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.vue
@@ -54,14 +54,17 @@ export default {
<template>
<div class="time-tracking-comparison-pane">
<div
- class="compare-meter"
- :title="timeRemainingTooltip"
v-tooltip
+ :title="timeRemainingTooltip"
:class="timeRemainingStatusClass"
+ class="compare-meter"
+ data-toggle="tooltip"
+ data-placement="top"
+ role="timeRemainingDisplay"
>
<div
- class="meter-container"
:aria-valuenow="timeRemainingPercent"
+ class="meter-container"
>
<div
:style="{ width: timeRemainingPercent }"
diff --git a/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue b/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue
index 825063d9ba6..19ec0f05a26 100644
--- a/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue
+++ b/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue
@@ -45,8 +45,8 @@ export default {
<p v-html="spendText">
</p>
<a
- class="btn btn-default learn-more-button"
:href="href"
+ class="btn btn-default learn-more-button"
>
{{ __('Learn more') }}
</a>
diff --git a/app/assets/javascripts/sidebar/components/time_tracking/time_tracker.vue b/app/assets/javascripts/sidebar/components/time_tracking/time_tracker.vue
index 7d56d2fa5ee..ca3b9338c29 100644
--- a/app/assets/javascripts/sidebar/components/time_tracking/time_tracker.vue
+++ b/app/assets/javascripts/sidebar/components/time_tracking/time_tracker.vue
@@ -101,8 +101,8 @@ export default {
<template>
<div
- class="time_tracker time-tracking-component-wrap"
v-cloak
+ class="time_tracker time-tracking-component-wrap"
>
<time-tracking-collapsed-state
:show-comparison-state="showComparisonState"
@@ -116,8 +116,8 @@ export default {
<div class="title hide-collapsed">
{{ __('Time tracking') }}
<div
- class="help-button float-right"
v-if="!showHelpState"
+ class="help-button float-right"
@click="toggleHelpState(true)"
>
<i
@@ -127,8 +127,8 @@ export default {
</i>
</div>
<div
- class="close-help-button float-right"
v-if="showHelpState"
+ class="close-help-button float-right"
@click="toggleHelpState(false)"
>
<i
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/deployment.vue b/app/assets/javascripts/vue_merge_request_widget/components/deployment.vue
index 1608858da22..c44419d24e6 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/deployment.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/deployment.vue
@@ -118,8 +118,8 @@ export default {
</a>
</template>
<span
- v-if="hasDeploymentTime"
v-tooltip
+ v-if="hasDeploymentTime"
:title="deployment.deployed_at_formatted"
class="js-deploy-time"
>
@@ -127,9 +127,9 @@ export default {
</span>
<loading-button
v-if="deployment.stop_url"
+ :loading="isStopping"
container-class="btn btn-default btn-sm prepend-left-default"
label="Stop environment"
- :loading="isStopping"
@click="stopEnvironment"
/>
</div>
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue
index 8338fde61c7..22c2f74f900 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue
@@ -35,17 +35,17 @@
<template>
<a
:href="authorUrl"
- class="author-link inline"
:v-tooltip="showAuthorTooltip"
:title="author.name"
+ class="author-link inline"
>
<img
:src="avatarUrl"
class="avatar avatar-inline s16"
/>
<span
- class="author"
v-if="showAuthorName"
+ class="author"
>
{{ author.name }}
</span>
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author_time.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author_time.vue
index a9868486e83..ba16cb9e2c8 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author_time.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author_time.vue
@@ -35,8 +35,8 @@
{{ actionText }}
<mr-widget-author :author="author" />
<time
- :title="dateTitle"
v-tooltip
+ :title="dateTitle"
data-container="body"
>
{{ dateReadable }}
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
index 51a0fda6555..3ce9d8dc26a 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
@@ -59,11 +59,11 @@ export default {
<strong>
{{ s__("mrWidget|Request to merge") }}
<span
- class="label-branch js-source-branch"
:class="{ 'label-truncated': isSourceBranchLong }"
:title="isSourceBranchLong ? mr.sourceBranch : ''"
- data-placement="bottom"
:v-tooltip="isSourceBranchLong"
+ class="label-branch js-source-branch"
+ data-placement="bottom"
v-html="mr.sourceBranchLink"
>
</span>
@@ -77,10 +77,10 @@ export default {
{{ s__("mrWidget|into") }}
<span
- class="label-branch"
:v-tooltip="isTargetBranchLong"
:class="{ 'label-truncatedtooltip': isTargetBranchLong }"
:title="isTargetBranchLong ? mr.targetBranch : ''"
+ class="label-branch"
data-placement="bottom"
>
<a
@@ -108,9 +108,9 @@ export default {
{{ s__("mrWidget|Web IDE") }}
</a>
<button
+ :disabled="mr.sourceBranchRemoved"
data-target="#modal_merge_info"
data-toggle="modal"
- :disabled="mr.sourceBranchRemoved"
class="btn btn-sm btn-default inline js-check-out-branch"
type="button"
>
@@ -134,8 +134,8 @@ export default {
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a
- class="js-download-email-patches"
:href="mr.emailPatchesPath"
+ class="js-download-email-patches"
download
>
{{ s__("mrWidget|Email patches") }}
@@ -143,8 +143,8 @@ export default {
</li>
<li>
<a
- class="js-download-plain-diff"
:href="mr.plainDiffPath"
+ class="js-download-plain-diff"
download
>
{{ s__("mrWidget|Plain diff") }}
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue
index 48dff8c4916..2f0b5e12c12 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue
@@ -67,8 +67,8 @@ export default {
</template>
<template v-else-if="hasPipeline">
<a
- class="append-right-10"
:href="status.details_path"
+ class="append-right-10"
>
<ci-icon :status="status" />
</a>
@@ -96,8 +96,8 @@ export default {
<span class="mr-widget-pipeline-graph">
<span
- class="stage-cell"
v-if="hasStages"
+ class="stage-cell"
>
<div
v-for="(stage, i) in pipeline.details.stages"
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/source_branch_removal_status.vue b/app/assets/javascripts/vue_merge_request_widget/components/source_branch_removal_status.vue
index 460437ceeff..56879c04d16 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/source_branch_removal_status.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/source_branch_removal_status.vue
@@ -25,9 +25,9 @@
</span>
<i
v-tooltip
- class="fa fa-question-circle"
:title="tooltipTitle"
:aria-label="tooltipTitle"
+ class="fa fa-question-circle"
>
</i>
</p>
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.vue
index b404a592234..2133124347c 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.vue
@@ -39,10 +39,10 @@
{{ s__("mrWidget|This merge request failed to be merged automatically") }}
</span>
<button
- @click="refreshWidget"
:disabled="isRefreshing"
type="button"
class="btn btn-sm btn-default"
+ @click="refreshWidget"
>
<loading-icon
v-if="isRefreshing"
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_checking.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_checking.vue
index caeaac75b45..ae6630dcd6f 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_checking.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_checking.vue
@@ -11,8 +11,8 @@
<template>
<div class="mr-widget-body media">
<status-icon
- status="loading"
:show-disabled-button="true"
+ status="loading"
/>
<div class="media-body space-children">
<span class="bold">
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_conflicts.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_conflicts.vue
index 5c1500ab801..dff9ec657b9 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_conflicts.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_conflicts.vue
@@ -20,8 +20,8 @@
<template>
<div class="mr-widget-body media">
<status-icon
- status="warning"
:show-disabled-button="true"
+ status="warning"
/>
<div class="media-body space-children">
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.vue
index df866ed5706..c302960f16e 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.vue
@@ -80,14 +80,14 @@ export default {
</template>
<template v-else>
<status-icon
- status="warning"
:show-disabled-button="true"
+ status="warning"
/>
<div class="media-body space-children">
<span class="bold">
<span
+ v-if="mr.mergeError"
class="has-error-message"
- v-if="mergeError"
>
{{ mergeError }}.
</span>
@@ -101,9 +101,9 @@ export default {
</span>
</span>
<button
- @click="refresh"
class="btn btn-default btn-sm js-refresh-button"
type="button"
+ @click="refresh"
>
{{ s__("mrWidget|Refresh now") }}
</button>
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merge_when_pipeline_succeeds.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merge_when_pipeline_succeeds.vue
index e8352c362d6..0d9a560c88e 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merge_when_pipeline_succeeds.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merge_when_pipeline_succeeds.vue
@@ -90,11 +90,11 @@
</span>
<a
v-if="mr.canCancelAutomaticMerge"
- @click.prevent="cancelAutomaticMerge"
:disabled="isCancellingAutoMerge"
role="button"
href="#"
- class="btn btn-sm btn-default js-cancel-auto-merge">
+ class="btn btn-sm btn-default js-cancel-auto-merge"
+ @click.prevent="cancelAutomaticMerge">
<i
v-if="isCancellingAutoMerge"
class="fa fa-spinner fa-spin"
@@ -127,10 +127,10 @@
<a
v-if="canRemoveSourceBranch"
:disabled="isRemovingSourceBranch"
- @click.prevent="removeSourceBranch"
role="button"
class="btn btn-sm btn-default js-remove-source-branch"
href="#"
+ @click.prevent="removeSourceBranch"
>
<i
v-if="isRemovingSourceBranch"
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue
index bc95706f47d..985f44dee97 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue
@@ -116,44 +116,44 @@
:date-readable="mr.metrics.readableMergedAt"
/>
<a
- v-if="mr.canRevertInCurrentMR"
v-tooltip
+ v-if="mr.canRevertInCurrentMR"
+ :title="revertTitle"
class="btn btn-close btn-sm"
href="#modal-revert-commit"
data-toggle="modal"
data-container="body"
- :title="revertTitle"
>
{{ revertLabel }}
</a>
<a
- v-else-if="mr.revertInForkPath"
v-tooltip
- class="btn btn-close btn-sm"
- data-method="post"
+ v-else-if="mr.revertInForkPath"
:href="mr.revertInForkPath"
:title="revertTitle"
+ class="btn btn-close btn-sm"
+ data-method="post"
>
{{ revertLabel }}
</a>
<a
- v-if="mr.canCherryPickInCurrentMR"
v-tooltip
+ v-if="mr.canCherryPickInCurrentMR"
+ :title="cherryPickTitle"
class="btn btn-default btn-sm"
href="#modal-cherry-pick-commit"
data-toggle="modal"
data-container="body"
- :title="cherryPickTitle"
>
{{ cherryPickLabel }}
</a>
<a
- v-else-if="mr.cherryPickInForkPath"
v-tooltip
- class="btn btn-default btn-sm"
- data-method="post"
+ v-else-if="mr.cherryPickInForkPath"
:href="mr.cherryPickInForkPath"
:title="cherryPickTitle"
+ class="btn btn-default btn-sm"
+ data-method="post"
>
{{ cherryPickLabel }}
</a>
@@ -186,10 +186,10 @@
>
<span>{{ s__("mrWidget|You can remove source branch now") }}</span>
<button
- @click="removeSourceBranch"
:disabled="isMakingRequest"
type="button"
class="btn btn-sm btn-default js-remove-branch-button"
+ @click="removeSourceBranch"
>
{{ s__("mrWidget|Remove Source Branch") }}
</button>
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_missing_branch.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_missing_branch.vue
index 718c0e4b3c6..b0e96f74626 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_missing_branch.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_missing_branch.vue
@@ -39,8 +39,8 @@
<template>
<div class="mr-widget-body media">
<status-icon
- status="warning"
:show-disabled-button="true"
+ status="warning"
/>
<div class="media-body space-children">
@@ -51,9 +51,9 @@
{{ missingBranchNameMessage }}
<i
v-tooltip
- class="fa fa-question-circle"
:title="message"
:aria-label="message"
+ class="fa fa-question-circle"
>
</i>
</span>
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_not_allowed.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_not_allowed.vue
index e4af50b09f8..92eee2cf5dd 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_not_allowed.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_not_allowed.vue
@@ -12,8 +12,8 @@
<template>
<div class="mr-widget-body media">
<status-icon
- status="success"
:show-disabled-button="true"
+ status="success"
/>
<div class="media-body space-children">
<span class="bold">
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.vue
index 6d7cc03f7ad..37ee5215cea 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.vue
@@ -11,8 +11,8 @@
<template>
<div class="mr-widget-body media">
<status-icon
- status="warning"
:show-disabled-button="true"
+ status="warning"
/>
<div class="media-body space-children">
<span class="bold">
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue
index 143fd328d88..2d8c3d6be87 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue
@@ -110,9 +110,9 @@
js-toggle-container accept-action media space-children"
>
<button
+ :disabled="isMakingRequest"
type="button"
class="btn btn-sm btn-reopen btn-success qa-mr-rebase-button"
- :disabled="isMakingRequest"
@click="rebase"
>
<loading-icon v-if="isMakingRequest" />
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_squash_before_merge.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_squash_before_merge.vue
index 875c3323dbb..25c1044fe2b 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_squash_before_merge.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_squash_before_merge.vue
@@ -37,23 +37,23 @@ export default {
<div class="accept-control inline">
<label class="merge-param-checkbox">
<input
+ :disabled="isMergeButtonDisabled"
+ v-model="squashBeforeMerge"
type="checkbox"
name="squash"
class="qa-squash-checkbox"
- :disabled="isMergeButtonDisabled"
- v-model="squashBeforeMerge"
@change="updateSquashModel"
/>
{{ __('Squash commits') }}
</label>
<a
+ v-tooltip
:href="mr.squashBeforeMergeHelpPath"
data-title="About this feature"
data-placement="bottom"
target="_blank"
rel="noopener noreferrer nofollow"
data-container="body"
- v-tooltip
>
<icon
name="question-o"
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/pipeline_failed.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/pipeline_failed.vue
index 8d55477929f..2bb1a34412e 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/pipeline_failed.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/pipeline_failed.vue
@@ -12,8 +12,8 @@ export default {
<template>
<div class="mr-widget-body media">
<status-icon
- status="warning"
:show-disabled-button="true"
+ status="warning"
/>
<div class="media-body space-children">
<span class="bold">
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
index 3a194320bd8..fe777a07189 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
@@ -235,11 +235,11 @@ export default {
<div class="mr-widget-body-controls media space-children">
<span class="btn-group append-bottom-5">
<button
- @click="handleMergeButtonClick()"
:disabled="isMergeButtonDisabled"
:class="mergeButtonClass"
type="button"
- class="qa-merge-button">
+ class="qa-merge-button"
+ @click="handleMergeButtonClick()">
<i
v-if="isMakingRequest"
class="fa fa-spinner fa-spin"
@@ -265,28 +265,28 @@ export default {
role="menu">
<li>
<a
- @click.prevent="handleMergeButtonClick(true)"
class="merge_when_pipeline_succeeds"
- href="#">
+ href="#"
+ @click.prevent="handleMergeButtonClick(true)">
<span class="media">
<span
- v-html="successSvg"
class="merge-opt-icon"
- aria-hidden="true"></span>
+ aria-hidden="true"
+ v-html="successSvg"></span>
<span class="media-body merge-opt-title">Merge when pipeline succeeds</span>
</span>
</a>
</li>
<li>
<a
- @click.prevent="handleMergeButtonClick(false, true)"
class="accept-merge-request"
- href="#">
+ href="#"
+ @click.prevent="handleMergeButtonClick(false, true)">
<span class="media">
<span
- v-html="warningSvg"
class="merge-opt-icon"
- aria-hidden="true"></span>
+ aria-hidden="true"
+ v-html="warningSvg"></span>
<span class="media-body merge-opt-title">Merge immediately</span>
</span>
</a>
@@ -299,8 +299,8 @@ export default {
<input
id="remove-source-branch-input"
v-model="removeSourceBranch"
- class="js-remove-source-branch-checkbox"
:disabled="isRemoveSourceBranchButtonDisabled"
+ class="js-remove-source-branch-checkbox"
type="checkbox"/> Remove source branch
</label>
@@ -317,10 +317,10 @@ export default {
</span>
<button
v-else
- @click="toggleCommitMessageEditor"
:disabled="isMergeButtonDisabled"
class="js-modify-commit-message-button btn btn-default btn-sm"
- type="button">
+ type="button"
+ @click="toggleCommitMessageEditor">
Modify commit message
</button>
</template>
@@ -356,8 +356,8 @@ export default {
</p>
<div class="hint">
<a
- @click.prevent="updateCommitMessage"
href="#"
+ @click.prevent="updateCommitMessage"
>
{{ commitMessageLinkTitle }}
</a>
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/sha_mismatch.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/sha_mismatch.vue
index 7cc07401911..16c903c923f 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/sha_mismatch.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/sha_mismatch.vue
@@ -12,8 +12,8 @@ export default {
<template>
<div class="mr-widget-body media">
<status-icon
- status="warning"
:show-disabled-button="true"
+ status="warning"
/>
<div class="media-body space-children">
<span class="bold">
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/unresolved_discussions.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/unresolved_discussions.vue
index 8ea3f22ecc2..5eb2058a03b 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/unresolved_discussions.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/unresolved_discussions.vue
@@ -18,8 +18,8 @@ export default {
<template>
<div class="mr-widget-body media">
<status-icon
- status="warning"
:show-disabled-button="true"
+ status="warning"
/>
<div class="media-body space-children">
<span class="bold">
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue
index fe2608e8212..7078e19d8bf 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue
@@ -43,8 +43,8 @@ export default {
<template>
<div class="mr-widget-body media">
<status-icon
- status="warning"
:show-disabled-button="Boolean(mr.removeWIPPath)"
+ status="warning"
/>
<div class="media-body space-children">
<span class="bold">
@@ -60,10 +60,10 @@ export default {
</span>
<button
v-if="mr.removeWIPPath"
- @click="removeWIP"
:disabled="isMakingRequest"
type="button"
- class="btn btn-default btn-xs js-remove-wip">
+ class="btn btn-default btn-xs js-remove-wip"
+ @click="removeWIP">
<i
v-if="isMakingRequest"
class="fa fa-spinner fa-spin"
diff --git a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
index 098e8178265..bc4ba3d050b 100644
--- a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
@@ -283,8 +283,8 @@ export default {
/>
</div>
<div
- class="mr-widget-footer"
v-if="shouldRenderMergeHelp"
+ class="mr-widget-footer"
>
<mr-widget-merge-help />
</div>
diff --git a/app/assets/javascripts/vue_shared/components/ci_badge_link.vue b/app/assets/javascripts/vue_shared/components/ci_badge_link.vue
index 0d64efcbf68..a2518e2a611 100644
--- a/app/assets/javascripts/vue_shared/components/ci_badge_link.vue
+++ b/app/assets/javascripts/vue_shared/components/ci_badge_link.vue
@@ -50,9 +50,9 @@ export default {
</script>
<template>
<a
+ v-tooltip
:href="status.details_path"
:class="cssClass"
- v-tooltip
:title="!showText ? status.text : ''"
>
<ci-icon :status="status" />
diff --git a/app/assets/javascripts/vue_shared/components/clipboard_button.vue b/app/assets/javascripts/vue_shared/components/clipboard_button.vue
index cb2cc3901ad..dc5760bce28 100644
--- a/app/assets/javascripts/vue_shared/components/clipboard_button.vue
+++ b/app/assets/javascripts/vue_shared/components/clipboard_button.vue
@@ -49,14 +49,14 @@ export default {
<template>
<button
- type="button"
- class="btn"
+ v-tooltip
:class="cssClass"
:title="title"
:data-clipboard-text="text"
- v-tooltip
:data-container="tooltipContainer"
:data-placement="tooltipPlacement"
+ type="button"
+ class="btn"
>
<i
aria-hidden="true"
diff --git a/app/assets/javascripts/vue_shared/components/commit.vue b/app/assets/javascripts/vue_shared/components/commit.vue
index 8f250a6c989..13bca99dcb3 100644
--- a/app/assets/javascripts/vue_shared/components/commit.vue
+++ b/app/assets/javascripts/vue_shared/components/commit.vue
@@ -124,11 +124,11 @@ export default {
</div>
<a
- class="ref-name"
- :href="commitRef.ref_url"
v-tooltip
- data-container="body"
+ :href="commitRef.ref_url"
:title="commitRef.name"
+ class="ref-name"
+ data-container="body"
>
{{ commitRef.name }}
</a>
@@ -139,8 +139,8 @@ export default {
/>
<a
- class="commit-sha"
:href="commitUrl"
+ class="commit-sha"
>
{{ shortSha }}
</a>
@@ -152,15 +152,15 @@ export default {
>
<user-avatar-link
v-if="hasAuthor"
- class="avatar-image-container"
:link-href="author.path"
:img-src="author.avatar_url"
:img-alt="userImageAltDescription"
:tooltip-text="author.username"
+ class="avatar-image-container"
/>
<a
- class="commit-row-message"
:href="commitUrl"
+ class="commit-row-message"
>
{{ title }}
</a>
diff --git a/app/assets/javascripts/vue_shared/components/content_viewer/viewers/download_viewer.vue b/app/assets/javascripts/vue_shared/components/content_viewer/viewers/download_viewer.vue
index 7b5367ac19b..f1ef50d0e3d 100644
--- a/app/assets/javascripts/vue_shared/components/content_viewer/viewers/download_viewer.vue
+++ b/app/assets/javascripts/vue_shared/components/content_viewer/viewers/download_viewer.vue
@@ -32,7 +32,10 @@ export default {
<div class="file-container">
<div class="file-content">
<p class="prepend-top-10 file-info">
- {{ fileName }} ({{ fileSizeReadable }})
+ {{ fileName }}
+ <template v-if="fileSize > 0">
+ ({{ fileSizeReadable }})
+ </template>
</p>
<a
:href="path"
@@ -41,9 +44,9 @@ export default {
download
target="_blank">
<icon
+ :size="16"
name="download"
css-classes="float-left append-right-8"
- :size="16"
/>
{{ __('Download') }}
</a>
diff --git a/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue b/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue
index a5999f909ca..6851029018a 100644
--- a/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue
+++ b/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue
@@ -1,4 +1,5 @@
<script>
+import _ from 'underscore';
import { numberToHumanSize } from '../../../../lib/utils/number_utils';
export default {
@@ -12,6 +13,10 @@ export default {
required: false,
default: 0,
},
+ renderInfo: {
+ type: Boolean,
+ default: true,
+ },
},
data() {
return {
@@ -26,14 +31,34 @@ export default {
return numberToHumanSize(this.fileSize);
},
},
+ beforeDestroy() {
+ window.removeEventListener('resize', this.resizeThrottled, false);
+ },
+ mounted() {
+ // The onImgLoad may have happened before the control was actually mounted
+ this.onImgLoad();
+ this.resizeThrottled = _.throttle(this.onImgLoad, 400);
+ window.addEventListener('resize', this.resizeThrottled, false);
+ },
methods: {
onImgLoad() {
const contentImg = this.$refs.contentImg;
- this.isZoomable =
- contentImg.naturalWidth > contentImg.width || contentImg.naturalHeight > contentImg.height;
- this.width = contentImg.naturalWidth;
- this.height = contentImg.naturalHeight;
+ if (contentImg) {
+ this.isZoomable =
+ contentImg.naturalWidth > contentImg.width ||
+ contentImg.naturalHeight > contentImg.height;
+
+ this.width = contentImg.naturalWidth;
+ this.height = contentImg.naturalHeight;
+
+ this.$emit('imgLoaded', {
+ width: this.width,
+ height: this.height,
+ renderedWidth: contentImg.clientWidth,
+ renderedHeight: contentImg.clientHeight,
+ });
+ }
},
onImgClick() {
if (this.isZoomable) this.isZoomed = !this.isZoomed;
@@ -47,20 +72,22 @@ export default {
<div class="file-content image_file">
<img
ref="contentImg"
- :class="{ 'isZoomable': isZoomable, 'isZoomed': isZoomed }"
+ :class="{ 'is-zoomable': isZoomable, 'is-zoomed': isZoomed }"
:src="path"
:alt="path"
@load="onImgLoad"
@click="onImgClick"/>
- <p class="file-info prepend-top-10">
+ <p
+ v-if="renderInfo"
+ class="file-info prepend-top-10">
<template v-if="fileSize>0">
{{ fileSizeReadable }}
</template>
<template v-if="fileSize>0 && width && height">
- -
+ |
</template>
<template v-if="width && height">
- {{ width }} x {{ height }}
+ W: {{ width }} | H: {{ height }}
</template>
</p>
</div>
diff --git a/app/assets/javascripts/vue_shared/components/deprecated_modal.vue b/app/assets/javascripts/vue_shared/components/deprecated_modal.vue
index 424af5a0293..9c1e5c68649 100644
--- a/app/assets/javascripts/vue_shared/components/deprecated_modal.vue
+++ b/app/assets/javascripts/vue_shared/components/deprecated_modal.vue
@@ -86,8 +86,8 @@
<div class="modal-open">
<div
:id="id"
- class="modal"
:class="id ? '' : 'd-block'"
+ class="modal"
role="dialog"
tabindex="-1"
>
@@ -105,9 +105,9 @@
<button
type="button"
class="close float-right"
- @click="emitCancel($event)"
data-dismiss="modal"
aria-label="Close"
+ @click="emitCancel($event)"
>
<span aria-hidden="true">&times;</span>
</button>
@@ -115,22 +115,22 @@
</div>
<div class="modal-body">
<slot
- name="body"
:text="text"
+ name="body"
>
<p>{{ text }}</p>
</slot>
</div>
<div
- class="modal-footer"
v-if="!hideFooter"
+ class="modal-footer"
>
<button
+ :class="btnCancelKindClass"
type="button"
class="btn"
- :class="btnCancelKindClass"
- @click="emitCancel($event)"
data-dismiss="modal"
+ @click="emitCancel($event)"
>
{{ closeButtonLabel }}
</button>
@@ -151,12 +151,12 @@
<button
v-if="primaryButtonLabel"
- type="button"
- class="btn js-primary-button"
:disabled="submitDisabled"
:class="btnKindClass"
- @click="emitSubmit($event)"
+ type="button"
+ class="btn js-primary-button"
data-dismiss="modal"
+ @click="emitSubmit($event)"
>
{{ primaryButtonLabel }}
</button>
diff --git a/app/assets/javascripts/vue_shared/components/diff_viewer/constants.js b/app/assets/javascripts/vue_shared/components/diff_viewer/constants.js
new file mode 100644
index 00000000000..6c1840361af
--- /dev/null
+++ b/app/assets/javascripts/vue_shared/components/diff_viewer/constants.js
@@ -0,0 +1,12 @@
+export const diffModes = {
+ replaced: 'replaced',
+ new: 'new',
+ deleted: 'deleted',
+ renamed: 'renamed',
+};
+
+export const imageViewMode = {
+ twoup: 'twoup',
+ swipe: 'swipe',
+ onion: 'onion',
+};
diff --git a/app/assets/javascripts/vue_shared/components/diff_viewer/diff_viewer.vue b/app/assets/javascripts/vue_shared/components/diff_viewer/diff_viewer.vue
new file mode 100644
index 00000000000..2c47f5b9b35
--- /dev/null
+++ b/app/assets/javascripts/vue_shared/components/diff_viewer/diff_viewer.vue
@@ -0,0 +1,70 @@
+<script>
+import { viewerInformationForPath } from '../content_viewer/lib/viewer_utils';
+import ImageDiffViewer from './viewers/image_diff_viewer.vue';
+import DownloadDiffViewer from './viewers/download_diff_viewer.vue';
+
+export default {
+ props: {
+ diffMode: {
+ type: String,
+ required: true,
+ },
+ newPath: {
+ type: String,
+ required: true,
+ },
+ newSha: {
+ type: String,
+ required: true,
+ },
+ oldPath: {
+ type: String,
+ required: true,
+ },
+ oldSha: {
+ type: String,
+ required: true,
+ },
+ projectPath: {
+ type: String,
+ required: false,
+ default: '',
+ },
+ },
+ computed: {
+ viewer() {
+ if (!this.newPath) return null;
+
+ const previewInfo = viewerInformationForPath(this.newPath);
+ if (!previewInfo) return DownloadDiffViewer;
+
+ switch (previewInfo.id) {
+ case 'image':
+ return ImageDiffViewer;
+ default:
+ return DownloadDiffViewer;
+ }
+ },
+ fullOldPath() {
+ return `${gon.relative_url_root}/${this.projectPath}/raw/${this.oldSha}/${this.oldPath}`;
+ },
+ fullNewPath() {
+ return `${gon.relative_url_root}/${this.projectPath}/raw/${this.newSha}/${this.newPath}`;
+ },
+ },
+};
+</script>
+
+<template>
+ <div
+ v-if="viewer"
+ class="diff-file preview-container">
+ <component
+ :is="viewer"
+ :diff-mode="diffMode"
+ :new-path="fullNewPath"
+ :old-path="fullOldPath"
+ :project-path="projectPath"
+ />
+ </div>
+</template>
diff --git a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/download_diff_viewer.vue b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/download_diff_viewer.vue
new file mode 100644
index 00000000000..50389b6ae63
--- /dev/null
+++ b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/download_diff_viewer.vue
@@ -0,0 +1,69 @@
+<script>
+import DownloadViewer from '../../content_viewer/viewers/download_viewer.vue';
+import { diffModes } from '../constants';
+
+export default {
+ components: {
+ DownloadViewer,
+ },
+ props: {
+ diffMode: {
+ type: String,
+ required: true,
+ },
+ newPath: {
+ type: String,
+ required: true,
+ },
+ oldPath: {
+ type: String,
+ required: true,
+ },
+ projectPath: {
+ type: String,
+ required: false,
+ default: '',
+ },
+ },
+ diffModes,
+};
+</script>
+
+<template>
+ <div class="diff-file-container">
+ <div class="diff-viewer">
+ <div
+ v-if="diffMode === $options.diffModes.replaced"
+ class="two-up view row">
+ <div class="col-sm-6 deleted">
+ <download-viewer
+ :path="oldPath"
+ :project-path="projectPath"
+ />
+ </div>
+ <div class="col-sm-6 added">
+ <download-viewer
+ :path="newPath"
+ :project-path="projectPath"
+ />
+ </div>
+ </div>
+ <div
+ v-else-if="diffMode === $options.diffModes.new"
+ class="added">
+ <download-viewer
+ :path="newPath"
+ :project-path="projectPath"
+ />
+ </div>
+ <div
+ v-else
+ class="deleted">
+ <download-viewer
+ :path="oldPath"
+ :project-path="projectPath"
+ />
+ </div>
+ </div>
+ </div>
+</template>
diff --git a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/onion_skin_viewer.vue b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/onion_skin_viewer.vue
new file mode 100644
index 00000000000..38e881d17a2
--- /dev/null
+++ b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/onion_skin_viewer.vue
@@ -0,0 +1,160 @@
+<script>
+import { pixeliseValue } from '../../../lib/utils/dom_utils';
+import ImageViewer from '../../../content_viewer/viewers/image_viewer.vue';
+
+export default {
+ components: {
+ ImageViewer,
+ },
+ props: {
+ newPath: {
+ type: String,
+ required: true,
+ },
+ oldPath: {
+ type: String,
+ required: true,
+ },
+ projectPath: {
+ type: String,
+ required: false,
+ default: '',
+ },
+ },
+ data() {
+ return {
+ onionMaxWidth: undefined,
+ onionMaxHeight: undefined,
+ onionOldImgInfo: null,
+ onionNewImgInfo: null,
+ onionDraggerPos: 0,
+ onionOpacity: 1,
+ dragging: false,
+ };
+ },
+ computed: {
+ onionMaxPixelWidth() {
+ return pixeliseValue(this.onionMaxWidth);
+ },
+ onionMaxPixelHeight() {
+ return pixeliseValue(this.onionMaxHeight);
+ },
+ onionDraggerPixelPos() {
+ return pixeliseValue(this.onionDraggerPos);
+ },
+ },
+ beforeDestroy() {
+ document.body.removeEventListener('mouseup', this.stopDrag);
+ this.$refs.dragger.removeEventListener('mousedown', this.startDrag);
+ },
+ methods: {
+ dragMove(e) {
+ if (!this.dragging) return;
+ const left = e.pageX - this.$refs.dragTrack.getBoundingClientRect().left;
+ const dragTrackWidth =
+ this.$refs.dragTrack.clientWidth - this.$refs.dragger.clientWidth || 100;
+
+ let leftValue = left;
+ if (leftValue < 0) leftValue = 0;
+ if (leftValue > dragTrackWidth) leftValue = dragTrackWidth;
+
+ this.onionOpacity = left / dragTrackWidth;
+ this.onionDraggerPos = leftValue;
+ },
+ startDrag() {
+ this.dragging = true;
+ document.body.style.userSelect = 'none';
+ document.body.addEventListener('mousemove', this.dragMove);
+ },
+ stopDrag() {
+ this.dragging = false;
+ document.body.style.userSelect = '';
+ document.body.removeEventListener('mousemove', this.dragMove);
+ },
+ prepareOnionSkin() {
+ if (this.onionOldImgInfo && this.onionNewImgInfo) {
+ this.onionMaxWidth = Math.max(
+ this.onionOldImgInfo.renderedWidth,
+ this.onionNewImgInfo.renderedWidth,
+ );
+ this.onionMaxHeight = Math.max(
+ this.onionOldImgInfo.renderedHeight,
+ this.onionNewImgInfo.renderedHeight,
+ );
+
+ this.onionOpacity = 1;
+ this.onionDraggerPos =
+ this.$refs.dragTrack.clientWidth - this.$refs.dragger.clientWidth || 100;
+
+ document.body.addEventListener('mouseup', this.stopDrag);
+ }
+ },
+ onionNewImgLoaded(imgInfo) {
+ this.onionNewImgInfo = imgInfo;
+ this.prepareOnionSkin();
+ },
+ onionOldImgLoaded(imgInfo) {
+ this.onionOldImgInfo = imgInfo;
+ this.prepareOnionSkin();
+ },
+ },
+};
+</script>
+
+<template>
+ <div class="onion-skin view">
+ <div
+ :style="{
+ 'width': onionMaxPixelWidth,
+ 'height': onionMaxPixelHeight,
+ 'user-select': dragging === true ? 'none' : '',
+ }"
+ class="onion-skin-frame">
+ <div
+ :style="{
+ 'width': onionMaxPixelWidth,
+ 'height': onionMaxPixelHeight,
+ }"
+ class="frame deleted">
+ <image-viewer
+ key="onionOldImg"
+ :render-info="false"
+ :path="oldPath"
+ :project-path="projectPath"
+ @imgLoaded="onionOldImgLoaded"
+ />
+ </div>
+ <div
+ ref="addedFrame"
+ :style="{
+ 'opacity': onionOpacity,
+ 'width': onionMaxPixelWidth,
+ 'height': onionMaxPixelHeight,
+ }"
+ class="added frame">
+ <image-viewer
+ key="onionNewImg"
+ :render-info="false"
+ :path="newPath"
+ :project-path="projectPath"
+ @imgLoaded="onionNewImgLoaded"
+ />
+ </div>
+ <div class="controls">
+ <div class="transparent"></div>
+ <div
+ ref="dragTrack"
+ class="drag-track"
+ @mousedown="startDrag"
+ @mouseup="stopDrag">
+ <div
+ ref="dragger"
+ :style="{ 'left': onionDraggerPixelPos }"
+ class="dragger">
+ </div>
+ </div>
+ <div class="opaque"></div>
+ </div>
+ </div>
+ </div>
+</template>
diff --git a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/swipe_viewer.vue b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/swipe_viewer.vue
new file mode 100644
index 00000000000..86366c799a2
--- /dev/null
+++ b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/swipe_viewer.vue
@@ -0,0 +1,158 @@
+<script>
+import _ from 'underscore';
+import { pixeliseValue } from '../../../lib/utils/dom_utils';
+import ImageViewer from '../../../content_viewer/viewers/image_viewer.vue';
+
+export default {
+ components: {
+ ImageViewer,
+ },
+ props: {
+ newPath: {
+ type: String,
+ required: true,
+ },
+ oldPath: {
+ type: String,
+ required: true,
+ },
+ projectPath: {
+ type: String,
+ required: false,
+ default: '',
+ },
+ },
+ data() {
+ return {
+ dragging: false,
+ swipeOldImgInfo: null,
+ swipeNewImgInfo: null,
+ swipeMaxWidth: undefined,
+ swipeMaxHeight: undefined,
+ swipeBarPos: 1,
+ swipeWrapWidth: undefined,
+ };
+ },
+ computed: {
+ swipeMaxPixelWidth() {
+ return pixeliseValue(this.swipeMaxWidth);
+ },
+ swipeMaxPixelHeight() {
+ return pixeliseValue(this.swipeMaxHeight);
+ },
+ swipeWrapPixelWidth() {
+ return pixeliseValue(this.swipeWrapWidth);
+ },
+ swipeBarPixelPos() {
+ return pixeliseValue(this.swipeBarPos);
+ },
+ },
+ beforeDestroy() {
+ window.removeEventListener('resize', this.resizeThrottled, false);
+ document.body.removeEventListener('mouseup', this.stopDrag);
+ document.body.removeEventListener('mousemove', this.dragMove);
+ },
+ mounted() {
+ window.addEventListener('resize', this.resize, false);
+ },
+ methods: {
+ dragMove(e) {
+ if (!this.dragging) return;
+
+ let leftValue = e.pageX - this.$refs.swipeFrame.getBoundingClientRect().left;
+ const spaceLeft = 20;
+ const { clientWidth } = this.$refs.swipeFrame;
+ if (leftValue <= 0) {
+ leftValue = 0;
+ } else if (leftValue > clientWidth - spaceLeft) {
+ leftValue = clientWidth - spaceLeft;
+ }
+
+ this.swipeWrapWidth = this.swipeMaxWidth - leftValue;
+ this.swipeBarPos = leftValue;
+ },
+ startDrag() {
+ this.dragging = true;
+ document.body.style.userSelect = 'none';
+ document.body.addEventListener('mousemove', this.dragMove);
+ },
+ stopDrag() {
+ this.dragging = false;
+ document.body.style.userSelect = '';
+ document.body.removeEventListener('mousemove', this.dragMove);
+ },
+ prepareSwipe() {
+ if (this.swipeOldImgInfo && this.swipeNewImgInfo) {
+ // Add 2 for border width
+ this.swipeMaxWidth =
+ Math.max(this.swipeOldImgInfo.renderedWidth, this.swipeNewImgInfo.renderedWidth) + 2;
+ this.swipeWrapWidth = this.swipeMaxWidth;
+ this.swipeMaxHeight =
+ Math.max(this.swipeOldImgInfo.renderedHeight, this.swipeNewImgInfo.renderedHeight) + 2;
+
+ document.body.addEventListener('mouseup', this.stopDrag);
+ }
+ },
+ swipeNewImgLoaded(imgInfo) {
+ this.swipeNewImgInfo = imgInfo;
+ this.prepareSwipe();
+ },
+ swipeOldImgLoaded(imgInfo) {
+ this.swipeOldImgInfo = imgInfo;
+ this.prepareSwipe();
+ },
+ resize: _.throttle(function throttledResize() {
+ this.swipeBarPos = 0;
+ }, 400),
+ },
+};
+</script>
+
+<template>
+ <div class="swipe view">
+ <div
+ ref="swipeFrame"
+ :style="{
+ 'width': swipeMaxPixelWidth,
+ 'height': swipeMaxPixelHeight,
+ }"
+ class="swipe-frame">
+ <div class="frame deleted">
+ <image-viewer
+ key="swipeOldImg"
+ ref="swipeOldImg"
+ :render-info="false"
+ :path="oldPath"
+ :project-path="projectPath"
+ @imgLoaded="swipeOldImgLoaded"
+ />
+ </div>
+ <div
+ ref="swipeWrap"
+ :style="{
+ 'width': swipeWrapPixelWidth,
+ 'height': swipeMaxPixelHeight,
+ }"
+ class="swipe-wrap">
+ <div class="frame added">
+ <image-viewer
+ key="swipeNewImg"
+ :render-info="false"
+ :path="newPath"
+ :project-path="projectPath"
+ @imgLoaded="swipeNewImgLoaded"
+ />
+ </div>
+ </div>
+ <span
+ ref="swipeBar"
+ :style="{ 'left': swipeBarPixelPos }"
+ class="swipe-bar"
+ @mousedown="startDrag"
+ @mouseup="stopDrag">
+ <span class="top-handle"></span>
+ <span class="bottom-handle"></span>
+ </span>
+ </div>
+ </div>
+</template>
diff --git a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/two_up_viewer.vue b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/two_up_viewer.vue
new file mode 100644
index 00000000000..9c19266ecdf
--- /dev/null
+++ b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/two_up_viewer.vue
@@ -0,0 +1,41 @@
+<script>
+import ImageViewer from '../../../content_viewer/viewers/image_viewer.vue';
+
+export default {
+ components: {
+ ImageViewer,
+ },
+ props: {
+ newPath: {
+ type: String,
+ required: true,
+ },
+ oldPath: {
+ type: String,
+ required: true,
+ },
+ projectPath: {
+ type: String,
+ required: false,
+ default: '',
+ },
+ },
+};
+</script>
+
+<template>
+ <div class="two-up view row">
+ <div class="col-sm-6 frame deleted">
+ <image-viewer
+ :path="oldPath"
+ :project-path="projectPath"
+ />
+ </div>
+ <div class="col-sm-6 frame added">
+ <image-viewer
+ :path="newPath"
+ :project-path="projectPath"
+ />
+ </div>
+ </div>
+</template>
diff --git a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer.vue b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer.vue
new file mode 100644
index 00000000000..1af85283277
--- /dev/null
+++ b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer.vue
@@ -0,0 +1,109 @@
+<script>
+import ImageViewer from '../../content_viewer/viewers/image_viewer.vue';
+import TwoUpViewer from './image_diff/two_up_viewer.vue';
+import SwipeViewer from './image_diff/swipe_viewer.vue';
+import OnionSkinViewer from './image_diff/onion_skin_viewer.vue';
+import { diffModes, imageViewMode } from '../constants';
+
+export default {
+ components: {
+ ImageViewer,
+ TwoUpViewer,
+ SwipeViewer,
+ OnionSkinViewer,
+ },
+ props: {
+ diffMode: {
+ type: String,
+ required: true,
+ },
+ newPath: {
+ type: String,
+ required: true,
+ },
+ oldPath: {
+ type: String,
+ required: true,
+ },
+ projectPath: {
+ type: String,
+ required: false,
+ default: '',
+ },
+ },
+ data() {
+ return {
+ mode: imageViewMode.twoup,
+ };
+ },
+ methods: {
+ changeMode(newMode) {
+ this.mode = newMode;
+ },
+ },
+ diffModes,
+ imageViewMode,
+};
+</script>
+
+<template>
+ <div class="diff-file-container">
+ <div
+ v-if="diffMode === $options.diffModes.replaced"
+ class="diff-viewer">
+ <div class="image js-replaced-image">
+ <two-up-viewer
+ v-if="mode === $options.imageViewMode.twoup"
+ v-bind="$props"/>
+ <swipe-viewer
+ v-else-if="mode === $options.imageViewMode.swipe"
+ v-bind="$props"/>
+ <onion-skin-viewer
+ v-else-if="mode === $options.imageViewMode.onion"
+ v-bind="$props"/>
+ </div>
+ <div class="view-modes">
+ <ul class="view-modes-menu">
+ <li
+ :class="{
+ active: mode === $options.imageViewMode.twoup
+ }"
+ @click="changeMode($options.imageViewMode.twoup)">
+ {{ s__('ImageDiffViewer|2-up') }}
+ </li>
+ <li
+ :class="{
+ active: mode === $options.imageViewMode.swipe
+ }"
+ @click="changeMode($options.imageViewMode.swipe)">
+ {{ s__('ImageDiffViewer|Swipe') }}
+ </li>
+ <li
+ :class="{
+ active: mode === $options.imageViewMode.onion
+ }"
+ @click="changeMode($options.imageViewMode.onion)">
+ {{ s__('ImageDiffViewer|Onion skin') }}
+ </li>
+ </ul>
+ </div>
+ <div class="note-container"></div>
+ </div>
+ <div
+ v-else-if="diffMode === $options.diffModes.new"
+ class="diff-viewer added">
+ <image-viewer
+ :path="newPath"
+ :project-path="projectPath"
+ />
+ </div>
+ <div
+ v-else
+ class="diff-viewer deleted">
+ <image-viewer
+ :path="oldPath"
+ :project-path="projectPath"
+ />
+ </div>
+ </div>
+</template>
diff --git a/app/assets/javascripts/vue_shared/components/dropdown/dropdown_button.vue b/app/assets/javascripts/vue_shared/components/dropdown/dropdown_button.vue
index c159333d89a..3cba0c5e633 100644
--- a/app/assets/javascripts/vue_shared/components/dropdown/dropdown_button.vue
+++ b/app/assets/javascripts/vue_shared/components/dropdown/dropdown_button.vue
@@ -28,11 +28,11 @@ export default {
<template>
<button
+ :disabled="isDisabled || isLoading"
class="dropdown-menu-toggle dropdown-menu-full-width"
type="button"
data-toggle="dropdown"
aria-expanded="false"
- :disabled="isDisabled || isLoading"
>
<loading-icon
v-show="isLoading"
@@ -42,8 +42,8 @@ export default {
{{ toggleText }}
</span>
<span
- class="dropdown-toggle-icon"
v-show="!isLoading"
+ class="dropdown-toggle-icon"
>
<i
class="fa fa-chevron-down"
diff --git a/app/assets/javascripts/vue_shared/components/dropdown/dropdown_hidden_input.vue b/app/assets/javascripts/vue_shared/components/dropdown/dropdown_hidden_input.vue
index 1fe27eb97ab..b7a4613bdd2 100644
--- a/app/assets/javascripts/vue_shared/components/dropdown/dropdown_hidden_input.vue
+++ b/app/assets/javascripts/vue_shared/components/dropdown/dropdown_hidden_input.vue
@@ -15,8 +15,8 @@ export default {
<template>
<input
- type="hidden"
:name="name"
:value="value"
+ type="hidden"
/>
</template>
diff --git a/app/assets/javascripts/vue_shared/components/dropdown/dropdown_search_input.vue b/app/assets/javascripts/vue_shared/components/dropdown/dropdown_search_input.vue
index c2145a26e64..7f1912f6405 100644
--- a/app/assets/javascripts/vue_shared/components/dropdown/dropdown_search_input.vue
+++ b/app/assets/javascripts/vue_shared/components/dropdown/dropdown_search_input.vue
@@ -23,10 +23,10 @@ export default {
<template>
<div class="dropdown-input">
<input
- class="dropdown-input-field"
- type="search"
v-model="searchQuery"
:placeholder="placeholderText"
+ class="dropdown-input-field"
+ type="search"
autocomplete="off"
/>
<i
diff --git a/app/assets/javascripts/vue_shared/components/expand_button.vue b/app/assets/javascripts/vue_shared/components/expand_button.vue
index 9295be3e2b2..0fdea651130 100644
--- a/app/assets/javascripts/vue_shared/components/expand_button.vue
+++ b/app/assets/javascripts/vue_shared/components/expand_button.vue
@@ -32,10 +32,10 @@ export default {
<template>
<span>
<button
- type="button"
v-show="isCollapsed"
- class="text-expander btn-blank"
:aria-label="ariaLabel"
+ type="button"
+ class="text-expander btn-blank"
@click="onClick">
...
</button>
diff --git a/app/assets/javascripts/vue_shared/components/file_icon.vue b/app/assets/javascripts/vue_shared/components/file_icon.vue
index be2755452e2..878c805ada5 100644
--- a/app/assets/javascripts/vue_shared/components/file_icon.vue
+++ b/app/assets/javascripts/vue_shared/components/file_icon.vue
@@ -73,8 +73,8 @@ export default {
<template>
<span>
<svg
- :class="[iconSizeClass, cssClasses]"
v-if="!loading && !folder"
+ :class="[iconSizeClass, cssClasses]"
>
<use v-bind="{ 'xlink:href':spriteHref }" />
</svg>
diff --git a/app/assets/javascripts/vue_shared/components/gl_modal.vue b/app/assets/javascripts/vue_shared/components/gl_modal.vue
index 7ba58bd5959..c03a342e777 100644
--- a/app/assets/javascripts/vue_shared/components/gl_modal.vue
+++ b/app/assets/javascripts/vue_shared/components/gl_modal.vue
@@ -57,8 +57,8 @@ export default {
role="dialog"
>
<div
- class="modal-dialog"
:class="modalSizeClass"
+ class="modal-dialog"
role="document"
>
<div class="modal-content">
@@ -70,10 +70,10 @@ export default {
</slot>
</h4>
<button
+ :aria-label="s__('Modal|Close')"
type="button"
class="close js-modal-close-action"
data-dismiss="modal"
- :aria-label="s__('Modal|Close')"
@click="emitCancel($event)"
>
<span aria-hidden="true">&times;</span>
@@ -96,9 +96,9 @@ export default {
{{ s__('Modal|Cancel') }}
</button>
<button
+ :class="`btn-${footerPrimaryButtonVariant}`"
type="button"
class="btn js-modal-primary-action"
- :class="`btn-${footerPrimaryButtonVariant}`"
data-dismiss="modal"
@click="emitSubmit($event)"
>
diff --git a/app/assets/javascripts/vue_shared/components/header_ci_component.vue b/app/assets/javascripts/vue_shared/components/header_ci_component.vue
index ca17fa06a00..62d35f6547d 100644
--- a/app/assets/javascripts/vue_shared/components/header_ci_component.vue
+++ b/app/assets/javascripts/vue_shared/components/header_ci_component.vue
@@ -117,8 +117,8 @@ export default {
</section>
<section
- class="header-action-buttons"
v-if="actions.length"
+ class="header-action-buttons"
>
<template
v-for="(action, i) in actions"
@@ -135,21 +135,21 @@ export default {
<a
v-else-if="action.type === 'ujs-link'"
:href="action.path"
- data-method="post"
- rel="nofollow"
:class="action.cssClass"
:key="i"
+ data-method="post"
+ rel="nofollow"
>
{{ action.label }}
</a>
<button
v-else-if="action.type === 'button'"
- @click="onClickAction(action)"
:disabled="action.isLoading"
:class="action.cssClass"
- type="button"
:key="i"
+ type="button"
+ @click="onClickAction(action)"
>
{{ action.label }}
<i
@@ -162,11 +162,11 @@ export default {
</template>
<button
v-if="hasSidebarButton"
+ id="toggleSidebar"
type="button"
class="btn btn-default d-block d-sm-none d-md-none
sidebar-toggle-btn js-sidebar-build-toggle js-sidebar-build-toggle-header"
aria-label="Toggle Sidebar"
- id="toggleSidebar"
>
<i
class="fa fa-angle-double-left"
diff --git a/app/assets/javascripts/vue_shared/components/identicon.vue b/app/assets/javascripts/vue_shared/components/identicon.vue
index 23010f40f26..4ffc811e714 100644
--- a/app/assets/javascripts/vue_shared/components/identicon.vue
+++ b/app/assets/javascripts/vue_shared/components/identicon.vue
@@ -43,9 +43,9 @@ export default {
<template>
<div
- class="avatar identicon"
:class="sizeClass"
- :style="identiconStyles">
+ :style="identiconStyles"
+ class="avatar identicon">
{{ identiconTitle }}
</div>
</template>
diff --git a/app/assets/javascripts/vue_shared/components/issue/issue_warning.vue b/app/assets/javascripts/vue_shared/components/issue/issue_warning.vue
index 3d39b3ab173..ca8ce554588 100644
--- a/app/assets/javascripts/vue_shared/components/issue/issue_warning.vue
+++ b/app/assets/javascripts/vue_shared/components/issue/issue_warning.vue
@@ -33,11 +33,11 @@
<template>
<div class="issuable-note-warning">
<icon
+ v-if="!isLockedAndConfidential"
:name="warningIcon"
:size="16"
class="icon inline"
aria-hidden="true"
- v-if="!isLockedAndConfidential"
/>
<span v-if="isLockedAndConfidential">
diff --git a/app/assets/javascripts/vue_shared/components/lib/utils/dom_utils.js b/app/assets/javascripts/vue_shared/components/lib/utils/dom_utils.js
new file mode 100644
index 00000000000..02f28da8bb0
--- /dev/null
+++ b/app/assets/javascripts/vue_shared/components/lib/utils/dom_utils.js
@@ -0,0 +1,5 @@
+export function pixeliseValue(val) {
+ return val ? `${val}px` : '';
+}
+
+export default {};
diff --git a/app/assets/javascripts/vue_shared/components/loading_button.vue b/app/assets/javascripts/vue_shared/components/loading_button.vue
index 88c13a1f340..2ff0c056b9c 100644
--- a/app/assets/javascripts/vue_shared/components/loading_button.vue
+++ b/app/assets/javascripts/vue_shared/components/loading_button.vue
@@ -54,19 +54,19 @@
<template>
<button
- @click="onClick"
- type="button"
:class="containerClass"
:disabled="loading || disabled"
+ type="button"
+ @click="onClick"
>
<transition name="fade">
<loading-icon
v-if="loading"
:inline="true"
- class="js-loading-button-icon"
:class="{
'append-right-5': label
}"
+ class="js-loading-button-icon"
/>
</transition>
<transition name="fade">
diff --git a/app/assets/javascripts/vue_shared/components/loading_icon.vue b/app/assets/javascripts/vue_shared/components/loading_icon.vue
index 12a75e016d7..db22c5f02cd 100644
--- a/app/assets/javascripts/vue_shared/components/loading_icon.vue
+++ b/app/assets/javascripts/vue_shared/components/loading_icon.vue
@@ -35,10 +35,10 @@
:is="rootElementType"
class="loading-container text-center">
<i
- class="fa fa-spin fa-spinner"
:class="cssClass"
- aria-hidden="true"
:aria-label="label"
+ class="fa fa-spin fa-spinner"
+ aria-hidden="true"
>
</i>
</component>
diff --git a/app/assets/javascripts/vue_shared/components/markdown/field.vue b/app/assets/javascripts/vue_shared/components/markdown/field.vue
index 12c7d125062..05e8ed2da2c 100644
--- a/app/assets/javascripts/vue_shared/components/markdown/field.vue
+++ b/app/assets/javascripts/vue_shared/components/markdown/field.vue
@@ -117,17 +117,17 @@
<template>
<div
- class="md-area js-vue-markdown-field"
+ ref="gl-form"
:class="{ 'prepend-top-default append-bottom-default': addSpacingClasses }"
- ref="gl-form">
+ class="md-area js-vue-markdown-field">
<markdown-header
:preview-markdown="previewMarkdown"
@preview-markdown="showPreviewTab"
@write-markdown="showWriteTab"
/>
<div
- class="md-write-holder"
v-show="!previewMarkdown"
+ class="md-write-holder"
>
<div class="zen-backdrop">
<slot name="textarea"></slot>
@@ -137,8 +137,8 @@
aria-label="Enter zen mode"
>
<icon
- name="screen-normal"
:size="32"
+ name="screen-normal"
/>
</a>
<markdown-toolbar
@@ -149,8 +149,8 @@
</div>
</div>
<div
- class="md md-preview-holder md-preview"
v-show="previewMarkdown"
+ class="md md-preview-holder md-preview"
>
<div
ref="markdown-preview"
@@ -164,8 +164,8 @@
<template v-if="previewMarkdown && !markdownPreviewLoading">
<div
v-if="referencedCommands"
- v-html="referencedCommands"
class="referenced-commands"
+ v-html="referencedCommands"
>
</div>
<div
diff --git a/app/assets/javascripts/vue_shared/components/markdown/header.vue b/app/assets/javascripts/vue_shared/components/markdown/header.vue
index db453c30576..ee3628b1e3f 100644
--- a/app/assets/javascripts/vue_shared/components/markdown/header.vue
+++ b/app/assets/javascripts/vue_shared/components/markdown/header.vue
@@ -54,8 +54,8 @@
<div class="md-header">
<ul class="nav-links clearfix">
<li
- class="md-header-tab"
:class="{ active: !previewMarkdown }"
+ class="md-header-tab"
>
<a
class="js-write-link"
@@ -67,8 +67,8 @@
</a>
</li>
<li
- class="md-header-tab"
:class="{ active: previewMarkdown }"
+ class="md-header-tab"
>
<a
class="js-preview-link"
@@ -80,8 +80,8 @@
</a>
</li>
<li
- class="md-header-toolbar"
:class="{ active: !previewMarkdown }"
+ class="md-header-toolbar"
>
<toolbar-button
tag="**"
@@ -94,8 +94,8 @@
icon="italic"
/>
<toolbar-button
- tag="> "
:prepend="true"
+ tag="> "
button-title="Insert a quote"
icon="quote"
/>
@@ -106,20 +106,20 @@
icon="code"
/>
<toolbar-button
- tag="* "
:prepend="true"
+ tag="* "
button-title="Add a bullet list"
icon="list-bulleted"
/>
<toolbar-button
- tag="1. "
:prepend="true"
+ tag="1. "
button-title="Add a numbered list"
icon="list-numbered"
/>
<toolbar-button
- tag="* [ ] "
:prepend="true"
+ tag="* [ ] "
button-title="Add a task list"
icon="task-done"
/>
diff --git a/app/assets/javascripts/vue_shared/components/markdown/toolbar_button.vue b/app/assets/javascripts/vue_shared/components/markdown/toolbar_button.vue
index 2d2d69ebeb2..9f1e009efdd 100644
--- a/app/assets/javascripts/vue_shared/components/markdown/toolbar_button.vue
+++ b/app/assets/javascripts/vue_shared/components/markdown/toolbar_button.vue
@@ -39,15 +39,15 @@
<template>
<button
v-tooltip
- type="button"
- class="toolbar-btn js-md"
- tabindex="-1"
- data-container="body"
:data-md-tag="tag"
:data-md-block="tagBlock"
:data-md-prepend="prepend"
:title="buttonTitle"
:aria-label="buttonTitle"
+ type="button"
+ class="toolbar-btn js-md"
+ tabindex="-1"
+ data-container="body"
>
<icon
:name="icon"
diff --git a/app/assets/javascripts/vue_shared/components/memory_graph.vue b/app/assets/javascripts/vue_shared/components/memory_graph.vue
index b07f6b07afe..522091ea889 100644
--- a/app/assets/javascripts/vue_shared/components/memory_graph.vue
+++ b/app/assets/javascripts/vue_shared/components/memory_graph.vue
@@ -113,19 +113,19 @@ export default {
<template>
<div class="memory-graph-container">
<svg
- class="has-tooltip"
:title="getFormattedMedian"
:width="width"
:height="height"
+ class="has-tooltip"
xmlns="http://www.w3.org/2000/svg">
<path
:d="pathD"
:viewBox="pathViewBox"
/>
<circle
- r="1.5"
:cx="dotX"
:cy="dotY"
+ r="1.5"
tranform="translate(0 -1)"
/>
</svg>
diff --git a/app/assets/javascripts/vue_shared/components/navigation_tabs.vue b/app/assets/javascripts/vue_shared/components/navigation_tabs.vue
index 08d4936f480..99d61b5639d 100644
--- a/app/assets/javascripts/vue_shared/components/navigation_tabs.vue
+++ b/app/assets/javascripts/vue_shared/components/navigation_tabs.vue
@@ -59,9 +59,9 @@ export default {
}"
>
<a
+ :class="`js-${scope}-tab-${tab.scope}`"
role="button"
@click="onTabClick(tab)"
- :class="`js-${scope}-tab-${tab.scope}`"
>
{{ tab.name }}
diff --git a/app/assets/javascripts/vue_shared/components/panel_resizer.vue b/app/assets/javascripts/vue_shared/components/panel_resizer.vue
index abbe9a22717..8c2dcc2d902 100644
--- a/app/assets/javascripts/vue_shared/components/panel_resizer.vue
+++ b/app/assets/javascripts/vue_shared/components/panel_resizer.vue
@@ -82,9 +82,9 @@
<template>
<div
- class="dragHandle"
:class="className"
:style="cursorStyle"
+ class="dragHandle"
@mousedown="startDrag"
@dblclick="resetSize"
></div>
diff --git a/app/assets/javascripts/vue_shared/components/project_avatar/image.vue b/app/assets/javascripts/vue_shared/components/project_avatar/image.vue
index 279cc1de5bb..97ca4d93bd7 100644
--- a/app/assets/javascripts/vue_shared/components/project_avatar/image.vue
+++ b/app/assets/javascripts/vue_shared/components/project_avatar/image.vue
@@ -85,7 +85,6 @@
<template>
<img
v-tooltip
- class="avatar"
:class="{
lazy: lazy,
[avatarSizeClass]: true,
@@ -99,5 +98,6 @@
:data-container="tooltipContainer"
:data-placement="tooltipPlacement"
:title="tooltipText"
+ class="avatar"
/>
</template>
diff --git a/app/assets/javascripts/vue_shared/components/recaptcha_modal.vue b/app/assets/javascripts/vue_shared/components/recaptcha_modal.vue
index 21ffdc1dc86..a2a9a5e6987 100644
--- a/app/assets/javascripts/vue_shared/components/recaptcha_modal.vue
+++ b/app/assets/javascripts/vue_shared/components/recaptcha_modal.vue
@@ -66,10 +66,10 @@
<template>
<deprecated-modal
- kind="warning"
- class="recaptcha-modal js-recaptcha-modal"
:hide-footer="true"
:title="__('Please solve the reCAPTCHA')"
+ kind="warning"
+ class="recaptcha-modal js-recaptcha-modal"
@cancel="close"
>
<div slot="body">
diff --git a/app/assets/javascripts/vue_shared/components/sidebar/date_picker.vue b/app/assets/javascripts/vue_shared/components/sidebar/date_picker.vue
index 71ec34f2c7a..74998a4787d 100644
--- a/app/assets/javascripts/vue_shared/components/sidebar/date_picker.vue
+++ b/app/assets/javascripts/vue_shared/components/sidebar/date_picker.vue
@@ -97,8 +97,8 @@
<template>
<div
- class="block"
:class="blockClass"
+ class="block"
>
<div class="issuable-sidebar-header">
<toggle-sidebar
@@ -107,8 +107,8 @@
/>
</div>
<collapsed-calendar-icon
- class="sidebar-collapsed-icon"
:text="collapsedText"
+ class="sidebar-collapsed-icon"
/>
<div class="title">
{{ label }}
diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/base.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/base.vue
index f155ac2be02..a3fc358130f 100644
--- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/base.vue
+++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/base.vue
@@ -143,8 +143,8 @@ export default {
:value="label.id"
/>
<div
- class="dropdown"
ref="dropdown"
+ class="dropdown"
>
<dropdown-button
:ability-name="abilityName"
diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_button.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_button.vue
index 47497c1de98..48d2f16f554 100644
--- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_button.vue
+++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_button.vue
@@ -53,10 +53,7 @@ export default {
<template>
<button
- type="button"
ref="dropdownButton"
- class="dropdown-menu-toggle wide js-label-select js-multiselect js-context-config-modal"
- data-toggle="dropdown"
:class="{ 'js-extra-options': showExtraOptions }"
:data-ability-name="abilityName"
:data-field-name="fieldName"
@@ -64,6 +61,9 @@ export default {
:data-labels="labelsPath"
:data-namespace-path="namespace"
:data-show-any="showExtraOptions"
+ type="button"
+ class="dropdown-menu-toggle wide js-label-select js-multiselect js-context-config-modal"
+ data-toggle="dropdown"
>
<span class="dropdown-toggle-text">
{{ dropdownToggleText }}
diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_create_label.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_create_label.vue
index 3c400afdc1d..fe895136ccc 100644
--- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_create_label.vue
+++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_create_label.vue
@@ -19,9 +19,9 @@ export default {
<div class="dropdown-page-two dropdown-new-label">
<div class="dropdown-title">
<button
+ :aria-label="__('Go back')"
type="button"
class="dropdown-title-button dropdown-menu-back"
- :aria-label="__('Go back')"
>
<i
aria-hidden="true"
@@ -32,9 +32,9 @@ export default {
</button>
{{ headerTitle }}
<button
+ :aria-label="__('Close')"
type="button"
class="dropdown-title-button dropdown-menu-close"
- :aria-label="__('Close')"
>
<i
aria-hidden="true"
@@ -48,19 +48,19 @@ export default {
<div class="dropdown-labels-error js-label-error"></div>
<input
id="new_label_name"
+ :placeholder="__('Name new label')"
type="text"
class="default-dropdown-input"
- :placeholder="__('Name new label')"
/>
<div class="suggest-colors suggest-colors-dropdown">
<a
v-for="(color, index) in suggestedColors"
- href="#"
:key="index"
:data-color="color"
:style="{
backgroundColor: color,
}"
+ href="#"
>
&nbsp;
</a>
@@ -69,9 +69,9 @@ export default {
<div class="dropdown-label-color-preview js-dropdown-label-color-preview"></div>
<input
id="new_label_color"
+ :placeholder="__('Assign custom color like #FF0000')"
type="text"
class="default-dropdown-input"
- :placeholder="__('Assign custom color like #FF0000')"
/>
</div>
<div class="clearfix">
diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_footer.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_footer.vue
index 5f61e9fbe80..d64ad016f9b 100644
--- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_footer.vue
+++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_footer.vue
@@ -34,9 +34,9 @@ export default {
</li>
<li>
<a
+ :href="labelsWebUrl"
data-is-link="true"
class="dropdown-external-link"
- :href="labelsWebUrl"
>
{{ manageLabelsTitle }}
</a>
diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header.vue
index 7664acdf19c..e98b6392827 100644
--- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header.vue
+++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header.vue
@@ -6,9 +6,9 @@ export default {};
<div class="dropdown-title">
<span>{{ __('Assign labels') }}</span>
<button
+ :aria-label="__('Close')"
type="button"
class="dropdown-title-button dropdown-menu-close"
- :aria-label="__('Close')"
>
<i
aria-hidden="true"
diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_search_input.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_search_input.vue
index ae633460c95..80d65a2a534 100644
--- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_search_input.vue
+++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_search_input.vue
@@ -5,10 +5,10 @@ export default {};
<template>
<div class="dropdown-input">
<input
+ :placeholder="__('Search')"
autocomplete="off"
class="dropdown-input-field"
type="search"
- :placeholder="__('Search')"
/>
<i
aria-hidden="true"
diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value.vue
index 88360b46f24..10e990f8a80 100644
--- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value.vue
+++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value.vue
@@ -36,10 +36,10 @@ export default {
<template>
<div
- class="hide-collapsed value issuable-show-labels js-value"
:class="{
'has-labels':!isEmpty,
}"
+ class="hide-collapsed value issuable-show-labels js-value"
>
<span
v-if="isEmpty"
@@ -48,18 +48,18 @@ export default {
<slot>{{ __('None') }}</slot>
</span>
<a
- v-else
v-for="label in labels"
+ v-else
:key="label.id"
:href="labelFilterUrl(label)"
>
<span
v-tooltip
+ :style="labelStyle(label)"
+ :title="label.description"
class="badge color-label"
data-placement="bottom"
data-container="body"
- :style="labelStyle(label)"
- :title="label.description"
>
{{ label.title }}
</span>
diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed.vue
index 68fa2ab8d01..af297f3c408 100644
--- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed.vue
+++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed.vue
@@ -37,10 +37,10 @@ export default {
<template>
<div
v-tooltip
+ :title="labelsList"
class="sidebar-collapsed-icon"
data-placement="left"
data-container="body"
- :title="labelsList"
@click="handleClick"
>
<i
diff --git a/app/assets/javascripts/vue_shared/components/sidebar/toggle_sidebar.vue b/app/assets/javascripts/vue_shared/components/sidebar/toggle_sidebar.vue
index de6f8c32e74..ac2e99abe77 100644
--- a/app/assets/javascripts/vue_shared/components/sidebar/toggle_sidebar.vue
+++ b/app/assets/javascripts/vue_shared/components/sidebar/toggle_sidebar.vue
@@ -28,21 +28,21 @@ export default {
<template>
<button
+ v-tooltip
+ :title="tooltipLabel"
type="button"
class="btn btn-blank gutter-toggle btn-sidebar-action"
- @click="toggle"
- v-tooltip
data-container="body"
data-placement="left"
- :title="tooltipLabel"
+ @click="toggle"
>
<i
- aria-label="toggle collapse"
- class="fa"
:class="{
'fa-angle-double-right': !collapsed,
'fa-angle-double-left': collapsed
}"
+ aria-label="toggle collapse"
+ class="fa"
>
</i>
</button>
diff --git a/app/assets/javascripts/vue_shared/components/skeleton_loading_container.vue b/app/assets/javascripts/vue_shared/components/skeleton_loading_container.vue
index 16304e4815d..4a5ffbe5d5a 100644
--- a/app/assets/javascripts/vue_shared/components/skeleton_loading_container.vue
+++ b/app/assets/javascripts/vue_shared/components/skeleton_loading_container.vue
@@ -22,10 +22,10 @@
<template>
<div
- class="animation-container"
:class="{
'animation-container-small': small,
}"
+ class="animation-container"
>
<div
v-for="(css, index) in lineClasses"
diff --git a/app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue b/app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue
index 86f06c8d266..b1c2df54ef6 100644
--- a/app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue
+++ b/app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue
@@ -84,8 +84,8 @@ export default {
<template>
<div
- class="stacked-progress-bar"
:class="cssClass"
+ class="stacked-progress-bar"
>
<span
v-if="!totalCount"
@@ -96,30 +96,30 @@ export default {
<span
v-tooltip
v-if="successPercent"
- class="status-green"
- data-placement="bottom"
:title="successTooltip"
:style="successBarStyle"
+ class="status-green"
+ data-placement="bottom"
>
{{ successPercent }}%
</span>
<span
v-tooltip
v-if="neutralPercent"
- class="status-neutral"
- data-placement="bottom"
:title="neutralTooltip"
:style="neutralBarStyle"
+ class="status-neutral"
+ data-placement="bottom"
>
{{ neutralPercent }}%
</span>
<span
v-tooltip
v-if="failurePercent"
- class="status-red"
- data-placement="bottom"
:title="failureTooltip"
:style="failureBarStyle"
+ class="status-red"
+ data-placement="bottom"
>
{{ failurePercent }}%
</span>
diff --git a/app/assets/javascripts/vue_shared/components/table_pagination.vue b/app/assets/javascripts/vue_shared/components/table_pagination.vue
index 6f231619f26..2370e59d017 100644
--- a/app/assets/javascripts/vue_shared/components/table_pagination.vue
+++ b/app/assets/javascripts/vue_shared/components/table_pagination.vue
@@ -153,8 +153,8 @@
class="page-item"
>
<a
- @click.prevent="changePage(item.title, item.disabled)"
class="page-link"
+ @click.prevent="changePage(item.title, item.disabled)"
>
{{ item.title }}
</a>
diff --git a/app/assets/javascripts/vue_shared/components/tabs/tab.vue b/app/assets/javascripts/vue_shared/components/tabs/tab.vue
index 9b2f46186ac..1c6011dcfd0 100644
--- a/app/assets/javascripts/vue_shared/components/tabs/tab.vue
+++ b/app/assets/javascripts/vue_shared/components/tabs/tab.vue
@@ -36,10 +36,10 @@ export default {
<template>
<div
- class="tab-pane"
:class="{
active: localActive
}"
+ class="tab-pane"
role="tabpanel"
>
<slot></slot>
diff --git a/app/assets/javascripts/vue_shared/components/toggle_button.vue b/app/assets/javascripts/vue_shared/components/toggle_button.vue
index 09031d3ffa1..a897300b62b 100644
--- a/app/assets/javascripts/vue_shared/components/toggle_button.vue
+++ b/app/assets/javascripts/vue_shared/components/toggle_button.vue
@@ -63,26 +63,26 @@
<label class="toggle-wrapper">
<input
v-if="name"
- type="hidden"
:name="name"
:value="value"
+ type="hidden"
/>
<button
- type="button"
- class="project-feature-toggle"
:aria-label="ariaLabel"
:class="{
'is-checked': value,
'is-disabled': disabledInput,
'is-loading': isLoading
}"
+ type="button"
+ class="project-feature-toggle"
@click="toggleFeature"
>
<loadingIcon class="loading-icon" />
<span class="toggle-icon">
<icon
- css-classes="toggle-icon-svg"
- :name="toggleIcon"/>
+ :name="toggleIcon"
+ css-classes="toggle-icon-svg"/>
</span>
</button>
</label>
diff --git a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue
index cc9cc46bb4c..3a413c74410 100644
--- a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue
+++ b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue
@@ -85,7 +85,6 @@ export default {
<template>
<img
v-tooltip
- class="avatar"
:class="{
lazy: lazy,
[avatarSizeClass]: true,
@@ -99,5 +98,7 @@ export default {
:data-container="tooltipContainer"
:data-placement="tooltipPlacement"
:title="tooltipText"
+ class="avatar"
+ data-boundary="window"
/>
</template>
diff --git a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_link.vue b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_link.vue
index 6955d164def..01c36fec41a 100644
--- a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_link.vue
+++ b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_link.vue
@@ -84,8 +84,8 @@ export default {
<template>
<a
- class="user-avatar-link"
- :href="linkHref">
+ :href="linkHref"
+ class="user-avatar-link">
<user-avatar-image
:img-src="imgSrc"
:img-alt="imgAlt"
@@ -94,8 +94,8 @@ export default {
:tooltip-text="avatarTooltipText"
:tooltip-placement="tooltipPlacement"
/><span
- v-if="shouldShowUsername"
v-tooltip
+ v-if="shouldShowUsername"
:title="tooltipText"
:tooltip-placement="tooltipPlacement"
>{{ username }}</span>
diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss
index f77ec4b6a2c..f060254777c 100644
--- a/app/assets/stylesheets/framework/files.scss
+++ b/app/assets/stylesheets/framework/files.scss
@@ -400,3 +400,51 @@ span.idiff {
color: $common-gray-light;
border: 1px solid $common-gray-light;
}
+
+.preview-container {
+ height: 100%;
+ overflow: auto;
+
+ .file-container {
+ background-color: $gray-darker;
+ display: flex;
+ height: 100%;
+ align-items: center;
+ justify-content: center;
+
+ text-align: center;
+
+ .file-content {
+ padding: $gl-padding;
+ max-width: 100%;
+ max-height: 100%;
+
+ img {
+ max-width: 90%;
+ max-height: 70vh;
+ }
+
+ .is-zoomable {
+ cursor: pointer;
+ cursor: zoom-in;
+
+ &.is-zoomed {
+ cursor: pointer;
+ cursor: zoom-out;
+ max-width: none;
+ max-height: none;
+ margin-right: $gl-padding;
+ }
+ }
+ }
+
+ .file-info {
+ font-size: $label-font-size;
+ color: $diff-image-info-color;
+ }
+ }
+
+ .md-previewer {
+ padding: $gl-padding;
+ }
+}
diff --git a/app/assets/stylesheets/framework/mixins.scss b/app/assets/stylesheets/framework/mixins.scss
index d76cf8f8182..0b645eb811b 100644
--- a/app/assets/stylesheets/framework/mixins.scss
+++ b/app/assets/stylesheets/framework/mixins.scss
@@ -186,6 +186,7 @@
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
display: flex;
+ flex-wrap: nowrap;
&::-webkit-scrollbar {
display: none;
diff --git a/app/assets/stylesheets/framework/secondary_navigation_elements.scss b/app/assets/stylesheets/framework/secondary_navigation_elements.scss
index 847fc8c0792..4e2cc498883 100644
--- a/app/assets/stylesheets/framework/secondary_navigation_elements.scss
+++ b/app/assets/stylesheets/framework/secondary_navigation_elements.scss
@@ -230,6 +230,8 @@
}
.scrolling-tabs-container {
+ position: relative;
+
.merge-request-tabs-container & {
overflow: hidden;
}
diff --git a/app/assets/stylesheets/framework/tables.scss b/app/assets/stylesheets/framework/tables.scss
index ba9de6941ac..339388392df 100644
--- a/app/assets/stylesheets/framework/tables.scss
+++ b/app/assets/stylesheets/framework/tables.scss
@@ -58,7 +58,7 @@ table {
display: none;
}
- table,
+ &,
tbody,
td {
display: block;
diff --git a/app/assets/stylesheets/pages/boards.scss b/app/assets/stylesheets/pages/boards.scss
index b2416a3d5bc..7c1d1626f1c 100644
--- a/app/assets/stylesheets/pages/boards.scss
+++ b/app/assets/stylesheets/pages/boards.scss
@@ -80,6 +80,7 @@
overflow-x: scroll;
white-space: nowrap;
min-height: 200px;
+ display: flex;
@include media-breakpoint-only(sm) {
height: calc(100vh - #{$issue-board-list-difference-sm});
@@ -110,17 +111,15 @@
.board {
display: inline-block;
- width: calc(85vw - 15px);
+ flex: 1;
+ min-width: 300px;
+ max-width: 400px;
height: 100%;
padding-right: ($gl-padding / 2);
padding-left: ($gl-padding / 2);
white-space: normal;
vertical-align: top;
- @include media-breakpoint-up(sm) {
- width: 400px;
- }
-
&.is-expandable {
.board-header {
cursor: pointer;
@@ -128,6 +127,8 @@
}
&.is-collapsed {
+ flex: none;
+ min-width: 0;
width: 50px;
.board-header {
diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss
index f06c9dcdf8c..fbc97ec0c95 100644
--- a/app/assets/stylesheets/pages/diff.scss
+++ b/app/assets/stylesheets/pages/diff.scss
@@ -189,8 +189,22 @@
img {
border: 1px solid $white-light;
- background-image: linear-gradient(45deg, $border-color 25%, transparent 25%, transparent 75%, $border-color 75%, $border-color 100%),
- linear-gradient(45deg, $border-color 25%, transparent 25%, transparent 75%, $border-color 75%, $border-color 100%);
+ background-image: linear-gradient(
+ 45deg,
+ $border-color 25%,
+ transparent 25%,
+ transparent 75%,
+ $border-color 75%,
+ $border-color 100%
+ ),
+ linear-gradient(
+ 45deg,
+ $border-color 25%,
+ transparent 25%,
+ transparent 75%,
+ $border-color 75%,
+ $border-color 100%
+ );
background-size: 10px 10px;
background-position: 0 0, 5px 5px;
max-width: 100%;
@@ -395,6 +409,69 @@
.line_content {
white-space: pre-wrap;
}
+
+ .diff-file-container {
+ .frame.deleted {
+ border: 0;
+ background-color: inherit;
+
+ .image_file img {
+ border: 1px solid $deleted;
+ }
+ }
+
+ .frame.added {
+ border: 0;
+ background-color: inherit;
+
+ .image_file img {
+ border: 1px solid $added;
+ }
+ }
+
+ .swipe.view,
+ .onion-skin.view {
+ .swipe-wrap {
+ top: 0;
+ right: 0;
+ }
+
+ .frame.deleted {
+ top: 0;
+ right: 0;
+ }
+
+ .swipe-bar {
+ top: 0;
+
+ .top-handle {
+ top: -14px;
+ left: -7px;
+ }
+
+ .bottom-handle {
+ bottom: -14px;
+ left: -7px;
+ }
+ }
+
+ .file-container {
+ display: inline-block;
+
+ .file-content {
+ padding: 0;
+
+ img {
+ max-width: none;
+ }
+ }
+ }
+ }
+
+ .onion-skin.view .controls {
+ bottom: -25px;
+ }
+ }
}
.file-content .diff-file {
@@ -536,7 +613,7 @@
margin-right: 0;
border-color: $white-light;
cursor: pointer;
- transition: all .1s ease-out;
+ transition: all 0.1s ease-out;
@for $i from 1 through 4 {
&:nth-child(#{$i}) {
@@ -563,7 +640,7 @@
height: 24px;
border-radius: 50%;
padding: 0;
- transition: transform .1s ease-out;
+ transition: transform 0.1s ease-out;
z-index: 100;
.collapse-icon {
@@ -708,11 +785,35 @@
width: 100%;
height: 10px;
background-color: $white-light;
- background-image: linear-gradient(45deg, transparent, transparent 73%, $diff-jagged-border-gradient-color 75%, $white-light 80%),
- linear-gradient(225deg, transparent, transparent 73%, $diff-jagged-border-gradient-color 75%, $white-light 80%),
- linear-gradient(135deg, transparent, transparent 73%, $diff-jagged-border-gradient-color 75%, $white-light 80%),
- linear-gradient(-45deg, transparent, transparent 73%, $diff-jagged-border-gradient-color 75%, $white-light 80%);
- background-position: 5px 5px,0 5px,0 5px,5px 5px;
+ background-image: linear-gradient(
+ 45deg,
+ transparent,
+ transparent 73%,
+ $diff-jagged-border-gradient-color 75%,
+ $white-light 80%
+ ),
+ linear-gradient(
+ 225deg,
+ transparent,
+ transparent 73%,
+ $diff-jagged-border-gradient-color 75%,
+ $white-light 80%
+ ),
+ linear-gradient(
+ 135deg,
+ transparent,
+ transparent 73%,
+ $diff-jagged-border-gradient-color 75%,
+ $white-light 80%
+ ),
+ linear-gradient(
+ -45deg,
+ transparent,
+ transparent 73%,
+ $diff-jagged-border-gradient-color 75%,
+ $white-light 80%
+ );
+ background-position: 5px 5px, 0 5px, 0 5px, 5px 5px;
background-size: 10px 10px;
background-repeat: repeat;
}
@@ -750,11 +851,16 @@
.frame.click-to-comment {
position: relative;
cursor: image-url('illustrations/image_comment_light_cursor.svg')
- $image-comment-cursor-left-offset $image-comment-cursor-top-offset, auto;
+ $image-comment-cursor-left-offset $image-comment-cursor-top-offset,
+ auto;
// Retina cursor
- cursor: -webkit-image-set(image-url('illustrations/image_comment_light_cursor.svg') 1x, image-url('illustrations/image_comment_light_cursor@2x.svg') 2x)
- $image-comment-cursor-left-offset $image-comment-cursor-top-offset, auto;
+ cursor: -webkit-image-set(
+ image-url('illustrations/image_comment_light_cursor.svg') 1x,
+ image-url('illustrations/image_comment_light_cursor@2x.svg') 2x
+ )
+ $image-comment-cursor-left-offset $image-comment-cursor-top-offset,
+ auto;
.comment-indicator {
position: absolute;
@@ -840,7 +946,7 @@
.diff-notes-collapse,
.note,
- .discussion-reply-holder, {
+ .discussion-reply-holder {
display: none;
}
diff --git a/app/assets/stylesheets/pages/members.scss b/app/assets/stylesheets/pages/members.scss
index 9914555d309..5fdb2b4a90a 100644
--- a/app/assets/stylesheets/pages/members.scss
+++ b/app/assets/stylesheets/pages/members.scss
@@ -121,10 +121,6 @@
background: transparent;
border: 0;
outline: 0;
-
- @include media-breakpoint-up(sm) {
- right: 160px;
- }
}
.flex-project-members-panel {
diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss
index 9eceb3e9a33..f50ca677800 100644
--- a/app/assets/stylesheets/pages/merge_requests.scss
+++ b/app/assets/stylesheets/pages/merge_requests.scss
@@ -678,6 +678,7 @@
.merge-request-tabs {
display: flex;
+ flex-wrap: nowrap;
margin-bottom: 0;
padding: 0;
}
diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss
index 22964163e95..caafda5fb05 100644
--- a/app/assets/stylesheets/pages/projects.scss
+++ b/app/assets/stylesheets/pages/projects.scss
@@ -354,12 +354,6 @@
min-width: 200px;
}
-.deploy-keys {
- .scrolling-tabs-container {
- position: relative;
- }
-}
-
.deploy-key {
// Ensure that the fingerprint does not overflow on small screens
.fingerprint {
diff --git a/app/assets/stylesheets/pages/repo.scss b/app/assets/stylesheets/pages/repo.scss
index 6e7fc50c63d..4b8a3db1d06 100644
--- a/app/assets/stylesheets/pages/repo.scss
+++ b/app/assets/stylesheets/pages/repo.scss
@@ -335,7 +335,6 @@
img {
max-width: 90%;
- max-height: 90%;
}
.isZoomable {
@@ -553,6 +552,10 @@
}
.multi-file-commit-list-item {
+ &.is-active {
+ background-color: $white-normal;
+ }
+
.multi-file-discard-btn {
display: none;
margin-top: -2px;
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 041837c5410..56312f801fb 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -284,8 +284,10 @@ class ApplicationController < ActionController::Base
return unless current_user
return if current_user.terms_accepted?
+ message = _("Please accept the Terms of Service before continuing.")
+
if sessionless_user?
- render_403
+ access_denied!(message)
else
# Redirect to the destination if the request is a get.
# Redirect to the source if it was a post, so the user can re-submit after
@@ -296,7 +298,7 @@ class ApplicationController < ActionController::Base
URI(request.referer).path if request.referer
end
- flash[:notice] = _("Please accept the Terms of Service before continuing.")
+ flash[:notice] = message
redirect_to terms_path(redirect: redirect_path), status: :found
end
end
diff --git a/app/models/project_services/chat_message/base_message.rb b/app/models/project_services/chat_message/base_message.rb
index 22a65b5145e..f710fa85b5d 100644
--- a/app/models/project_services/chat_message/base_message.rb
+++ b/app/models/project_services/chat_message/base_message.rb
@@ -26,13 +26,18 @@ module ChatMessage
end
end
- def pretext
+ def summary
return message if markdown
format(message)
end
+ def pretext
+ summary
+ end
+
def fallback
+ format(message)
end
def attachments
diff --git a/app/models/project_services/chat_message/pipeline_message.rb b/app/models/project_services/chat_message/pipeline_message.rb
index 2135122278a..96fd23aede3 100644
--- a/app/models/project_services/chat_message/pipeline_message.rb
+++ b/app/models/project_services/chat_message/pipeline_message.rb
@@ -23,10 +23,6 @@ module ChatMessage
''
end
- def fallback
- format(message)
- end
-
def attachments
return message if markdown
diff --git a/app/models/project_services/microsoft_teams_service.rb b/app/models/project_services/microsoft_teams_service.rb
index 2facff53e26..99500caec0e 100644
--- a/app/models/project_services/microsoft_teams_service.rb
+++ b/app/models/project_services/microsoft_teams_service.rb
@@ -44,7 +44,7 @@ class MicrosoftTeamsService < ChatNotificationService
def notify(message, opts)
MicrosoftTeams::Notifier.new(webhook).ping(
title: message.project_name,
- pretext: message.pretext,
+ summary: message.summary,
activity: message.activity,
attachments: message.attachments
)
diff --git a/app/models/timelog.rb b/app/models/timelog.rb
index f4c5c581a11..659146f43e4 100644
--- a/app/models/timelog.rb
+++ b/app/models/timelog.rb
@@ -19,4 +19,9 @@ class Timelog < ActiveRecord::Base
errors.add(:base, 'Issue or Merge Request ID is required')
end
end
+
+ # Rails5 defaults to :touch_later, overwrite for normal touch
+ def belongs_to_touch_method
+ :touch
+ end
end
diff --git a/app/services/quick_actions/interpret_service.rb b/app/services/quick_actions/interpret_service.rb
index 0215994b1a7..9ac8fdb4cff 100644
--- a/app/services/quick_actions/interpret_service.rb
+++ b/app/services/quick_actions/interpret_service.rb
@@ -561,6 +561,17 @@ module QuickActions
end
end
+ desc 'Make issue confidential.'
+ explanation do
+ 'Makes this issue confidential'
+ end
+ condition do
+ issuable.is_a?(Issue) && current_user.can?(:"admin_#{issuable.to_ability_name}", issuable)
+ end
+ command :confidential do
+ @updates[:confidential] = true
+ end
+
def extract_users(params)
return [] if params.nil?
diff --git a/app/uploaders/file_uploader.rb b/app/uploaders/file_uploader.rb
index 133fdf6684d..36bc0a4575a 100644
--- a/app/uploaders/file_uploader.rb
+++ b/app/uploaders/file_uploader.rb
@@ -65,10 +65,10 @@ class FileUploader < GitlabUploader
SecureRandom.hex
end
- def upload_paths(filename)
+ def upload_paths(identifier)
[
- File.join(secret, filename),
- File.join(base_dir(Store::REMOTE), secret, filename)
+ File.join(secret, identifier),
+ File.join(base_dir(Store::REMOTE), secret, identifier)
]
end
diff --git a/app/uploaders/object_storage.rb b/app/uploaders/object_storage.rb
index 23b3dcf84c0..b8ecfc4ee2b 100644
--- a/app/uploaders/object_storage.rb
+++ b/app/uploaders/object_storage.rb
@@ -10,6 +10,17 @@ module ObjectStorage
UnknownStoreError = Class.new(StandardError)
ObjectStorageUnavailable = Class.new(StandardError)
+ class ExclusiveLeaseTaken < StandardError
+ def initialize(lease_key)
+ @lease_key = lease_key
+ end
+
+ def message
+ *lease_key_group, _ = *@lease_key.split(":")
+ "Exclusive lease for #{lease_key_group.join(':')} is already taken."
+ end
+ end
+
TMP_UPLOAD_PATH = 'tmp/uploads'.freeze
module Store
@@ -29,7 +40,7 @@ module ObjectStorage
end
def retrieve_from_store!(identifier)
- paths = store_dirs.map { |store, path| File.join(path, identifier) }
+ paths = upload_paths(identifier)
unless current_upload_satisfies?(paths, model)
# the upload we already have isn't right, find the correct one
@@ -62,6 +73,15 @@ module ObjectStorage
upload.id)
end
+ def exclusive_lease_key
+ # For FileUploaders, model may have many uploaders. In that case
+ # we want to use exclusive key per upload, not per model to allow
+ # parallel migration
+ key_object = upload || model
+
+ "object_storage_migrate:#{key_object.class}:#{key_object.id}"
+ end
+
private
def current_upload_satisfies?(paths, model)
@@ -261,7 +281,7 @@ module ObjectStorage
end
def delete_migrated_file(migrated_file)
- migrated_file.delete if exists?
+ migrated_file.delete
end
def exists?
@@ -279,6 +299,13 @@ module ObjectStorage
}
end
+ # Returns all the possible paths for an upload.
+ # the `upload.path` is a lookup parameter, and it may change
+ # depending on the `store` param.
+ def upload_paths(identifier)
+ store_dirs.map { |store, path| File.join(path, identifier) }
+ end
+
def cache!(new_file = sanitized_file)
# We intercept ::UploadedFile which might be stored on remote storage
# We use that for "accelerated" uploads, where we store result on remote storage
@@ -298,6 +325,10 @@ module ObjectStorage
super
end
+ def exclusive_lease_key
+ "object_storage_migrate:#{model.class}:#{model.id}"
+ end
+
private
def schedule_background_upload?
@@ -364,17 +395,14 @@ module ObjectStorage
end
end
- def exclusive_lease_key
- "object_storage_migrate:#{model.class}:#{model.id}"
- end
-
def with_exclusive_lease
- uuid = Gitlab::ExclusiveLease.new(exclusive_lease_key, timeout: 1.hour.to_i).try_obtain
- raise 'exclusive lease already taken' unless uuid
+ lease_key = exclusive_lease_key
+ uuid = Gitlab::ExclusiveLease.new(lease_key, timeout: 1.hour.to_i).try_obtain
+ raise ExclusiveLeaseTaken.new(lease_key) unless uuid
yield uuid
ensure
- Gitlab::ExclusiveLease.cancel(exclusive_lease_key, uuid)
+ Gitlab::ExclusiveLease.cancel(lease_key, uuid)
end
#
diff --git a/app/uploaders/records_uploads.rb b/app/uploaders/records_uploads.rb
index 89c74a78835..301f4681fcd 100644
--- a/app/uploaders/records_uploads.rb
+++ b/app/uploaders/records_uploads.rb
@@ -22,7 +22,7 @@ module RecordsUploads
Upload.transaction do
uploads.where(path: upload_path).delete_all
- upload.destroy! if upload
+ upload.delete if upload
self.upload = build_upload.tap(&:save!)
end
diff --git a/app/views/admin/application_settings/_abuse.html.haml b/app/views/admin/application_settings/_abuse.html.haml
index 6b9b2a17dd9..91993838fc8 100644
--- a/app/views/admin/application_settings/_abuse.html.haml
+++ b/app/views/admin/application_settings/_abuse.html.haml
@@ -2,11 +2,10 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- = f.label :admin_notification_email, 'Abuse reports notification email', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :admin_notification_email, class: 'form-control'
- .form-text.text-muted
- Abuse reports will be sent to this address if it is set. Abuse reports are always available in the admin area.
+ .form-group
+ = f.label :admin_notification_email, 'Abuse reports notification email', class: 'label-light'
+ = f.text_field :admin_notification_email, class: 'form-control'
+ .form-text.text-muted
+ Abuse reports will be sent to this address if it is set. Abuse reports are always available in the admin area.
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_account_and_limit.html.haml b/app/views/admin/application_settings/_account_and_limit.html.haml
index 07f9ea0865b..f40939747f4 100644
--- a/app/views/admin/application_settings/_account_and_limit.html.haml
+++ b/app/views/admin/application_settings/_account_and_limit.html.haml
@@ -2,38 +2,32 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :gravatar_enabled, class: 'form-check-input'
- = f.label :gravatar_enabled, class: 'form-check-label' do
- Gravatar enabled
- .form-group.row
- = f.label :default_projects_limit, class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :default_projects_limit, class: 'form-control'
- .form-group.row
- = f.label :max_attachment_size, 'Maximum attachment size (MB)', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :max_attachment_size, class: 'form-control'
- .form-group.row
- = f.label :session_expire_delay, 'Session duration (minutes)', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :session_expire_delay, class: 'form-control'
- %span.form-text.text-muted#session_expire_delay_help_block GitLab restart is required to apply changes
- .form-group.row
- = f.label :user_oauth_applications, 'User OAuth applications', class: 'col-form-label col-sm-2'
- .col-sm-10
- .form-check
- = f.check_box :user_oauth_applications, class: 'form-check-input'
- = f.label :user_oauth_applications, class: 'form-check-label' do
- Allow users to register any application to use GitLab as an OAuth provider
- .form-group.row
- = f.label :user_default_external, 'New users set to external', class: 'col-form-label col-sm-2'
- .col-sm-10
- .form-check
- = f.check_box :user_default_external, class: 'form-check-input'
- = f.label :user_default_external, class: 'form-check-label' do
- Newly registered users will by default be external
+ .form-group
+ .form-check
+ = f.check_box :gravatar_enabled, class: 'form-check-input'
+ = f.label :gravatar_enabled, class: 'form-check-label' do
+ Gravatar enabled
+ .form-group
+ = f.label :default_projects_limit, class: 'label-light'
+ = f.number_field :default_projects_limit, class: 'form-control'
+ .form-group
+ = f.label :max_attachment_size, 'Maximum attachment size (MB)', class: 'label-light'
+ = f.number_field :max_attachment_size, class: 'form-control'
+ .form-group
+ = f.label :session_expire_delay, 'Session duration (minutes)', class: 'label-light'
+ = f.number_field :session_expire_delay, class: 'form-control'
+ %span.form-text.text-muted#session_expire_delay_help_block GitLab restart is required to apply changes
+ .form-group
+ = f.label :user_oauth_applications, 'User OAuth applications', class: 'label-light'
+ .form-check
+ = f.check_box :user_oauth_applications, class: 'form-check-input'
+ = f.label :user_oauth_applications, class: 'form-check-label' do
+ Allow users to register any application to use GitLab as an OAuth provider
+ .form-group
+ = f.label :user_default_external, 'New users set to external', class: 'label-light'
+ .form-check
+ = f.check_box :user_default_external, class: 'form-check-input'
+ = f.label :user_default_external, class: 'form-check-label' do
+ Newly registered users will by default be external
= f.submit 'Save changes', class: 'btn btn-success'
diff --git a/app/views/admin/application_settings/_background_jobs.html.haml b/app/views/admin/application_settings/_background_jobs.html.haml
index fc5df02242a..fd8e695ed49 100644
--- a/app/views/admin/application_settings/_background_jobs.html.haml
+++ b/app/views/admin/application_settings/_background_jobs.html.haml
@@ -6,25 +6,22 @@
These settings require a
= link_to 'restart', help_page_path('administration/restart_gitlab')
to take effect.
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :sidekiq_throttling_enabled, class: 'form-check-input'
- = f.label :sidekiq_throttling_enabled, class: 'form-check-label' do
- Enable Sidekiq Job Throttling
- .form-text.text-muted
- Limit the amount of resources slow running jobs are assigned.
- .form-group.row
- = f.label :sidekiq_throttling_queues, 'Sidekiq queues to throttle', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.select :sidekiq_throttling_queues, sidekiq_queue_options_for_select, { include_hidden: false }, multiple: true, class: 'select2 select-wide', data: { field: 'sidekiq_throttling_queues' }
+ .form-group
+ .form-check
+ = f.check_box :sidekiq_throttling_enabled, class: 'form-check-input'
+ = f.label :sidekiq_throttling_enabled, class: 'form-check-label' do
+ Enable Sidekiq Job Throttling
.form-text.text-muted
- Choose which queues you wish to throttle.
- .form-group.row
- = f.label :sidekiq_throttling_factor, 'Throttling Factor', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :sidekiq_throttling_factor, class: 'form-control', min: '0.01', max: '0.99', step: '0.01'
- .form-text.text-muted
- The factor by which the queues should be throttled. A value between 0.0 and 1.0, exclusive.
+ Limit the amount of resources slow running jobs are assigned.
+ .form-group
+ = f.label :sidekiq_throttling_queues, 'Sidekiq queues to throttle', class: 'label-light'
+ = f.select :sidekiq_throttling_queues, sidekiq_queue_options_for_select, { include_hidden: false }, multiple: true, class: 'select2 select-wide', data: { field: 'sidekiq_throttling_queues' }
+ .form-text.text-muted
+ Choose which queues you wish to throttle.
+ .form-group
+ = f.label :sidekiq_throttling_factor, 'Throttling Factor', class: 'label-light'
+ = f.number_field :sidekiq_throttling_factor, class: 'form-control', min: '0.01', max: '0.99', step: '0.01'
+ .form-text.text-muted
+ The factor by which the queues should be throttled. A value between 0.0 and 1.0, exclusive.
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_ci_cd.html.haml b/app/views/admin/application_settings/_ci_cd.html.haml
index 233821818e6..7c16cafe13f 100644
--- a/app/views/admin/application_settings/_ci_cd.html.haml
+++ b/app/views/admin/application_settings/_ci_cd.html.haml
@@ -2,46 +2,40 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :auto_devops_enabled, class: 'form-check-input'
- = f.label :auto_devops_enabled, class: 'form-check-label' do
- Enabled Auto DevOps for projects by default
- .form-text.text-muted
- It will automatically build, test, and deploy applications based on a predefined CI/CD configuration
- = link_to icon('question-circle'), help_page_path('topics/autodevops/index.md')
- .form-group.row
- = f.label :auto_devops_domain, class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :auto_devops_domain, class: 'form-control', placeholder: 'domain.com'
- .form-text.text-muted
- = s_("AdminSettings|Specify a domain to use by default for every project's Auto Review Apps and Auto Deploy stages.")
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :shared_runners_enabled, class: 'form-check-input'
- = f.label :shared_runners_enabled, class: 'form-check-label' do
- Enable shared runners for new projects
- .form-group.row
- = f.label :shared_runners_text, class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_area :shared_runners_text, class: 'form-control', rows: 4
- .form-text.text-muted Markdown enabled
- .form-group.row
- = f.label :max_artifacts_size, 'Maximum artifacts size (MB)', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :max_artifacts_size, class: 'form-control'
- .form-text.text-muted
- Set the maximum file size for each job's artifacts
- = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'maximum-artifacts-size')
- .form-group.row
- = f.label :default_artifacts_expire_in, 'Default artifacts expiration', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :default_artifacts_expire_in, class: 'form-control'
- .form-text.text-muted
- Set the default expiration time for each job's artifacts.
- 0 for unlimited.
- = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'default-artifacts-expiration')
+ .form-group
+ .form-check
+ = f.check_box :auto_devops_enabled, class: 'form-check-input'
+ = f.label :auto_devops_enabled, class: 'form-check-label' do
+ Enabled Auto DevOps for projects by default
+ .form-text.text-muted
+ It will automatically build, test, and deploy applications based on a predefined CI/CD configuration
+ = link_to icon('question-circle'), help_page_path('topics/autodevops/index.md')
+ .form-group
+ = f.label :auto_devops_domain, class: 'label-light'
+ = f.text_field :auto_devops_domain, class: 'form-control', placeholder: 'domain.com'
+ .form-text.text-muted
+ = s_("AdminSettings|Specify a domain to use by default for every project's Auto Review Apps and Auto Deploy stages.")
+ .form-group
+ .form-check
+ = f.check_box :shared_runners_enabled, class: 'form-check-input'
+ = f.label :shared_runners_enabled, class: 'form-check-label' do
+ Enable shared runners for new projects
+ .form-group
+ = f.label :shared_runners_text, class: 'label-light'
+ = f.text_area :shared_runners_text, class: 'form-control', rows: 4
+ .form-text.text-muted Markdown enabled
+ .form-group
+ = f.label :max_artifacts_size, 'Maximum artifacts size (MB)', class: 'label-light'
+ = f.number_field :max_artifacts_size, class: 'form-control'
+ .form-text.text-muted
+ Set the maximum file size for each job's artifacts
+ = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'maximum-artifacts-size')
+ .form-group
+ = f.label :default_artifacts_expire_in, 'Default artifacts expiration', class: 'label-light'
+ = f.text_field :default_artifacts_expire_in, class: 'form-control'
+ .form-text.text-muted
+ Set the default expiration time for each job's artifacts.
+ 0 for unlimited.
+ = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'default-artifacts-expiration')
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_email.html.haml b/app/views/admin/application_settings/_email.html.haml
index 01be5878a60..99e44ffa741 100644
--- a/app/views/admin/application_settings/_email.html.haml
+++ b/app/views/admin/application_settings/_email.html.haml
@@ -2,25 +2,23 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :email_author_in_body, class: 'form-check-input'
- = f.label :email_author_in_body, class: 'form-check-label' do
- Include author name in notification email body
- .form-text.text-muted
- Some email servers do not support overriding the email sender name.
- Enable this option to include the name of the author of the issue,
- merge request or comment in the email body instead.
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :html_emails_enabled, class: 'form-check-input'
- = f.label :html_emails_enabled, class: 'form-check-label' do
- Enable HTML emails
- .form-text.text-muted
- By default GitLab sends emails in HTML and plain text formats so mail
- clients can choose what format to use. Disable this option if you only
- want to send emails in plain text format.
+ .form-group
+ .form-check
+ = f.check_box :email_author_in_body, class: 'form-check-input'
+ = f.label :email_author_in_body, class: 'form-check-label' do
+ Include author name in notification email body
+ .form-text.text-muted
+ Some email servers do not support overriding the email sender name.
+ Enable this option to include the name of the author of the issue,
+ merge request or comment in the email body instead.
+ .form-group
+ .form-check
+ = f.check_box :html_emails_enabled, class: 'form-check-input'
+ = f.label :html_emails_enabled, class: 'form-check-label' do
+ Enable HTML emails
+ .form-text.text-muted
+ By default GitLab sends emails in HTML and plain text formats so mail
+ clients can choose what format to use. Disable this option if you only
+ want to send emails in plain text format.
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_gitaly.html.haml b/app/views/admin/application_settings/_gitaly.html.haml
index 859a1c6f45c..0b4001c0824 100644
--- a/app/views/admin/application_settings/_gitaly.html.haml
+++ b/app/views/admin/application_settings/_gitaly.html.haml
@@ -2,26 +2,23 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- = f.label :gitaly_timeout_default, 'Default Timeout Period', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :gitaly_timeout_default, class: 'form-control'
- .form-text.text-muted
- Timeout for Gitaly calls from the GitLab application (in seconds). This timeout is not enforced
- for git fetch/push operations or Sidekiq jobs.
- .form-group.row
- = f.label :gitaly_timeout_fast, 'Fast Timeout Period', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :gitaly_timeout_fast, class: 'form-control'
- .form-text.text-muted
- Fast operation timeout (in seconds). Some Gitaly operations are expected to be fast.
- If they exceed this threshold, there may be a problem with a storage shard and 'failing fast'
- can help maintain the stability of the GitLab instance.
- .form-group.row
- = f.label :gitaly_timeout_medium, 'Medium Timeout Period', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :gitaly_timeout_medium, class: 'form-control'
- .form-text.text-muted
- Medium operation timeout (in seconds). This should be a value between the Fast and the Default timeout.
+ .form-group
+ = f.label :gitaly_timeout_default, 'Default Timeout Period', class: 'label-light'
+ = f.number_field :gitaly_timeout_default, class: 'form-control'
+ .form-text.text-muted
+ Timeout for Gitaly calls from the GitLab application (in seconds). This timeout is not enforced
+ for git fetch/push operations or Sidekiq jobs.
+ .form-group
+ = f.label :gitaly_timeout_fast, 'Fast Timeout Period', class: 'label-light'
+ = f.number_field :gitaly_timeout_fast, class: 'form-control'
+ .form-text.text-muted
+ Fast operation timeout (in seconds). Some Gitaly operations are expected to be fast.
+ If they exceed this threshold, there may be a problem with a storage shard and 'failing fast'
+ can help maintain the stability of the GitLab instance.
+ .form-group
+ = f.label :gitaly_timeout_medium, 'Medium Timeout Period', class: 'label-light'
+ = f.number_field :gitaly_timeout_medium, class: 'form-control'
+ .form-text.text-muted
+ Medium operation timeout (in seconds). This should be a value between the Fast and the Default timeout.
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_help_page.html.haml b/app/views/admin/application_settings/_help_page.html.haml
index 1f6c52d8b1a..1f402fcb786 100644
--- a/app/views/admin/application_settings/_help_page.html.haml
+++ b/app/views/admin/application_settings/_help_page.html.haml
@@ -2,21 +2,18 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- = f.label :help_page_text, class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_area :help_page_text, class: 'form-control', rows: 4
- .form-text.text-muted Markdown enabled
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :help_page_hide_commercial_content, class: 'form-check-input'
- = f.label :help_page_hide_commercial_content, class: 'form-check-label' do
- Hide marketing-related entries from help
- .form-group.row
- = f.label :help_page_support_url, 'Support page URL', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :help_page_support_url, class: 'form-control', placeholder: 'http://company.example.com/getting-help', :'aria-describedby' => 'support_help_block'
- %span.form-text.text-muted#support_help_block Alternate support URL for help page
+ .form-group
+ = f.label :help_page_text, class: 'label-light'
+ = f.text_area :help_page_text, class: 'form-control', rows: 4
+ .form-text.text-muted Markdown enabled
+ .form-group
+ .form-check
+ = f.check_box :help_page_hide_commercial_content, class: 'form-check-input'
+ = f.label :help_page_hide_commercial_content, class: 'form-check-label' do
+ Hide marketing-related entries from help
+ .form-group
+ = f.label :help_page_support_url, 'Support page URL', class: 'label-light'
+ = f.text_field :help_page_support_url, class: 'form-control', placeholder: 'http://company.example.com/getting-help', :'aria-describedby' => 'support_help_block'
+ %span.form-text.text-muted#support_help_block Alternate support URL for help page
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_influx.html.haml b/app/views/admin/application_settings/_influx.html.haml
index b40a714ed8f..61e8e3199a9 100644
--- a/app/views/admin/application_settings/_influx.html.haml
+++ b/app/views/admin/application_settings/_influx.html.haml
@@ -8,61 +8,53 @@
= link_to 'restart', help_page_path('administration/restart_gitlab')
to take effect.
= link_to icon('question-circle'), help_page_path('administration/monitoring/performance/introduction')
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :metrics_enabled, class: 'form-check-input'
- = f.label :metrics_enabled, class: 'form-check-label' do
- Enable InfluxDB Metrics
- .form-group.row
- = f.label :metrics_host, 'InfluxDB host', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :metrics_host, class: 'form-control', placeholder: 'influxdb.example.com'
- .form-group.row
- = f.label :metrics_port, 'InfluxDB port', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :metrics_port, class: 'form-control', placeholder: '8089'
- .form-text.text-muted
- The UDP port to use for connecting to InfluxDB. InfluxDB requires that
- your server configuration specifies a database to store data in when
- sending messages to this port, without it metrics data will not be
- saved.
- .form-group.row
- = f.label :metrics_pool_size, 'Connection pool size', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :metrics_pool_size, class: 'form-control'
- .form-text.text-muted
- The amount of InfluxDB connections to open. Connections are opened
- lazily. Users using multi-threaded application servers should ensure
- enough connections are available (at minimum the amount of application
- server threads).
- .form-group.row
- = f.label :metrics_timeout, 'Connection timeout', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :metrics_timeout, class: 'form-control'
- .form-text.text-muted
- The amount of seconds after which an InfluxDB connection will time
- out.
- .form-group.row
- = f.label :metrics_method_call_threshold, 'Method Call Threshold (ms)', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :metrics_method_call_threshold, class: 'form-control'
- .form-text.text-muted
- A method call is only tracked when it takes longer to complete than
- the given amount of milliseconds.
- .form-group.row
- = f.label :metrics_sample_interval, 'Sampler Interval (sec)', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :metrics_sample_interval, class: 'form-control'
- .form-text.text-muted
- The sampling interval in seconds. Sampled data includes memory usage,
- retained Ruby objects, file descriptors and so on.
- .form-group.row
- = f.label :metrics_packet_size, 'Metrics per packet', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :metrics_packet_size, class: 'form-control'
- .form-text.text-muted
- The amount of points to store in a single UDP packet. More points
- results in fewer but larger UDP packets being sent.
+ .form-group
+ .form-check
+ = f.check_box :metrics_enabled, class: 'form-check-input'
+ = f.label :metrics_enabled, class: 'form-check-label' do
+ Enable InfluxDB Metrics
+ .form-group
+ = f.label :metrics_host, 'InfluxDB host', class: 'label-light'
+ = f.text_field :metrics_host, class: 'form-control', placeholder: 'influxdb.example.com'
+ .form-group
+ = f.label :metrics_port, 'InfluxDB port', class: 'label-light'
+ = f.text_field :metrics_port, class: 'form-control', placeholder: '8089'
+ .form-text.text-muted
+ The UDP port to use for connecting to InfluxDB. InfluxDB requires that
+ your server configuration specifies a database to store data in when
+ sending messages to this port, without it metrics data will not be
+ saved.
+ .form-group
+ = f.label :metrics_pool_size, 'Connection pool size', class: 'label-light'
+ = f.number_field :metrics_pool_size, class: 'form-control'
+ .form-text.text-muted
+ The amount of InfluxDB connections to open. Connections are opened
+ lazily. Users using multi-threaded application servers should ensure
+ enough connections are available (at minimum the amount of application
+ server threads).
+ .form-group
+ = f.label :metrics_timeout, 'Connection timeout', class: 'label-light'
+ = f.number_field :metrics_timeout, class: 'form-control'
+ .form-text.text-muted
+ The amount of seconds after which an InfluxDB connection will time
+ out.
+ .form-group
+ = f.label :metrics_method_call_threshold, 'Method Call Threshold (ms)', class: 'label-light'
+ = f.number_field :metrics_method_call_threshold, class: 'form-control'
+ .form-text.text-muted
+ A method call is only tracked when it takes longer to complete than
+ the given amount of milliseconds.
+ .form-group
+ = f.label :metrics_sample_interval, 'Sampler Interval (sec)', class: 'label-light'
+ = f.number_field :metrics_sample_interval, class: 'form-control'
+ .form-text.text-muted
+ The sampling interval in seconds. Sampled data includes memory usage,
+ retained Ruby objects, file descriptors and so on.
+ .form-group
+ = f.label :metrics_packet_size, 'Metrics per packet', class: 'label-light'
+ = f.number_field :metrics_packet_size, class: 'form-control'
+ .form-text.text-muted
+ The amount of points to store in a single UDP packet. More points
+ results in fewer but larger UDP packets being sent.
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_ip_limits.html.haml b/app/views/admin/application_settings/_ip_limits.html.haml
index 320dd52ffc2..73d570a5fee 100644
--- a/app/views/admin/application_settings/_ip_limits.html.haml
+++ b/app/views/admin/application_settings/_ip_limits.html.haml
@@ -2,53 +2,44 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :throttle_unauthenticated_enabled, class: 'form-check-input'
- = f.label :throttle_unauthenticated_enabled, class: 'form-check-label' do
- Enable unauthenticated request rate limit
- %span.form-text.text-muted
- Helps reduce request volume (e.g. from crawlers or abusive bots)
- .form-group.row
- = f.label :throttle_unauthenticated_requests_per_period, 'Max requests per period per IP', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :throttle_unauthenticated_requests_per_period, class: 'form-control'
- .form-group.row
- = f.label :throttle_unauthenticated_period_in_seconds, 'Rate limit period in seconds', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :throttle_unauthenticated_period_in_seconds, class: 'form-control'
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :throttle_authenticated_api_enabled, class: 'form-check-input'
- = f.label :throttle_authenticated_api_enabled, class: 'form-check-label' do
- Enable authenticated API request rate limit
- %span.form-text.text-muted
- Helps reduce request volume (e.g. from crawlers or abusive bots)
- .form-group.row
- = f.label :throttle_authenticated_api_requests_per_period, 'Max requests per period per user', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :throttle_authenticated_api_requests_per_period, class: 'form-control'
- .form-group.row
- = f.label :throttle_authenticated_api_period_in_seconds, 'Rate limit period in seconds', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :throttle_authenticated_api_period_in_seconds, class: 'form-control'
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :throttle_authenticated_web_enabled, class: 'form-check-input'
- = f.label :throttle_authenticated_web_enabled, class: 'form-check-label' do
- Enable authenticated web request rate limit
- %span.form-text.text-muted
- Helps reduce request volume (e.g. from crawlers or abusive bots)
- .form-group.row
- = f.label :throttle_authenticated_web_requests_per_period, 'Max requests per period per user', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :throttle_authenticated_web_requests_per_period, class: 'form-control'
- .form-group.row
- = f.label :throttle_authenticated_web_period_in_seconds, 'Rate limit period in seconds', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :throttle_authenticated_web_period_in_seconds, class: 'form-control'
+ .form-group
+ .form-check
+ = f.check_box :throttle_unauthenticated_enabled, class: 'form-check-input'
+ = f.label :throttle_unauthenticated_enabled, class: 'form-check-label' do
+ Enable unauthenticated request rate limit
+ %span.form-text.text-muted
+ Helps reduce request volume (e.g. from crawlers or abusive bots)
+ .form-group
+ = f.label :throttle_unauthenticated_requests_per_period, 'Max requests per period per IP', class: 'label-light'
+ = f.number_field :throttle_unauthenticated_requests_per_period, class: 'form-control'
+ .form-group
+ = f.label :throttle_unauthenticated_period_in_seconds, 'Rate limit period in seconds', class: 'label-light'
+ = f.number_field :throttle_unauthenticated_period_in_seconds, class: 'form-control'
+ .form-group
+ .form-check
+ = f.check_box :throttle_authenticated_api_enabled, class: 'form-check-input'
+ = f.label :throttle_authenticated_api_enabled, class: 'form-check-label' do
+ Enable authenticated API request rate limit
+ %span.form-text.text-muted
+ Helps reduce request volume (e.g. from crawlers or abusive bots)
+ .form-group
+ = f.label :throttle_authenticated_api_requests_per_period, 'Max requests per period per user', class: 'label-light'
+ = f.number_field :throttle_authenticated_api_requests_per_period, class: 'form-control'
+ .form-group
+ = f.label :throttle_authenticated_api_period_in_seconds, 'Rate limit period in seconds', class: 'label-light'
+ = f.number_field :throttle_authenticated_api_period_in_seconds, class: 'form-control'
+ .form-group
+ .form-check
+ = f.check_box :throttle_authenticated_web_enabled, class: 'form-check-input'
+ = f.label :throttle_authenticated_web_enabled, class: 'form-check-label' do
+ Enable authenticated web request rate limit
+ %span.form-text.text-muted
+ Helps reduce request volume (e.g. from crawlers or abusive bots)
+ .form-group
+ = f.label :throttle_authenticated_web_requests_per_period, 'Max requests per period per user', class: 'label-light'
+ = f.number_field :throttle_authenticated_web_requests_per_period, class: 'form-control'
+ .form-group
+ = f.label :throttle_authenticated_web_period_in_seconds, 'Rate limit period in seconds', class: 'label-light'
+ = f.number_field :throttle_authenticated_web_period_in_seconds, class: 'form-control'
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_koding.html.haml b/app/views/admin/application_settings/_koding.html.haml
index 341c7641fcc..ae60f68f5fe 100644
--- a/app/views/admin/application_settings/_koding.html.haml
+++ b/app/views/admin/application_settings/_koding.html.haml
@@ -2,23 +2,21 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :koding_enabled, class: 'form-check-input'
- = f.label :koding_enabled, class: 'form-check-label' do
- Enable Koding
- .form-text.text-muted
- Koding integration has been deprecated since GitLab 10.0. If you disable your Koding integration, you will not be able to enable it again.
- .form-group.row
- = f.label :koding_url, 'Koding URL', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :koding_url, class: 'form-control', placeholder: 'http://gitlab.your-koding-instance.com:8090'
- .form-text.text-muted
- Koding has integration enabled out of the box for the
- %strong gitlab
- team, and you need to provide that team's URL here. Learn more in the
- = succeed "." do
- = link_to "Koding administration documentation", help_page_path("administration/integration/koding")
+ .form-group
+ .form-check
+ = f.check_box :koding_enabled, class: 'form-check-input'
+ = f.label :koding_enabled, class: 'form-check-label' do
+ Enable Koding
+ .form-text.text-muted
+ Koding integration has been deprecated since GitLab 10.0. If you disable your Koding integration, you will not be able to enable it again.
+ .form-group
+ = f.label :koding_url, 'Koding URL', class: 'label-light'
+ = f.text_field :koding_url, class: 'form-control', placeholder: 'http://gitlab.your-koding-instance.com:8090'
+ .form-text.text-muted
+ Koding has integration enabled out of the box for the
+ %strong gitlab
+ team, and you need to provide that team's URL here. Learn more in the
+ = succeed "." do
+ = link_to "Koding administration documentation", help_page_path("administration/integration/koding")
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_logging.html.haml b/app/views/admin/application_settings/_logging.html.haml
index f5c1e126c70..a6e549cd1f0 100644
--- a/app/views/admin/application_settings/_logging.html.haml
+++ b/app/views/admin/application_settings/_logging.html.haml
@@ -2,35 +2,31 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :sentry_enabled, class: 'form-check-input'
- = f.label :sentry_enabled, class: 'form-check-label' do
- Enable Sentry
- .form-text.text-muted
- %p This setting requires a restart to take effect.
- Sentry is an error reporting and logging tool which is currently not shipped with GitLab, get it here:
- %a{ href: 'https://getsentry.com', target: '_blank', rel: 'noopener noreferrer' } https://getsentry.com
+ .form-group
+ .form-check
+ = f.check_box :sentry_enabled, class: 'form-check-input'
+ = f.label :sentry_enabled, class: 'form-check-label' do
+ Enable Sentry
+ .form-text.text-muted
+ %p This setting requires a restart to take effect.
+ Sentry is an error reporting and logging tool which is currently not shipped with GitLab, get it here:
+ %a{ href: 'https://getsentry.com', target: '_blank', rel: 'noopener noreferrer' } https://getsentry.com
- .form-group.row
- = f.label :sentry_dsn, 'Sentry DSN', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :sentry_dsn, class: 'form-control'
+ .form-group
+ = f.label :sentry_dsn, 'Sentry DSN', class: 'label-light'
+ = f.text_field :sentry_dsn, class: 'form-control'
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :clientside_sentry_enabled, class: 'form-check-input'
- = f.label :clientside_sentry_enabled, class: 'form-check-label' do
- Enable Clientside Sentry
- .form-text.text-muted
- Sentry can also be used for reporting and logging clientside exceptions.
- %a{ href: 'https://sentry.io/for/javascript/', target: '_blank', rel: 'noopener noreferrer' } https://sentry.io/for/javascript/
+ .form-group
+ .form-check
+ = f.check_box :clientside_sentry_enabled, class: 'form-check-input'
+ = f.label :clientside_sentry_enabled, class: 'form-check-label' do
+ Enable Clientside Sentry
+ .form-text.text-muted
+ Sentry can also be used for reporting and logging clientside exceptions.
+ %a{ href: 'https://sentry.io/for/javascript/', target: '_blank', rel: 'noopener noreferrer' } https://sentry.io/for/javascript/
- .form-group.row
- = f.label :clientside_sentry_dsn, 'Clientside Sentry DSN', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :clientside_sentry_dsn, class: 'form-control'
+ .form-group
+ = f.label :clientside_sentry_dsn, 'Clientside Sentry DSN', class: 'label-light'
+ = f.text_field :clientside_sentry_dsn, class: 'form-control'
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_outbound.html.haml b/app/views/admin/application_settings/_outbound.html.haml
index 5dadb7b814b..e046242bee0 100644
--- a/app/views/admin/application_settings/_outbound.html.haml
+++ b/app/views/admin/application_settings/_outbound.html.haml
@@ -2,11 +2,10 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :allow_local_requests_from_hooks_and_services, class: 'form-check-input'
- = f.label :allow_local_requests_from_hooks_and_services, class: 'form-check-label' do
- Allow requests to the local network from hooks and services
+ .form-group
+ .form-check
+ = f.check_box :allow_local_requests_from_hooks_and_services, class: 'form-check-input'
+ = f.label :allow_local_requests_from_hooks_and_services, class: 'form-check-label' do
+ Allow requests to the local network from hooks and services
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_pages.html.haml b/app/views/admin/application_settings/_pages.html.haml
index f1889c3105f..f168ec62ffd 100644
--- a/app/views/admin/application_settings/_pages.html.haml
+++ b/app/views/admin/application_settings/_pages.html.haml
@@ -2,21 +2,19 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- = f.label :max_pages_size, 'Maximum size of pages (MB)', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :max_pages_size, class: 'form-control'
- .form-text.text-muted 0 for unlimited
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :pages_domain_verification_enabled, class: 'form-check-input'
- = f.label :pages_domain_verification_enabled, class: 'form-check-label' do
- Require users to prove ownership of custom domains
- .form-text.text-muted
- Domain verification is an essential security measure for public GitLab
- sites. Users are required to demonstrate they control a domain before
- it is enabled
- = link_to icon('question-circle'), help_page_path('user/project/pages/getting_started_part_three.md', anchor: 'dns-txt-record')
+ .form-group
+ = f.label :max_pages_size, 'Maximum size of pages (MB)', class: 'label-light'
+ = f.number_field :max_pages_size, class: 'form-control'
+ .form-text.text-muted 0 for unlimited
+ .form-group
+ .form-check
+ = f.check_box :pages_domain_verification_enabled, class: 'form-check-input'
+ = f.label :pages_domain_verification_enabled, class: 'form-check-label' do
+ Require users to prove ownership of custom domains
+ .form-text.text-muted
+ Domain verification is an essential security measure for public GitLab
+ sites. Users are required to demonstrate they control a domain before
+ it is enabled
+ = link_to icon('question-circle'), help_page_path('user/project/pages/getting_started_part_three.md', anchor: 'dns-txt-record')
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_performance.html.haml b/app/views/admin/application_settings/_performance.html.haml
index 57c22ce563f..ffa25af77ed 100644
--- a/app/views/admin/application_settings/_performance.html.haml
+++ b/app/views/admin/application_settings/_performance.html.haml
@@ -2,18 +2,17 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :authorized_keys_enabled, class: 'form-check-input'
- = f.label :authorized_keys_enabled, class: 'form-check-label' do
- Write to "authorized_keys" file
- .form-text.text-muted
- By default, we write to the "authorized_keys" file to support Git
- over SSH without additional configuration. GitLab can be optimized
- to authenticate SSH keys via the database file. Only uncheck this
- if you have configured your OpenSSH server to use the
- AuthorizedKeysCommand. Click on the help icon for more details.
- = link_to icon('question-circle'), help_page_path('administration/operations/fast_ssh_key_lookup')
+ .form-group
+ .form-check
+ = f.check_box :authorized_keys_enabled, class: 'form-check-input'
+ = f.label :authorized_keys_enabled, class: 'form-check-label' do
+ Write to "authorized_keys" file
+ .form-text.text-muted
+ By default, we write to the "authorized_keys" file to support Git
+ over SSH without additional configuration. GitLab can be optimized
+ to authenticate SSH keys via the database file. Only uncheck this
+ if you have configured your OpenSSH server to use the
+ AuthorizedKeysCommand. Click on the help icon for more details.
+ = link_to icon('question-circle'), help_page_path('administration/operations/fast_ssh_key_lookup')
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_performance_bar.html.haml b/app/views/admin/application_settings/_performance_bar.html.haml
index ed4de2234f7..ddbfcc6b77b 100644
--- a/app/views/admin/application_settings/_performance_bar.html.haml
+++ b/app/views/admin/application_settings/_performance_bar.html.haml
@@ -2,15 +2,13 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :performance_bar_enabled, class: 'form-check-input'
- = f.label :performance_bar_enabled, class: 'form-check-label' do
- Enable the Performance Bar
- .form-group.row
- = f.label :performance_bar_allowed_group_path, 'Allowed group', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :performance_bar_allowed_group_path, class: 'form-control', placeholder: 'my-org/my-group', value: @application_setting.performance_bar_allowed_group&.full_path
+ .form-group
+ .form-check
+ = f.check_box :performance_bar_enabled, class: 'form-check-input'
+ = f.label :performance_bar_enabled, class: 'form-check-label' do
+ Enable the Performance Bar
+ .form-group
+ = f.label :performance_bar_allowed_group_path, 'Allowed group', class: 'label-light'
+ = f.text_field :performance_bar_allowed_group_path, class: 'form-control', placeholder: 'my-org/my-group', value: @application_setting.performance_bar_allowed_group&.full_path
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_plantuml.html.haml b/app/views/admin/application_settings/_plantuml.html.haml
index e0dc058762e..259f18b3b96 100644
--- a/app/views/admin/application_settings/_plantuml.html.haml
+++ b/app/views/admin/application_settings/_plantuml.html.haml
@@ -2,19 +2,17 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :plantuml_enabled, class: 'form-check-input'
- = f.label :plantuml_enabled, class: 'form-check-label' do
- Enable PlantUML
- .form-group.row
- = f.label :plantuml_url, 'PlantUML URL', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :plantuml_url, class: 'form-control', placeholder: 'http://gitlab.your-plantuml-instance.com:8080'
- .form-text.text-muted
- Allow rendering of
- = link_to "PlantUML", "http://plantuml.com"
- diagrams in Asciidoc documents using an external PlantUML service.
+ .form-group
+ .form-check
+ = f.check_box :plantuml_enabled, class: 'form-check-input'
+ = f.label :plantuml_enabled, class: 'form-check-label' do
+ Enable PlantUML
+ .form-group
+ = f.label :plantuml_url, 'PlantUML URL', class: 'label-light'
+ = f.text_field :plantuml_url, class: 'form-control', placeholder: 'http://gitlab.your-plantuml-instance.com:8080'
+ .form-text.text-muted
+ Allow rendering of
+ = link_to "PlantUML", "http://plantuml.com"
+ diagrams in Asciidoc documents using an external PlantUML service.
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_prometheus.html.haml b/app/views/admin/application_settings/_prometheus.html.haml
index d3c3656e96a..ad92b18b2c9 100644
--- a/app/views/admin/application_settings/_prometheus.html.haml
+++ b/app/views/admin/application_settings/_prometheus.html.haml
@@ -11,18 +11,17 @@
= link_to 'restart', help_page_path('administration/restart_gitlab')
to take effect.
= link_to icon('question-circle'), help_page_path('administration/monitoring/prometheus/index')
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :prometheus_metrics_enabled, class: 'form-check-input'
- = f.label :prometheus_metrics_enabled, class: 'form-check-label' do
- Enable Prometheus Metrics
- - unless Gitlab::Metrics.metrics_folder_present?
- .form-text.text-muted
- %strong.cred WARNING:
- Environment variable
- %code prometheus_multiproc_dir
- does not exist or is not pointing to a valid directory.
- = link_to icon('question-circle'), help_page_path('administration/monitoring/prometheus/gitlab_metrics', anchor: 'metrics-shared-directory')
+ .form-group
+ .form-check
+ = f.check_box :prometheus_metrics_enabled, class: 'form-check-input'
+ = f.label :prometheus_metrics_enabled, class: 'form-check-label' do
+ Enable Prometheus Metrics
+ - unless Gitlab::Metrics.metrics_folder_present?
+ .form-text.text-muted
+ %strong.cred WARNING:
+ Environment variable
+ %code prometheus_multiproc_dir
+ does not exist or is not pointing to a valid directory.
+ = link_to icon('question-circle'), help_page_path('administration/monitoring/prometheus/gitlab_metrics', anchor: 'metrics-shared-directory')
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_realtime.html.haml b/app/views/admin/application_settings/_realtime.html.haml
index 63a592cc2fd..120cf4909b2 100644
--- a/app/views/admin/application_settings/_realtime.html.haml
+++ b/app/views/admin/application_settings/_realtime.html.haml
@@ -2,18 +2,17 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- = f.label :polling_interval_multiplier, 'Polling interval multiplier', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :polling_interval_multiplier, class: 'form-control'
- .form-text.text-muted
- Change this value to influence how frequently the GitLab UI polls for updates.
- If you set the value to 2 all polling intervals are multiplied
- by 2, which means that polling happens half as frequently.
- The multiplier can also have a decimal value.
- The default value (1) is a reasonable choice for the majority of GitLab
- installations. Set to 0 to completely disable polling.
- = link_to icon('question-circle'), help_page_path('administration/polling')
+ .form-group
+ = f.label :polling_interval_multiplier, 'Polling interval multiplier', class: 'label-light'
+ = f.text_field :polling_interval_multiplier, class: 'form-control'
+ .form-text.text-muted
+ Change this value to influence how frequently the GitLab UI polls for updates.
+ If you set the value to 2 all polling intervals are multiplied
+ by 2, which means that polling happens half as frequently.
+ The multiplier can also have a decimal value.
+ The default value (1) is a reasonable choice for the majority of GitLab
+ installations. Set to 0 to completely disable polling.
+ = link_to icon('question-circle'), help_page_path('administration/polling')
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_registry.html.haml b/app/views/admin/application_settings/_registry.html.haml
index 8524cbfe4d9..beac70482e5 100644
--- a/app/views/admin/application_settings/_registry.html.haml
+++ b/app/views/admin/application_settings/_registry.html.haml
@@ -2,9 +2,8 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- = f.label :container_registry_token_expire_delay, 'Authorization token duration (minutes)', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :container_registry_token_expire_delay, class: 'form-control'
+ .form-group
+ = f.label :container_registry_token_expire_delay, 'Authorization token duration (minutes)', class: 'label-light'
+ = f.number_field :container_registry_token_expire_delay, class: 'form-control'
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_repository_check.html.haml b/app/views/admin/application_settings/_repository_check.html.haml
index 1311f17ecda..57facc380eb 100644
--- a/app/views/admin/application_settings/_repository_check.html.haml
+++ b/app/views/admin/application_settings/_repository_check.html.haml
@@ -4,59 +4,53 @@
%fieldset
.sub-section
%h4 Repository checks
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :repository_checks_enabled, class: 'form-check-input'
- = f.label :repository_checks_enabled, class: 'form-check-label' do
- Enable Repository Checks
- .form-text.text-muted
- GitLab will periodically run
- %a{ href: 'https://git-scm.com/docs/git-fsck', target: 'blank' } 'git fsck'
- in all project and wiki repositories to look for silent disk corruption issues.
- .form-group.row
- .offset-sm-2.col-sm-10
- = link_to 'Clear all repository checks', clear_repository_check_states_admin_application_settings_path, data: { confirm: 'This will clear repository check states for ALL projects in the database. This cannot be undone. Are you sure?' }, method: :put, class: "btn btn-sm btn-remove"
+ .form-group
+ .form-check
+ = f.check_box :repository_checks_enabled, class: 'form-check-input'
+ = f.label :repository_checks_enabled, class: 'form-check-label' do
+ Enable Repository Checks
.form-text.text-muted
- If you got a lot of false alarms from repository checks you can choose to clear all repository check information from the database.
+ GitLab will periodically run
+ %a{ href: 'https://git-scm.com/docs/git-fsck', target: 'blank' } 'git fsck'
+ in all project and wiki repositories to look for silent disk corruption issues.
+ .form-group
+ = link_to 'Clear all repository checks', clear_repository_check_states_admin_application_settings_path, data: { confirm: 'This will clear repository check states for ALL projects in the database. This cannot be undone. Are you sure?' }, method: :put, class: "btn btn-sm btn-remove"
+ .form-text.text-muted
+ If you got a lot of false alarms from repository checks you can choose to clear all repository check information from the database.
.sub-section
%h4 Housekeeping
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :housekeeping_enabled, class: 'form-check-input'
- = f.label :housekeeping_enabled, class: 'form-check-label' do
- Enable automatic repository housekeeping (git repack, git gc)
- .form-text.text-muted
- If you keep automatic housekeeping disabled for a long time Git
- repository access on your GitLab server will become slower and your
- repositories will use more disk space. We recommend to always leave
- this enabled.
- .form-check
- = f.check_box :housekeeping_bitmaps_enabled, class: 'form-check-input'
- = f.label :housekeeping_bitmaps_enabled, class: 'form-check-label' do
- Enable Git pack file bitmap creation
- .form-text.text-muted
- Creating pack file bitmaps makes housekeeping take a little longer but
- bitmaps should accelerate 'git clone' performance.
- .form-group.row
- = f.label :housekeeping_incremental_repack_period, 'Incremental repack period', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :housekeeping_incremental_repack_period, class: 'form-control'
+ .form-group
+ .form-check
+ = f.check_box :housekeeping_enabled, class: 'form-check-input'
+ = f.label :housekeeping_enabled, class: 'form-check-label' do
+ Enable automatic repository housekeeping (git repack, git gc)
.form-text.text-muted
- Number of Git pushes after which an incremental 'git repack' is run.
- .form-group.row
- = f.label :housekeeping_full_repack_period, 'Full repack period', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :housekeeping_full_repack_period, class: 'form-control'
+ If you keep automatic housekeeping disabled for a long time Git
+ repository access on your GitLab server will become slower and your
+ repositories will use more disk space. We recommend to always leave
+ this enabled.
+ .form-check
+ = f.check_box :housekeeping_bitmaps_enabled, class: 'form-check-input'
+ = f.label :housekeeping_bitmaps_enabled, class: 'form-check-label' do
+ Enable Git pack file bitmap creation
.form-text.text-muted
- Number of Git pushes after which a full 'git repack' is run.
- .form-group.row
- = f.label :housekeeping_gc_period, 'Git GC period', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :housekeeping_gc_period, class: 'form-control'
- .form-text.text-muted
- Number of Git pushes after which 'git gc' is run.
+ Creating pack file bitmaps makes housekeeping take a little longer but
+ bitmaps should accelerate 'git clone' performance.
+ .form-group
+ = f.label :housekeeping_incremental_repack_period, 'Incremental repack period', class: 'label-light'
+ = f.number_field :housekeeping_incremental_repack_period, class: 'form-control'
+ .form-text.text-muted
+ Number of Git pushes after which an incremental 'git repack' is run.
+ .form-group
+ = f.label :housekeeping_full_repack_period, 'Full repack period', class: 'label-light'
+ = f.number_field :housekeeping_full_repack_period, class: 'form-control'
+ .form-text.text-muted
+ Number of Git pushes after which a full 'git repack' is run.
+ .form-group
+ = f.label :housekeeping_gc_period, 'Git GC period', class: 'label-light'
+ = f.number_field :housekeeping_gc_period, class: 'form-control'
+ .form-text.text-muted
+ Number of Git pushes after which 'git gc' is run.
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_repository_mirrors_form.html.haml b/app/views/admin/application_settings/_repository_mirrors_form.html.haml
index 187c6c28bb1..beeb5169361 100644
--- a/app/views/admin/application_settings/_repository_mirrors_form.html.haml
+++ b/app/views/admin/application_settings/_repository_mirrors_form.html.haml
@@ -2,15 +2,14 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- = f.label :mirror_available, 'Enable mirror configuration', class: 'control-label col-sm-4'
- .col-sm-8
- .form-check
- = f.check_box :mirror_available, class: 'form-check-input'
- = f.label :mirror_available, class: 'form-check-label' do
- Allow mirrors to be setup for projects
- %span.form-text.text-muted
- If disabled, only admins will be able to setup mirrors in projects.
- = link_to icon('question-circle'), help_page_path('workflow/repository_mirroring')
+ .form-group
+ = f.label :mirror_available, 'Enable mirror configuration', class: 'label-light'
+ .form-check
+ = f.check_box :mirror_available, class: 'form-check-input'
+ = f.label :mirror_available, class: 'form-check-label' do
+ Allow mirrors to be setup for projects
+ %span.form-text.text-muted
+ If disabled, only admins will be able to setup mirrors in projects.
+ = link_to icon('question-circle'), help_page_path('workflow/repository_mirroring')
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_repository_storage.html.haml b/app/views/admin/application_settings/_repository_storage.html.haml
index 89d2c114b22..5a303666353 100644
--- a/app/views/admin/application_settings/_repository_storage.html.haml
+++ b/app/views/admin/application_settings/_repository_storage.html.haml
@@ -3,56 +3,49 @@
%fieldset
.sub-section
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :hashed_storage_enabled, class: 'form-check-input'
- = f.label :hashed_storage_enabled, class: 'form-check-label' do
- Create new projects using hashed storage paths
- .form-text.text-muted
- Enable immutable, hash-based paths and repository names to store repositories on disk. This prevents
- repositories from having to be moved or renamed when the Project URL changes and may improve disk I/O performance.
- %em (EXPERIMENTAL)
- .form-group.row
- = f.label :repository_storages, 'Storage paths for new projects', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.select :repository_storages, repository_storages_options_for_select(@application_setting.repository_storages),
- {include_hidden: false}, multiple: true, class: 'form-control'
+ .form-group
+ .form-check
+ = f.check_box :hashed_storage_enabled, class: 'form-check-input'
+ = f.label :hashed_storage_enabled, class: 'form-check-label' do
+ Create new projects using hashed storage paths
.form-text.text-muted
- Manage repository storage paths. Learn more in the
- = succeed "." do
- = link_to "repository storages documentation", help_page_path("administration/repository_storage_paths")
+ Enable immutable, hash-based paths and repository names to store repositories on disk. This prevents
+ repositories from having to be moved or renamed when the Project URL changes and may improve disk I/O performance.
+ %em (EXPERIMENTAL)
+ .form-group
+ = f.label :repository_storages, 'Storage paths for new projects', class: 'label-light'
+ = f.select :repository_storages, repository_storages_options_for_select(@application_setting.repository_storages),
+ {include_hidden: false}, multiple: true, class: 'form-control'
+ .form-text.text-muted
+ Manage repository storage paths. Learn more in the
+ = succeed "." do
+ = link_to "repository storages documentation", help_page_path("administration/repository_storage_paths")
.sub-section
%h4 Circuit breaker
- .form-group.row
- = f.label :circuitbreaker_check_interval, _('Check interval'), class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :circuitbreaker_check_interval, class: 'form-control'
- .form-text.text-muted
- = circuitbreaker_check_interval_help_text
- .form-group.row
- = f.label :circuitbreaker_access_retries, _('Number of access attempts'), class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :circuitbreaker_access_retries, class: 'form-control'
- .form-text.text-muted
- = circuitbreaker_access_retries_help_text
- .form-group.row
- = f.label :circuitbreaker_storage_timeout, _('Seconds to wait for a storage access attempt'), class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :circuitbreaker_storage_timeout, class: 'form-control'
- .form-text.text-muted
- = circuitbreaker_storage_timeout_help_text
- .form-group.row
- = f.label :circuitbreaker_failure_count_threshold, _('Maximum git storage failures'), class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :circuitbreaker_failure_count_threshold, class: 'form-control'
- .form-text.text-muted
- = circuitbreaker_failure_count_help_text
- .form-group.row
- = f.label :circuitbreaker_failure_reset_time, _('Seconds before reseting failure information'), class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :circuitbreaker_failure_reset_time, class: 'form-control'
- .form-text.text-muted
- = circuitbreaker_failure_reset_time_help_text
+ .form-group
+ = f.label :circuitbreaker_check_interval, _('Check interval'), class: 'label-light'
+ = f.number_field :circuitbreaker_check_interval, class: 'form-control'
+ .form-text.text-muted
+ = circuitbreaker_check_interval_help_text
+ .form-group
+ = f.label :circuitbreaker_access_retries, _('Number of access attempts'), class: 'label-light'
+ = f.number_field :circuitbreaker_access_retries, class: 'form-control'
+ .form-text.text-muted
+ = circuitbreaker_access_retries_help_text
+ .form-group
+ = f.label :circuitbreaker_storage_timeout, _('Seconds to wait for a storage access attempt'), class: 'label-light'
+ = f.number_field :circuitbreaker_storage_timeout, class: 'form-control'
+ .form-text.text-muted
+ = circuitbreaker_storage_timeout_help_text
+ .form-group
+ = f.label :circuitbreaker_failure_count_threshold, _('Maximum git storage failures'), class: 'label-light'
+ = f.number_field :circuitbreaker_failure_count_threshold, class: 'form-control'
+ .form-text.text-muted
+ = circuitbreaker_failure_count_help_text
+ .form-group
+ = f.label :circuitbreaker_failure_reset_time, _('Seconds before reseting failure information'), class: 'label-light'
+ = f.number_field :circuitbreaker_failure_reset_time, class: 'form-control'
+ .form-text.text-muted
+ = circuitbreaker_failure_reset_time_help_text
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_signin.html.haml b/app/views/admin/application_settings/_signin.html.haml
index 2ba26158162..69d1a43c511 100644
--- a/app/views/admin/application_settings/_signin.html.haml
+++ b/app/views/admin/application_settings/_signin.html.haml
@@ -2,59 +2,51 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :password_authentication_enabled_for_web, class: 'form-check-input'
- = f.label :password_authentication_enabled_for_web, class: 'form-check-label' do
- Password authentication enabled for web interface
- .form-text.text-muted
- When disabled, an external authentication provider must be used.
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :password_authentication_enabled_for_git, class: 'form-check-input'
- = f.label :password_authentication_enabled_for_git, class: 'form-check-label' do
- Password authentication enabled for Git over HTTP(S)
- .form-text.text-muted
- When disabled, a Personal Access Token
- - if Gitlab::Auth::LDAP::Config.enabled?
- or LDAP password
- must be used to authenticate.
+ .form-group
+ .form-check
+ = f.check_box :password_authentication_enabled_for_web, class: 'form-check-input'
+ = f.label :password_authentication_enabled_for_web, class: 'form-check-label' do
+ Password authentication enabled for web interface
+ .form-text.text-muted
+ When disabled, an external authentication provider must be used.
+ .form-group
+ .form-check
+ = f.check_box :password_authentication_enabled_for_git, class: 'form-check-input'
+ = f.label :password_authentication_enabled_for_git, class: 'form-check-label' do
+ Password authentication enabled for Git over HTTP(S)
+ .form-text.text-muted
+ When disabled, a Personal Access Token
+ - if Gitlab::Auth::LDAP::Config.enabled?
+ or LDAP password
+ must be used to authenticate.
- if omniauth_enabled? && button_based_providers.any?
- .form-group.row
- = f.label :enabled_oauth_sign_in_sources, 'Enabled OAuth sign-in sources', class: 'col-form-label col-sm-2'
+ .form-group
+ = f.label :enabled_oauth_sign_in_sources, 'Enabled OAuth sign-in sources', class: 'label-light'
= hidden_field_tag 'application_setting[enabled_oauth_sign_in_sources][]'
- .col-sm-10
- .btn-group{ data: { toggle: 'buttons' } }
- - oauth_providers_checkboxes.each do |source|
- = source
- .form-group.row
- = f.label :two_factor_authentication, 'Two-factor authentication', class: 'col-form-label col-sm-2'
- .col-sm-10
- .form-check
- = f.check_box :require_two_factor_authentication, class: 'form-check-input'
- = f.label :require_two_factor_authentication, class: 'form-check-label' do
- Require all users to setup Two-factor authentication
- .form-group.row
- = f.label :two_factor_authentication, 'Two-factor grace period (hours)', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :two_factor_grace_period, min: 0, class: 'form-control', placeholder: '0'
- .form-text.text-muted Amount of time (in hours) that users are allowed to skip forced configuration of two-factor authentication
- .form-group.row
- = f.label :home_page_url, 'Home page URL', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :home_page_url, class: 'form-control', placeholder: 'http://company.example.com', :'aria-describedby' => 'home_help_block'
- %span.form-text.text-muted#home_help_block We will redirect non-logged in users to this page
- .form-group.row
- = f.label :after_sign_out_path, class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :after_sign_out_path, class: 'form-control', placeholder: 'http://company.example.com', :'aria-describedby' => 'after_sign_out_path_help_block'
- %span.form-text.text-muted#after_sign_out_path_help_block We will redirect users to this page after they sign out
- .form-group.row
- = f.label :sign_in_text, class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_area :sign_in_text, class: 'form-control', rows: 4
- .form-text.text-muted Markdown enabled
+ .btn-group{ data: { toggle: 'buttons' } }
+ - oauth_providers_checkboxes.each do |source|
+ = source
+ .form-group
+ = f.label :two_factor_authentication, 'Two-factor authentication', class: 'label-light'
+ .form-check
+ = f.check_box :require_two_factor_authentication, class: 'form-check-input'
+ = f.label :require_two_factor_authentication, class: 'form-check-label' do
+ Require all users to setup Two-factor authentication
+ .form-group
+ = f.label :two_factor_authentication, 'Two-factor grace period (hours)', class: 'label-light'
+ = f.number_field :two_factor_grace_period, min: 0, class: 'form-control', placeholder: '0'
+ .form-text.text-muted Amount of time (in hours) that users are allowed to skip forced configuration of two-factor authentication
+ .form-group
+ = f.label :home_page_url, 'Home page URL', class: 'label-light'
+ = f.text_field :home_page_url, class: 'form-control', placeholder: 'http://company.example.com', :'aria-describedby' => 'home_help_block'
+ %span.form-text.text-muted#home_help_block We will redirect non-logged in users to this page
+ .form-group
+ = f.label :after_sign_out_path, class: 'label-light'
+ = f.text_field :after_sign_out_path, class: 'form-control', placeholder: 'http://company.example.com', :'aria-describedby' => 'after_sign_out_path_help_block'
+ %span.form-text.text-muted#after_sign_out_path_help_block We will redirect users to this page after they sign out
+ .form-group
+ = f.label :sign_in_text, class: 'label-light'
+ = f.text_area :sign_in_text, class: 'form-control', rows: 4
+ .form-text.text-muted Markdown enabled
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_signup.html.haml b/app/views/admin/application_settings/_signup.html.haml
index 279f96389e9..b9ba9128cc9 100644
--- a/app/views/admin/application_settings/_signup.html.haml
+++ b/app/views/admin/application_settings/_signup.html.haml
@@ -2,57 +2,49 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :signup_enabled, class: 'form-check-input'
- = f.label :signup_enabled, class: 'form-check-label' do
- Sign-up enabled
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :send_user_confirmation_email, class: 'form-check-input'
- = f.label :send_user_confirmation_email, class: 'form-check-label' do
- Send confirmation email on sign-up
- .form-group.row
- = f.label :domain_whitelist, 'Whitelisted domains for sign-ups', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_area :domain_whitelist_raw, placeholder: 'domain.com', class: 'form-control', rows: 8
- .form-text.text-muted ONLY users with e-mail addresses that match these domain(s) will be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com
- .form-group.row
- = f.label :domain_blacklist_enabled, 'Domain Blacklist', class: 'col-form-label col-sm-2'
- .col-sm-10
- .form-check
- = f.check_box :domain_blacklist_enabled, class: 'form-check-input'
- = f.label :domain_blacklist_enabled, class: 'form-check-label' do
- Enable domain blacklist for sign ups
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = radio_button_tag :blacklist_type, :file, class: 'form-check-input'
- = label_tag :blacklist_type_file, class: 'form-check-label' do
- .option-title
- Upload blacklist file
- .form-check
- = radio_button_tag :blacklist_type, :raw, @application_setting.domain_blacklist.present? || @application_setting.domain_blacklist.blank?, class: 'form-check-input'
- = label_tag :blacklist_type_raw, class: 'form-check-label' do
- .option-title
- Enter blacklist manually
- .form-group.row.blacklist-file
- = f.label :domain_blacklist_file, 'Blacklist file', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.file_field :domain_blacklist_file, class: 'form-control', accept: '.txt,.conf'
- .form-text.text-muted Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines or commas for multiple entries.
- .form-group.row.blacklist-raw
- = f.label :domain_blacklist, 'Blacklisted domains for sign-ups', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_area :domain_blacklist_raw, placeholder: 'domain.com', class: 'form-control', rows: 8
- .form-text.text-muted Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com
+ .form-group
+ .form-check
+ = f.check_box :signup_enabled, class: 'form-check-input'
+ = f.label :signup_enabled, class: 'form-check-label' do
+ Sign-up enabled
+ .form-group
+ .form-check
+ = f.check_box :send_user_confirmation_email, class: 'form-check-input'
+ = f.label :send_user_confirmation_email, class: 'form-check-label' do
+ Send confirmation email on sign-up
+ .form-group
+ = f.label :domain_whitelist, 'Whitelisted domains for sign-ups', class: 'label-light'
+ = f.text_area :domain_whitelist_raw, placeholder: 'domain.com', class: 'form-control', rows: 8
+ .form-text.text-muted ONLY users with e-mail addresses that match these domain(s) will be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com
+ .form-group
+ = f.label :domain_blacklist_enabled, 'Domain Blacklist', class: 'label-light'
+ .form-check
+ = f.check_box :domain_blacklist_enabled, class: 'form-check-input'
+ = f.label :domain_blacklist_enabled, class: 'form-check-label' do
+ Enable domain blacklist for sign ups
+ .form-group
+ .form-check
+ = radio_button_tag :blacklist_type, :file, false, class: 'form-check-input'
+ = label_tag :blacklist_type_file, class: 'form-check-label' do
+ .option-title
+ Upload blacklist file
+ .form-check
+ = radio_button_tag :blacklist_type, :raw, @application_setting.domain_blacklist.present? || @application_setting.domain_blacklist.blank?, class: 'form-check-input'
+ = label_tag :blacklist_type_raw, class: 'form-check-label' do
+ .option-title
+ Enter blacklist manually
+ .form-group.blacklist-file
+ = f.label :domain_blacklist_file, 'Blacklist file', class: 'label-light'
+ = f.file_field :domain_blacklist_file, class: 'form-control', accept: '.txt,.conf'
+ .form-text.text-muted Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines or commas for multiple entries.
+ .form-group.blacklist-raw
+ = f.label :domain_blacklist, 'Blacklisted domains for sign-ups', class: 'label-light'
+ = f.text_area :domain_blacklist_raw, placeholder: 'domain.com', class: 'form-control', rows: 8
+ .form-text.text-muted Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com
- .form-group.row
- = f.label :after_sign_up_text, class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_area :after_sign_up_text, class: 'form-control', rows: 4
- .form-text.text-muted Markdown enabled
+ .form-group
+ = f.label :after_sign_up_text, class: 'label-light'
+ = f.text_area :after_sign_up_text, class: 'form-control', rows: 4
+ .form-text.text-muted Markdown enabled
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_spam.html.haml b/app/views/admin/application_settings/_spam.html.haml
index fb38e4ae922..8f0dce962a9 100644
--- a/app/views/admin/application_settings/_spam.html.haml
+++ b/app/views/admin/application_settings/_spam.html.haml
@@ -2,64 +2,56 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :recaptcha_enabled, class: 'form-check-input'
- = f.label :recaptcha_enabled, class: 'form-check-label' do
- Enable reCAPTCHA
- %span.form-text.text-muted#recaptcha_help_block Helps prevent bots from creating accounts
-
- .form-group.row
- = f.label :recaptcha_site_key, 'reCAPTCHA Site Key', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :recaptcha_site_key, class: 'form-control'
- .form-text.text-muted
- Generate site and private keys at
- %a{ href: 'http://www.google.com/recaptcha', target: 'blank' } http://www.google.com/recaptcha
-
- .form-group.row
- = f.label :recaptcha_private_key, 'reCAPTCHA Private Key', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :recaptcha_private_key, class: 'form-control'
-
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :akismet_enabled, class: 'form-check-input'
- = f.label :akismet_enabled, class: 'form-check-label' do
- Enable Akismet
- %span.form-text.text-muted#akismet_help_block Helps prevent bots from creating issues
-
- .form-group.row
- = f.label :akismet_api_key, 'Akismet API Key', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.text_field :akismet_api_key, class: 'form-control'
- .form-text.text-muted
- Generate API key at
- %a{ href: 'http://www.akismet.com', target: 'blank' } http://www.akismet.com
-
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :unique_ips_limit_enabled, class: 'form-check-input'
- = f.label :unique_ips_limit_enabled, class: 'form-check-label' do
- Limit sign in from multiple ips
- %span.form-text.text-muted#unique_ip_help_block
- Helps prevent malicious users hide their activity
-
- .form-group.row
- = f.label :unique_ips_limit_per_user, 'IPs per user', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :unique_ips_limit_per_user, class: 'form-control'
- .form-text.text-muted
- Maximum number of unique IPs per user
-
- .form-group.row
- = f.label :unique_ips_limit_time_window, 'IP expiration time', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :unique_ips_limit_time_window, class: 'form-control'
- .form-text.text-muted
- How many seconds an IP will be counted towards the limit
+ .form-group
+ .form-check
+ = f.check_box :recaptcha_enabled, class: 'form-check-input'
+ = f.label :recaptcha_enabled, class: 'form-check-label' do
+ Enable reCAPTCHA
+ %span.form-text.text-muted#recaptcha_help_block Helps prevent bots from creating accounts
+
+ .form-group
+ = f.label :recaptcha_site_key, 'reCAPTCHA Site Key', class: 'label-light'
+ = f.text_field :recaptcha_site_key, class: 'form-control'
+ .form-text.text-muted
+ Generate site and private keys at
+ %a{ href: 'http://www.google.com/recaptcha', target: 'blank' } http://www.google.com/recaptcha
+
+ .form-group
+ = f.label :recaptcha_private_key, 'reCAPTCHA Private Key', class: 'label-light'
+ = f.text_field :recaptcha_private_key, class: 'form-control'
+
+ .form-group
+ .form-check
+ = f.check_box :akismet_enabled, class: 'form-check-input'
+ = f.label :akismet_enabled, class: 'form-check-label' do
+ Enable Akismet
+ %span.form-text.text-muted#akismet_help_block Helps prevent bots from creating issues
+
+ .form-group
+ = f.label :akismet_api_key, 'Akismet API Key', class: 'label-light'
+ = f.text_field :akismet_api_key, class: 'form-control'
+ .form-text.text-muted
+ Generate API key at
+ %a{ href: 'http://www.akismet.com', target: 'blank' } http://www.akismet.com
+
+ .form-group
+ .form-check
+ = f.check_box :unique_ips_limit_enabled, class: 'form-check-input'
+ = f.label :unique_ips_limit_enabled, class: 'form-check-label' do
+ Limit sign in from multiple ips
+ %span.form-text.text-muted#unique_ip_help_block
+ Helps prevent malicious users hide their activity
+
+ .form-group
+ = f.label :unique_ips_limit_per_user, 'IPs per user', class: 'label-light'
+ = f.number_field :unique_ips_limit_per_user, class: 'form-control'
+ .form-text.text-muted
+ Maximum number of unique IPs per user
+
+ .form-group
+ = f.label :unique_ips_limit_time_window, 'IP expiration time', class: 'label-light'
+ = f.number_field :unique_ips_limit_time_window, class: 'form-control'
+ .form-text.text-muted
+ How many seconds an IP will be counted towards the limit
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_terminal.html.haml b/app/views/admin/application_settings/_terminal.html.haml
index ae02d07e556..543628ff0ee 100644
--- a/app/views/admin/application_settings/_terminal.html.haml
+++ b/app/views/admin/application_settings/_terminal.html.haml
@@ -2,12 +2,11 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- = f.label :terminal_max_session_time, 'Max session time', class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.number_field :terminal_max_session_time, class: 'form-control'
- .form-text.text-muted
- Maximum time for web terminal websocket connection (in seconds).
- 0 for unlimited.
+ .form-group
+ = f.label :terminal_max_session_time, 'Max session time', class: 'label-light'
+ = f.number_field :terminal_max_session_time, class: 'form-control'
+ .form-text.text-muted
+ Maximum time for web terminal websocket connection (in seconds).
+ 0 for unlimited.
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_terms.html.haml b/app/views/admin/application_settings/_terms.html.haml
index 7941c8508e8..d3dc8659d1b 100644
--- a/app/views/admin/application_settings/_terms.html.haml
+++ b/app/views/admin/application_settings/_terms.html.haml
@@ -2,21 +2,18 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- .col-sm-12
- .form-check
- = f.check_box :enforce_terms, class: 'form-check-input'
- = f.label :enforce_terms, class: 'form-check-label' do
- = _("Require all users to accept Terms of Service and Privacy Policy when they access GitLab.")
- .form-text.text-muted
- = _("When enabled, users cannot use GitLab until the terms have been accepted.")
- .form-group.row
- .col-sm-12
- = f.label :terms do
- = _("Terms of Service Agreement and Privacy Policy")
- .col-sm-12
- = f.text_area :terms, class: 'form-control', rows: 8
+ .form-group
+ .form-check
+ = f.check_box :enforce_terms, class: 'form-check-input'
+ = f.label :enforce_terms, class: 'form-check-label' do
+ = _("Require all users to accept Terms of Service and Privacy Policy when they access GitLab.")
.form-text.text-muted
- = _("Markdown enabled")
+ = _("When enabled, users cannot use GitLab until the terms have been accepted.")
+ .form-group
+ = f.label :terms do
+ = _("Terms of Service Agreement and Privacy Policy")
+ = f.text_area :terms, class: 'form-control', rows: 8
+ .form-text.text-muted
+ = _("Markdown enabled")
= f.submit _("Save changes"), class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml
index c110fd4d60d..49a3ee33a85 100644
--- a/app/views/admin/application_settings/_usage.html.haml
+++ b/app/views/admin/application_settings/_usage.html.haml
@@ -2,36 +2,34 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- = f.check_box :version_check_enabled, class: 'form-check-input'
- = f.label :version_check_enabled, class: 'form-check-label' do
- Enable version check
- .form-text.text-muted
- GitLab will inform you if a new version is available.
- = link_to 'Learn more', help_page_path("user/admin_area/settings/usage_statistics", anchor: "version-check")
- about what information is shared with GitLab Inc.
- .form-group.row
- .offset-sm-2.col-sm-10
- - can_be_configured = @application_setting.usage_ping_can_be_configured?
- .form-check
- = f.check_box :usage_ping_enabled, disabled: !can_be_configured, class: 'form-check-input'
- = f.label :usage_ping_enabled, class: 'form-check-label' do
- Enable usage ping
- .form-text.text-muted
- - if can_be_configured
- To help improve GitLab and its user experience, GitLab will
- periodically collect usage information.
- = link_to 'Learn more', help_page_path("user/admin_area/settings/usage_statistics", anchor: "usage-ping")
- about what information is shared with GitLab Inc. Visit
- = link_to 'Cohorts', admin_cohorts_path(anchor: 'usage-ping')
- to see the JSON payload sent.
- - else
- The usage ping is disabled, and cannot be configured through this
- form. For more information, see the documentation on
- = succeed '.' do
- = link_to 'deactivating the usage ping', help_page_path('user/admin_area/settings/usage_statistics', anchor: 'deactivate-the-usage-ping')
+ .form-group
+ .form-check
+ = f.check_box :version_check_enabled, class: 'form-check-input'
+ = f.label :version_check_enabled, class: 'form-check-label' do
+ Enable version check
+ .form-text.text-muted
+ GitLab will inform you if a new version is available.
+ = link_to 'Learn more', help_page_path("user/admin_area/settings/usage_statistics", anchor: "version-check")
+ about what information is shared with GitLab Inc.
+ .form-group
+ - can_be_configured = @application_setting.usage_ping_can_be_configured?
+ .form-check
+ = f.check_box :usage_ping_enabled, disabled: !can_be_configured, class: 'form-check-input'
+ = f.label :usage_ping_enabled, class: 'form-check-label' do
+ Enable usage ping
+ .form-text.text-muted
+ - if can_be_configured
+ To help improve GitLab and its user experience, GitLab will
+ periodically collect usage information.
+ = link_to 'Learn more', help_page_path("user/admin_area/settings/usage_statistics", anchor: "usage-ping")
+ about what information is shared with GitLab Inc. Visit
+ = link_to 'Cohorts', admin_cohorts_path(anchor: 'usage-ping')
+ to see the JSON payload sent.
+ - else
+ The usage ping is disabled, and cannot be configured through this
+ form. For more information, see the documentation on
+ = succeed '.' do
+ = link_to 'deactivating the usage ping', help_page_path('user/admin_area/settings/usage_statistics', anchor: 'deactivate-the-usage-ping')
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_visibility_and_access.html.haml b/app/views/admin/application_settings/_visibility_and_access.html.haml
index 05520bd8d2d..4cc3e6a7d03 100644
--- a/app/views/admin/application_settings/_visibility_and_access.html.haml
+++ b/app/views/admin/application_settings/_visibility_and_access.html.haml
@@ -2,66 +2,57 @@
= form_errors(@application_setting)
%fieldset
- .form-group.row
- = f.label :default_branch_protection, class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.select :default_branch_protection, options_for_select(Gitlab::Access.protection_options, @application_setting.default_branch_protection), {}, class: 'form-control'
- .form-group.row.visibility-level-setting
- = f.label :default_project_visibility, class: 'col-form-label col-sm-2'
- .col-sm-10
- = render('shared/visibility_radios', model_method: :default_project_visibility, form: f, selected_level: @application_setting.default_project_visibility, form_model: Project.new)
- .form-group.row.visibility-level-setting
- = f.label :default_snippet_visibility, class: 'col-form-label col-sm-2'
- .col-sm-10
- = render('shared/visibility_radios', model_method: :default_snippet_visibility, form: f, selected_level: @application_setting.default_snippet_visibility, form_model: ProjectSnippet.new)
- .form-group.row.visibility-level-setting
- = f.label :default_group_visibility, class: 'col-form-label col-sm-2'
- .col-sm-10
- = render('shared/visibility_radios', model_method: :default_group_visibility, form: f, selected_level: @application_setting.default_group_visibility, form_model: Group.new)
- .form-group.row
- = f.label :restricted_visibility_levels, class: 'col-form-label col-sm-2'
- .col-sm-10
- - checkbox_name = 'application_setting[restricted_visibility_levels][]'
- = hidden_field_tag(checkbox_name)
- - restricted_level_checkboxes('restricted-visibility-help', checkbox_name, class: 'form-check-input').each do |level|
- .form-check
- = level
- %span.form-text.text-muted#restricted-visibility-help
- Selected levels cannot be used by non-admin users for groups, projects or snippets.
- If the public level is restricted, user profiles are only visible to logged in users.
- .form-group.row
- = f.label :import_sources, class: 'col-form-label col-sm-2'
- .col-sm-10
- = hidden_field_tag 'application_setting[import_sources][]'
- - import_sources_checkboxes('import-sources-help', class: 'form-check-input').each do |source|
- .form-check= source
- %span.form-text.text-muted#import-sources-help
- Enabled sources for code import during project creation. OmniAuth must be configured for GitHub
- = link_to "(?)", help_page_path("integration/github")
- , Bitbucket
- = link_to "(?)", help_page_path("integration/bitbucket")
- and GitLab.com
- = link_to "(?)", help_page_path("integration/gitlab")
-
- .form-group.row
- .offset-sm-2.col-sm-10
+ .form-group
+ = f.label :default_branch_protection, class: 'label-light'
+ = f.select :default_branch_protection, options_for_select(Gitlab::Access.protection_options, @application_setting.default_branch_protection), {}, class: 'form-control'
+ .form-group.visibility-level-setting
+ = f.label :default_project_visibility, class: 'label-light'
+ = render('shared/visibility_radios', model_method: :default_project_visibility, form: f, selected_level: @application_setting.default_project_visibility, form_model: Project.new)
+ .form-group.visibility-level-setting
+ = f.label :default_snippet_visibility, class: 'label-light'
+ = render('shared/visibility_radios', model_method: :default_snippet_visibility, form: f, selected_level: @application_setting.default_snippet_visibility, form_model: ProjectSnippet.new)
+ .form-group.visibility-level-setting
+ = f.label :default_group_visibility, class: 'label-light'
+ = render('shared/visibility_radios', model_method: :default_group_visibility, form: f, selected_level: @application_setting.default_group_visibility, form_model: Group.new)
+ .form-group
+ = f.label :restricted_visibility_levels, class: 'label-light'
+ - checkbox_name = 'application_setting[restricted_visibility_levels][]'
+ = hidden_field_tag(checkbox_name)
+ - restricted_level_checkboxes('restricted-visibility-help', checkbox_name, class: 'form-check-input').each do |level|
.form-check
- = f.check_box :project_export_enabled, class: 'form-check-input'
- = f.label :project_export_enabled, class: 'form-check-label' do
- Project export enabled
+ = level
+ %span.form-text.text-muted#restricted-visibility-help
+ Selected levels cannot be used by non-admin users for groups, projects or snippets.
+ If the public level is restricted, user profiles are only visible to logged in users.
+ .form-group
+ = f.label :import_sources, class: 'label-light'
+ = hidden_field_tag 'application_setting[import_sources][]'
+ - import_sources_checkboxes('import-sources-help', class: 'form-check-input').each do |source|
+ .form-check= source
+ %span.form-text.text-muted#import-sources-help
+ Enabled sources for code import during project creation. OmniAuth must be configured for GitHub
+ = link_to "(?)", help_page_path("integration/github")
+ , Bitbucket
+ = link_to "(?)", help_page_path("integration/bitbucket")
+ and GitLab.com
+ = link_to "(?)", help_page_path("integration/gitlab")
+
+ .form-group
+ .form-check
+ = f.check_box :project_export_enabled, class: 'form-check-input'
+ = f.label :project_export_enabled, class: 'form-check-label' do
+ Project export enabled
- .form-group.row
- %label.col-form-label.col-sm-2 Enabled Git access protocols
- .col-sm-10
- = select(:application_setting, :enabled_git_access_protocol, [['Both SSH and HTTP(S)', nil], ['Only SSH', 'ssh'], ['Only HTTP(S)', 'http']], {}, class: 'form-control')
- %span.form-text.text-muted#clone-protocol-help
- Allow only the selected protocols to be used for Git access.
+ .form-group
+ %label.label-light Enabled Git access protocols
+ = select(:application_setting, :enabled_git_access_protocol, [['Both SSH and HTTP(S)', nil], ['Only SSH', 'ssh'], ['Only HTTP(S)', 'http']], {}, class: 'form-control')
+ %span.form-text.text-muted#clone-protocol-help
+ Allow only the selected protocols to be used for Git access.
- ApplicationSetting::SUPPORTED_KEY_TYPES.each do |type|
- field_name = :"#{type}_key_restriction"
- .form-group.row
- = f.label field_name, "#{type.upcase} SSH keys", class: 'col-form-label col-sm-2'
- .col-sm-10
- = f.select field_name, key_restriction_options_for_select(type), {}, class: 'form-control'
+ .form-group
+ = f.label field_name, "#{type.upcase} SSH keys", class: 'label-light'
+ = f.select field_name, key_restriction_options_for_select(type), {}, class: 'form-control'
= f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/show.html.haml b/app/views/admin/application_settings/show.html.haml
index cb8c22ff076..38607ffca1c 100644
--- a/app/views/admin/application_settings/show.html.haml
+++ b/app/views/admin/application_settings/show.html.haml
@@ -169,7 +169,7 @@
.settings-content
= render 'logging'
-%section.settings.as-repository-storage.no-animate#js-repository-storage-settings{ class: ('expanded' if expanded) }
+%section.qa-repository-storage-settings.settings.as-repository-storage.no-animate#js-repository-storage-settings{ class: ('expanded' if expanded) }
.settings-header
%h4
= _('Repository storage')
diff --git a/app/views/award_emoji/_awards_block.html.haml b/app/views/award_emoji/_awards_block.html.haml
index 4b3c52af16a..8ca9fb4512e 100644
--- a/app/views/award_emoji/_awards_block.html.haml
+++ b/app/views/award_emoji/_awards_block.html.haml
@@ -12,9 +12,9 @@
- if can?(current_user, :award_emoji, awardable)
.award-menu-holder.js-award-holder
%button.btn.award-control.has-tooltip.js-add-award{ type: 'button',
- 'aria-label': 'Add reaction',
+ 'aria-label': _('Add reaction'),
class: ("js-user-authored" if user_authored),
- data: { title: 'Add reaction', placement: "bottom" } }
+ data: { title: _('Add reaction'), placement: "bottom" } }
%span{ class: "award-control-icon award-control-icon-neutral" }= custom_icon('emoji_slightly_smiling_face')
%span{ class: "award-control-icon award-control-icon-positive" }= custom_icon('emoji_smiley')
%span{ class: "award-control-icon award-control-icon-super-positive" }= custom_icon('emoji_smile')
diff --git a/app/views/errors/access_denied.html.haml b/app/views/errors/access_denied.html.haml
index 227c7884915..8ae29b9d337 100644
--- a/app/views/errors/access_denied.html.haml
+++ b/app/views/errors/access_denied.html.haml
@@ -1,4 +1,4 @@
-- message = local_assigns.fetch(:message)
+- message = local_assigns.fetch(:message, nil)
- content_for(:title, 'Access Denied')
= image_tag('illustrations/error-403.svg', alt: '403', lazy: false)
diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml
index 6a0321bcd2b..13d584f5f1d 100644
--- a/app/views/groups/group_members/index.html.haml
+++ b/app/views/groups/group_members/index.html.haml
@@ -25,9 +25,10 @@
%span.badge= @members.total_count
= form_tag group_group_members_path(@group), method: :get, class: 'form-inline member-search-form flex-project-members-form' do
.form-group
- = search_field_tag :search, params[:search], { placeholder: 'Find existing members by name', class: 'form-control', spellcheck: false }
- %button.member-search-btn{ type: "submit", "aria-label" => "Submit search" }
- = icon("search")
+ .position-relative.append-right-8
+ = search_field_tag :search, params[:search], { placeholder: 'Find existing members by name', class: 'form-control', spellcheck: false }
+ %button.member-search-btn{ type: "submit", "aria-label" => "Submit search" }
+ = icon("search")
- if can_manage_members
= render 'shared/members/filter_2fa_dropdown'
= render 'shared/members/sort_dropdown'
diff --git a/app/views/projects/deploy_keys/_index.html.haml b/app/views/projects/deploy_keys/_index.html.haml
index 6af57d3ab26..fb1ea471dec 100644
--- a/app/views/projects/deploy_keys/_index.html.haml
+++ b/app/views/projects/deploy_keys/_index.html.haml
@@ -1,5 +1,5 @@
- expanded = Rails.env.test?
-%section.settings.no-animate{ class: ('expanded' if expanded) }
+%section.qa-deploy-keys-settings.settings.no-animate{ class: ('expanded' if expanded) }
.settings-header
%h4
Deploy Keys
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index 77665a2ac23..9f175d2376f 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -82,7 +82,7 @@
= render_if_exists 'projects/issues_settings'
- %section.settings.merge-requests-feature.no-animate{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)] }
+ %section.qa-merge-request-settings.settings.merge-requests-feature.no-animate{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)] }
.settings-header
%h4
Merge request
@@ -101,7 +101,7 @@
= render 'export', project: @project
- %section.settings.advanced-settings.no-animate{ class: ('expanded' if expanded) }
+ %section.qa-advanced-settings.settings.advanced-settings.no-animate{ class: ('expanded' if expanded) }
.settings-header
%h4
Advanced
diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml
index 01e38ffee20..2f1877a15c2 100644
--- a/app/views/projects/merge_requests/show.html.haml
+++ b/app/views/projects/merge_requests/show.html.haml
@@ -32,26 +32,25 @@
.scrolling-tabs-container.inner-page-scroll-tabs.is-smaller
.fade-left= icon('angle-left')
.fade-right= icon('angle-right')
- .nav-links.scrolling-tabs.nav.nav-tabs
- %ul.merge-request-tabs.nav-tabs.nav
- %li.notes-tab
- = tab_link_for @merge_request, :show, force_link: @commit.present? do
- Discussion
- %span.badge.badge-pill= @merge_request.related_notes.user.count
- - if @merge_request.source_project
- %li.commits-tab
- = tab_link_for @merge_request, :commits do
- Commits
- %span.badge.badge-pill= @commits_count
- - if @pipelines.any?
- %li.pipelines-tab
- = tab_link_for @merge_request, :pipelines do
- Pipelines
- %span.badge.badge-pill.js-pipelines-mr-count= @pipelines.size
- %li.diffs-tab
- = tab_link_for @merge_request, :diffs do
- Changes
- %span.badge.badge-pill= @merge_request.diff_size
+ %ul.merge-request-tabs.nav-tabs.nav.nav-links.scrolling-tabs
+ %li.notes-tab
+ = tab_link_for @merge_request, :show, force_link: @commit.present? do
+ Discussion
+ %span.badge.badge-pill= @merge_request.related_notes.user.count
+ - if @merge_request.source_project
+ %li.commits-tab
+ = tab_link_for @merge_request, :commits do
+ Commits
+ %span.badge.badge-pill= @commits_count
+ - if @pipelines.any?
+ %li.pipelines-tab
+ = tab_link_for @merge_request, :pipelines do
+ Pipelines
+ %span.badge.badge-pill.js-pipelines-mr-count= @pipelines.size
+ %li.diffs-tab
+ = tab_link_for @merge_request, :diffs do
+ Changes
+ %span.badge.badge-pill= @merge_request.diff_size
- if has_vue_discussions_cookie?
#js-vue-discussion-counter
diff --git a/app/views/projects/project_members/_team.html.haml b/app/views/projects/project_members/_team.html.haml
index a30870a241c..0c5a187f208 100644
--- a/app/views/projects/project_members/_team.html.haml
+++ b/app/views/projects/project_members/_team.html.haml
@@ -9,9 +9,10 @@
%span.badge.badge-pill= members.total_count
= form_tag project_project_members_path(project), method: :get, class: 'form-inline member-search-form flex-project-members-form' do
.form-group
- = search_field_tag :search, params[:search], { placeholder: 'Find existing members by name', class: 'form-control', spellcheck: false }
- %button.member-search-btn{ type: "submit", "aria-label" => "Submit search" }
- = icon("search")
+ .position-relative
+ = search_field_tag :search, params[:search], { placeholder: 'Find existing members by name', class: 'form-control', spellcheck: false }
+ %button.member-search-btn{ type: "submit", "aria-label" => "Submit search" }
+ = icon("search")
= render 'shared/members/sort_dropdown'
%ul.content-list.members-list
= render partial: 'shared/members/member', collection: members, as: :member
diff --git a/app/views/projects/protected_branches/shared/_index.html.haml b/app/views/projects/protected_branches/shared/_index.html.haml
index 846f8858d14..4f1c6c92484 100644
--- a/app/views/projects/protected_branches/shared/_index.html.haml
+++ b/app/views/projects/protected_branches/shared/_index.html.haml
@@ -1,6 +1,6 @@
- expanded = Rails.env.test?
-%section.settings.no-animate{ class: ('expanded' if expanded) }
+%section.qa-protected-branches-settings.settings.no-animate{ class: ('expanded' if expanded) }
.settings-header
%h4
Protected Branches
diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml
index 3047207bca7..56c175f5649 100644
--- a/app/views/projects/settings/ci_cd/show.html.haml
+++ b/app/views/projects/settings/ci_cd/show.html.haml
@@ -16,7 +16,7 @@
.settings-content
= render 'form'
-%section.settings#autodevops-settings.no-animate{ class: ('expanded' if expanded) }
+%section.qa-autodevops-settings.settings#autodevops-settings.no-animate{ class: ('expanded' if expanded) }
.settings-header
%h4
= s_('CICD|Auto DevOps')
@@ -28,7 +28,7 @@
.settings-content
= render 'autodevops_form'
-%section.settings.no-animate{ class: ('expanded' if expanded) }
+%section.qa-runners-settings.settings.no-animate{ class: ('expanded' if expanded) }
.settings-header
%h4
Runners
@@ -39,7 +39,7 @@
.settings-content
= render 'projects/runners/index'
-%section.settings.no-animate{ class: ('expanded' if expanded) }
+%section.qa-variables-settings.settings.no-animate{ class: ('expanded' if expanded) }
.settings-header
%h4
= _('Variables')
diff --git a/app/views/shared/empty_states/_wikis.html.haml b/app/views/shared/empty_states/_wikis.html.haml
index fabb1f39a34..f1a41074c28 100644
--- a/app/views/shared/empty_states/_wikis.html.haml
+++ b/app/views/shared/empty_states/_wikis.html.haml
@@ -8,7 +8,7 @@
%h4
= s_('WikiEmpty|The wiki lets you write documentation for your project')
%p.text-left
- = s_("WikiEmpty|A wiki is where you can store all the details about your project. This can include why you've created it, it's principles, how to use it, and so on.")
+ = s_("WikiEmpty|A wiki is where you can store all the details about your project. This can include why you've created it, its principles, how to use it, and so on.")
= create_link
- elsif can?(current_user, :read_issue, @project)
diff --git a/changelogs/unreleased/35158-snippets-api-visibility.yml b/changelogs/unreleased/35158-snippets-api-visibility.yml
new file mode 100644
index 00000000000..f06015dda46
--- /dev/null
+++ b/changelogs/unreleased/35158-snippets-api-visibility.yml
@@ -0,0 +1,5 @@
+---
+title: Expose visibility via Snippets API
+merge_request: 19620
+author: Jan Beckmann
+type: added
diff --git a/changelogs/unreleased/42342-teams-pipeline-notifications.yml b/changelogs/unreleased/42342-teams-pipeline-notifications.yml
new file mode 100644
index 00000000000..4ef3a35465b
--- /dev/null
+++ b/changelogs/unreleased/42342-teams-pipeline-notifications.yml
@@ -0,0 +1,5 @@
+---
+title: Fixes Microsoft Teams notifications for pipeline events
+merge_request: 19632
+author: Jeff Brown
+type: fixed
diff --git a/changelogs/unreleased/44674-use-one-column-form-layout-on-admin-area-settings-page.yml b/changelogs/unreleased/44674-use-one-column-form-layout-on-admin-area-settings-page.yml
new file mode 100644
index 00000000000..69733889d5a
--- /dev/null
+++ b/changelogs/unreleased/44674-use-one-column-form-layout-on-admin-area-settings-page.yml
@@ -0,0 +1,5 @@
+---
+title: Use one column form layout on Admin Area Settings page
+merge_request:
+author:
+type: changed
diff --git a/changelogs/unreleased/45575-invalid-characters-signup.yml b/changelogs/unreleased/45575-invalid-characters-signup.yml
new file mode 100644
index 00000000000..679bd13e59b
--- /dev/null
+++ b/changelogs/unreleased/45575-invalid-characters-signup.yml
@@ -0,0 +1,5 @@
+---
+title: 'Fix username validation order on signup, resolves #45575'
+merge_request: 19610
+author: Jan Beckmann
+type: fixed
diff --git a/changelogs/unreleased/47050-quick-actions-case-insensitive.yml b/changelogs/unreleased/47050-quick-actions-case-insensitive.yml
new file mode 100644
index 00000000000..176aba627b9
--- /dev/null
+++ b/changelogs/unreleased/47050-quick-actions-case-insensitive.yml
@@ -0,0 +1,5 @@
+---
+title: Make quick commands case insensitive
+merge_request: 19614
+author: Jan Beckmann
+type: fixed
diff --git a/changelogs/unreleased/47145-quick-actions-confidential.yml b/changelogs/unreleased/47145-quick-actions-confidential.yml
new file mode 100644
index 00000000000..7ae4e2268af
--- /dev/null
+++ b/changelogs/unreleased/47145-quick-actions-confidential.yml
@@ -0,0 +1,5 @@
+---
+title: Add /confidential quick action
+merge_request:
+author: Jan Beckmann
+type: added
diff --git a/changelogs/unreleased/47408-migrateuploadsworker-is-doing-n-1-queries-on-migration.yml b/changelogs/unreleased/47408-migrateuploadsworker-is-doing-n-1-queries-on-migration.yml
new file mode 100644
index 00000000000..c0df82f35f1
--- /dev/null
+++ b/changelogs/unreleased/47408-migrateuploadsworker-is-doing-n-1-queries-on-migration.yml
@@ -0,0 +1,5 @@
+---
+title: Optimize the upload migration proces
+merge_request: 15947
+author:
+type: fixed
diff --git a/changelogs/unreleased/47513-upload-migration-lease-key-is-incorrect-for-non-mounted-uploaders.yml b/changelogs/unreleased/47513-upload-migration-lease-key-is-incorrect-for-non-mounted-uploaders.yml
new file mode 100644
index 00000000000..010c4e9bce7
--- /dev/null
+++ b/changelogs/unreleased/47513-upload-migration-lease-key-is-incorrect-for-non-mounted-uploaders.yml
@@ -0,0 +1,5 @@
+---
+title: Use upload ID for creating lease key for file uploaders.
+merge_request:
+author:
+type: fixed
diff --git a/changelogs/unreleased/commits_api_with_stats.yml b/changelogs/unreleased/commits_api_with_stats.yml
new file mode 100644
index 00000000000..4357f1a6305
--- /dev/null
+++ b/changelogs/unreleased/commits_api_with_stats.yml
@@ -0,0 +1,5 @@
+---
+title: Added with_statsoption for GET /projects/:id/repository/commits
+merge_request:
+author:
+type: added
diff --git a/changelogs/unreleased/fj-restore-users-v3-endpoint.yml b/changelogs/unreleased/fj-restore-users-v3-endpoint.yml
new file mode 100644
index 00000000000..c5f952dfa88
--- /dev/null
+++ b/changelogs/unreleased/fj-restore-users-v3-endpoint.yml
@@ -0,0 +1,5 @@
+---
+title: Restore API v3 user endpoint
+merge_request:
+author:
+type: changed
diff --git a/changelogs/unreleased/mk-rake-task-verify-remote-files.yml b/changelogs/unreleased/mk-rake-task-verify-remote-files.yml
new file mode 100644
index 00000000000..772aa11d89b
--- /dev/null
+++ b/changelogs/unreleased/mk-rake-task-verify-remote-files.yml
@@ -0,0 +1,5 @@
+---
+title: Add support for verifying remote uploads, artifacts, and LFS objects in check rake tasks
+merge_request: 19501
+author:
+type: added
diff --git a/changelogs/unreleased/rails5-fix-47366.yml b/changelogs/unreleased/rails5-fix-47366.yml
new file mode 100644
index 00000000000..7ea03d2b95e
--- /dev/null
+++ b/changelogs/unreleased/rails5-fix-47366.yml
@@ -0,0 +1,5 @@
+---
+title: Rails5 fix expected `issuable.reload.updated_at` to have changed
+merge_request: 19733
+author: Jasper Maes
+type: fixed
diff --git a/changelogs/unreleased/rosulk-patch-12.yml b/changelogs/unreleased/rosulk-patch-12.yml
new file mode 100644
index 00000000000..9637c88d1a4
--- /dev/null
+++ b/changelogs/unreleased/rosulk-patch-12.yml
@@ -0,0 +1,5 @@
+---
+title: Flex issue board columns
+merge_request: 19250
+author: Roman Rosluk
+type: changed
diff --git a/changelogs/unreleased/sql-buckets.yml b/changelogs/unreleased/sql-buckets.yml
new file mode 100644
index 00000000000..afb13d5cb20
--- /dev/null
+++ b/changelogs/unreleased/sql-buckets.yml
@@ -0,0 +1,5 @@
+---
+title: Adjust SQL and transaction Prometheus buckets
+merge_request:
+author:
+type: other
diff --git a/changelogs/unreleased/tz-diff-blob-image-viewer.yml b/changelogs/unreleased/tz-diff-blob-image-viewer.yml
new file mode 100644
index 00000000000..81d87bc71f5
--- /dev/null
+++ b/changelogs/unreleased/tz-diff-blob-image-viewer.yml
@@ -0,0 +1,5 @@
+---
+title: Web IDE supports now Image + Download Diff Viewing
+merge_request: 18768
+author:
+type: added
diff --git a/config/application.rb b/config/application.rb
index d379d611074..95f6d2c9af1 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -12,6 +12,7 @@ module Gitlab
require_dependency Rails.root.join('lib/gitlab/redis/shared_state')
require_dependency Rails.root.join('lib/gitlab/request_context')
require_dependency Rails.root.join('lib/gitlab/current_settings')
+ require_dependency Rails.root.join('lib/gitlab/middleware/read_only')
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
@@ -175,7 +176,7 @@ module Gitlab
ENV['GIT_TERMINAL_PROMPT'] = '0'
# Gitlab Read-only middleware support
- config.middleware.insert_after ActionDispatch::Flash, '::Gitlab::Middleware::ReadOnly'
+ config.middleware.insert_after ActionDispatch::Flash, ::Gitlab::Middleware::ReadOnly
config.generators do |g|
g.factory_bot false
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 1849c984351..af1011a1ab1 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -1,7 +1,7 @@
Rails.application.configure do
# Make sure the middleware is inserted first in middleware chain
- config.middleware.insert_before('ActionDispatch::Static', 'Gitlab::Testing::RequestBlockerMiddleware')
- config.middleware.insert_before('ActionDispatch::Static', 'Gitlab::Testing::RequestInspectorMiddleware')
+ config.middleware.insert_before(ActionDispatch::Static, Gitlab::Testing::RequestBlockerMiddleware)
+ config.middleware.insert_before(ActionDispatch::Static, Gitlab::Testing::RequestInspectorMiddleware)
# Settings specified here will take precedence over those in config/application.rb
diff --git a/doc/administration/raketasks/check.md b/doc/administration/raketasks/check.md
index 7d34d35e7d1..2649bf61d74 100644
--- a/doc/administration/raketasks/check.md
+++ b/doc/administration/raketasks/check.md
@@ -78,9 +78,10 @@ Example output:
## Uploaded Files Integrity
-Various types of file can be uploaded to a GitLab installation by users.
-Checksums are generated and stored in the database upon upload, and integrity
-checks using those checksums can be run. These checks also detect missing files.
+Various types of files can be uploaded to a GitLab installation by users.
+These integrity checks can detect missing files. Additionally, for locally
+stored files, checksums are generated and stored in the database upon upload,
+and these checks will verify them against current files.
Currently, integrity checks are supported for the following types of file:
diff --git a/doc/api/commits.md b/doc/api/commits.md
index d1584cf64de..d07b9d5614a 100644
--- a/doc/api/commits.md
+++ b/doc/api/commits.md
@@ -16,6 +16,7 @@ GET /projects/:id/repository/commits
| `until` | string | no | Only commits before or on this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ |
| `path` | string | no | The file path |
| `all` | boolean | no | Retrieve every commit from the repository |
+| `with_stats` | boolean | no | Stats about each commit will be added to the response |
```bash
diff --git a/doc/api/snippets.md b/doc/api/snippets.md
index 42b760c107d..7892866cd8e 100644
--- a/doc/api/snippets.md
+++ b/doc/api/snippets.md
@@ -49,6 +49,7 @@ Example response:
"title": "test",
"file_name": "add.rb",
"description": "Ruby test snippet",
+ "visibility": "private",
"author": {
"id": 1,
"username": "john_smith",
@@ -99,6 +100,7 @@ Example response:
"title": "This is a snippet",
"file_name": "test.txt",
"description": "Hello World snippet",
+ "visibility": "internal",
"author": {
"id": 1,
"username": "john_smith",
@@ -150,6 +152,7 @@ Example response:
"title": "test",
"file_name": "add.rb",
"description": "description of snippet",
+ "visibility": "internal",
"author": {
"id": 1,
"username": "john_smith",
@@ -238,7 +241,8 @@ Example response:
"raw_url": "http://localhost:3000/snippets/48/raw",
"title": "Minus similique nesciunt vel fugiat qui ullam sunt.",
"updated_at": "2016-11-25T16:53:34.479Z",
- "web_url": "http://localhost:3000/snippets/48"
+ "web_url": "http://localhost:3000/snippets/48",
+ "visibility": "public"
}
]
```
diff --git a/doc/development/changelog.md b/doc/development/changelog.md
index a9fa5ae834f..9e0c81b3d60 100644
--- a/doc/development/changelog.md
+++ b/doc/development/changelog.md
@@ -45,6 +45,8 @@ the `author` field. GitLab team members **should not**.
a changelog entry regardless of these guidelines if the contributor wants one.
Example: "Fixed a typo on the search results page. (Jane Smith)"
- Performance improvements **should** have a changelog entry.
+- Any change that introduces a database migration **must** have a
+ changelog entry.
## Writing good changelog entries
diff --git a/doc/development/new_fe_guide/development/testing.md b/doc/development/new_fe_guide/development/testing.md
index c359bd83ed1..e1e13474b75 100644
--- a/doc/development/new_fe_guide/development/testing.md
+++ b/doc/development/new_fe_guide/development/testing.md
@@ -1,3 +1,135 @@
-# Testing
+# Overview of Frontend Testing
-> TODO: Add content
+## Types of tests in our codebase
+
+* **RSpec**
+ * **[Ruby unit tests](#ruby-unit-tests-spec-rb)** for models, controllers, helpers, etc. (`/spec/**/*.rb`)
+ * **[Full feature tests](#full-feature-tests-spec-features-rb)** (`/spec/features/**/*.rb`)
+* **[Karma](#karma-tests-spec-javascripts-js)** (`/spec/javascripts/**/*.js`)
+* ~~Spinach~~ — These have been removed from our codebase in May 2018. (`/features/`)
+
+## RSpec: Ruby unit tests `/spec/**/*.rb`
+
+These tests are meant to unit test the ruby models, controllers and helpers.
+
+### When do we write/update these tests?
+
+Whenever we create or modify any Ruby models, controllers or helpers we add/update corresponding tests.
+
+---
+
+## RSpec: Full feature tests `/spec/features/**/*.rb`
+
+Full feature tests will load a full app environment and allow us to test things like rendering DOM, interacting with links and buttons, testing the outcome of those interactions through multiple pages if necessary. These are also called end-to-end tests but should not be confused with QA end-to-end tests (`package-and-qa` manual pipeline job).
+
+### When do we write/update these tests?
+
+When we add a new feature, we write at least two tests covering the success and the failure scenarios.
+
+### Relevant notes
+
+A `:js` flag is added to the test to make sure the full environment is loaded.
+
+```
+scenario 'successfully', :js do
+ sign_in(create(:admin))
+end
+```
+
+The steps of each test are written using capybara methods ([documentation](http://www.rubydoc.info/gems/capybara/2.15.1)).
+
+Bear in mind <abbr title="XMLHttpRequest">XHR</abbr> calls might require you to use `wait_for_requests` in between steps, like so:
+
+```rspec
+find('.form-control').native.send_keys(:enter)
+
+wait_for_requests
+
+expect(page).not_to have_selector('.card')
+```
+
+---
+
+## Karma tests `/spec/javascripts/**/*.js`
+
+These are the more frontend-focused, at the moment. They're **faster** than `rspec` and make for very quick testing of frontend components.
+
+### When do we write/update these tests?
+
+When we add/update a method/action/mutation to Vue or Vuex, we write karma tests to ensure the logic we wrote doesn't break. We should, however, refrain from writing tests that double-test Vue's internal features.
+
+### Relevant notes
+
+Karma tests are run against a virtual DOM.
+
+To populate the DOM, we can use fixtures to fake the generation of HTML instead of having Rails do that.
+
+Be sure to check the [best practices for karma tests](../../testing_guide/frontend_testing.html#best-practices).
+
+### Vue and Vuex
+
+Test as much as possible without double-testing Vue's internal features, as mentioned above.
+
+Make sure to test computedProperties, mutations, actions. Run the action and test that the proper mutations are committed.
+
+Also check these [notes on testing Vue components](../../fe_guide/vue.html#testing-vue-components).
+
+#### Vuex Helper: `testAction`
+
+We have a helper available to make testing actions easier, as per [official documentation](https://vuex.vuejs.org/en/testing.html):
+
+```
+testAction(
+ actions.actionName, // action
+ { }, // params to be passed to action
+ state, // state
+ [
+ { type: types.MUTATION},
+ { type: types.MUTATION_1, payload: {}},
+ ], // mutations committed
+ [
+ { type: 'actionName', payload: {}},
+ { type: 'actionName1', payload: {}},
+ ] // actions dispatched
+ done,
+);
+```
+
+Check an example in [spec/javascripts/ide/stores/actions_spec.jsspec/javascripts/ide/stores/actions_spec.js](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/spec/javascripts/ide/stores/actions_spec.js).
+
+#### Vue Helper: `mountComponent`
+
+To make mounting a Vue component easier and more readable, we have a few helpers available in `spec/helpers/vue_mount_component_helper`.
+
+* `createComponentWithStore`
+* `mountComponentWithStore`
+
+Examples of usage:
+
+```
+beforeEach(() => {
+ vm = createComponentWithStore(Component, store);
+
+ vm.$store.state.currentBranchId = 'master';
+
+ vm.$mount();
+},
+```
+
+```
+beforeEach(() => {
+ vm = mountComponentWithStore(Component, {
+ el: '#dummy-element',
+ store,
+ props: { badge },
+ });
+},
+```
+
+Don't forget to clean up:
+
+```
+afterEach(() => {
+ vm.$destroy();
+});
+```
diff --git a/doc/gitlab-basics/start-using-git.md b/doc/gitlab-basics/start-using-git.md
index 42cd8bb3e48..0d9994c9925 100644
--- a/doc/gitlab-basics/start-using-git.md
+++ b/doc/gitlab-basics/start-using-git.md
@@ -17,112 +17,197 @@ Depending on your operating system, you will need to use a shell of your prefere
Git is usually preinstalled on Mac and Linux.
Type the following command and then press enter:
-```
+
+```bash
git --version
```
-You should receive a message that will tell you which Git version you have on your computer. If you don’t receive a "Git version" message, it means that you need to [download Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
+You should receive a message that tells you which Git version you have on your computer. If you don’t receive a "Git version" message, it means that you need to [download Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
If Git doesn't automatically download, there's an option on the website to [download manually](https://git-scm.com/downloads). Then follow the steps on the installation window.
-After you are finished installing, open a new shell and type "git --version" again to verify that it was correctly installed.
+After you are finished installing Git, open a new shell and type `git --version` again to verify that it was correctly installed.
## Add your Git username and set your email
-It is important to configure your Git username and email address as every Git commit will use this information to identify you as the author.
+It is important to configure your Git username and email address, since every Git commit will use this information to identify you as the author.
On your shell, type the following command to add your username:
-```
+
+```bash
git config --global user.name "YOUR_USERNAME"
```
Then verify that you have the correct username:
-```
+
+```bash
git config --global user.name
```
To set your email address, type the following command:
-```
+
+```bash
git config --global user.email "your_email_address@example.com"
```
To verify that you entered your email correctly, type:
-```
+
+```bash
git config --global user.email
```
-You'll need to do this only once as you are using the `--global` option. It tells Git to always use this information for anything you do on that system. If you want to override this with a different username or email address for specific projects, you can run the command without the `--global` option when you’re in that project.
+You'll need to do this only once, since you are using the `--global` option. It tells Git to always use this information for anything you do on that system. If you want to override this with a different username or email address for specific projects, you can run the command without the `--global` option when you’re in that project.
## Check your information
-To view the information that you entered, type:
-```
+To view the information that you entered, along with other global options, type:
+
+```bash
git config --global --list
```
+
## Basic Git commands
### Go to the master branch to pull the latest changes from there
-```
+```bash
git checkout master
```
### Download the latest changes in the project
-This is for you to work on an up-to-date copy (it is important to do every time you work on a project), while you setup tracking branches.
+
+This is for you to work on an up-to-date copy (it is important to do this every time you start working on a project), while you set up tracking branches. You pull from remote repositories to get all the changes made by users since the last time you cloned or pulled the project. Later, you can push your local commits to the remote repositories.
+
+```bash
+git pull REMOTE NAME-OF-BRANCH
```
-git pull REMOTE NAME-OF-BRANCH -u
+
+When you first clone a repository, REMOTE is typically "origin". This is where the repository came from, and it indicates the SSH or HTTPS URL of the repository on the remote server. NAME-OF-BRANCH is usually "master", but it may be any existing branch.
+
+### View your remote repositories
+
+To view your remote repositories, type:
+
+```bash
+git remote -v
```
-(REMOTE: origin) (NAME-OF-BRANCH: could be "master" or an existing branch)
### Create a branch
-Spaces won't be recognized, so you will need to use a hyphen or underscore.
-```
+
+To create a branch, type the following (spaces won't be recognized in the branch name, so you will need to use a hyphen or underscore):
+
+```bash
git checkout -b NAME-OF-BRANCH
```
-### Work on a branch that has already been created
-```
+### Work on an existing branch
+
+To switch to an existing branch, so you can work on it:
+
+```bash
git checkout NAME-OF-BRANCH
```
### View the changes you've made
-It's important to be aware of what's happening and what's the status of your changes.
-```
+
+It's important to be aware of what's happening and the status of your changes. When you add, change, or delete files/folders, Git knows about it. To check the status of your changes:
+
+```bash
git status
```
-### Add changes to commit
-You'll see your changes in red when you type "git status".
+### View differences
+
+To view the differences between your local, unstaged changes and the repository versions that you cloned or pulled, type:
+
+```bash
+git diff
+```
+
+### Add and commit local changes
+
+You'll see your local changes in red when you type `git status`. These changes may be new, modified, or deleted files/folders. Use `git add` to stage a local file/folder for committing. Then use `git commit` to commit the staged files:
+
+```bash
+git add FILE OR FOLDER
+git commit -m "COMMENT TO DESCRIBE THE INTENTION OF THE COMMIT"
```
-git add CHANGES IN RED
-git commit -m "DESCRIBE THE INTENTION OF THE COMMIT"
+
+### Add all changes to commit
+
+To add and commit all local changes in one command:
+
+```bash
+git add .
+git commit -m "COMMENT TO DESCRIBE THE INTENTION OF THE COMMIT"
```
+NOTE: **Note:**
+The `.` character typically means _all_ in Git.
+
### Send changes to gitlab.com
-```
+
+To push all local commits to the remote repository:
+
+```bash
git push REMOTE NAME-OF-BRANCH
```
-### Delete all changes in the Git repository, but leave unstaged things
+For example, to push your local commits to the _master_ branch of the _origin_ remote:
+
+```bash
+git push origin master
```
+
+### Delete all changes in the Git repository
+
+To delete all local changes in the repository that have not been added to the staging area, and leave unstaged files/folders, type:
+
+```bash
git checkout .
```
-### Delete all changes in the Git repository, including untracked files
-```
+### Delete all untracked changes in the Git repository
+
+```bash
git clean -f
```
+### Unstage all changes that have been added to the staging area
+
+To undo the most recent add, but not committed, files/folders:
+
+```bash
+git reset .
+```
+
+### Undo most recent commit
+
+To undo the most recent commit, type:
+
+```bash
+git reset HEAD~1
+```
+
+This leaves the files and folders unstaged in your local repository.
+
+CAUTION: **Warning:**
+A Git commit is mostly irreversible, particularly if you already pushed it to the remote repository. Although you can undo a commit, the best option is to avoid the situation altogether.
+
### Merge created branch with master branch
+
You need to be in the created branch.
-```
+
+```bash
git checkout NAME-OF-BRANCH
git merge master
```
### Merge master branch with created branch
+
You need to be in the master branch.
-```
+
+```bash
git checkout master
git merge NAME-OF-BRANCH
```
diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md
index 7eab825fa32..aa2fcd82787 100644
--- a/doc/user/project/issue_board.md
+++ b/doc/user/project/issue_board.md
@@ -237,13 +237,15 @@ Issue Board, that is create/delete lists and drag issues around.
## Group Issue Board
->Introduced in GitLab 10.6
+> Introduced in [GitLab 10.6](https://about.gitlab.com/2018/03/22/gitlab-10-6-released/#single-group-issue-board-in-core-and-free)
Group issue board is analogous to project-level issue board and it is accessible at the group
navigation level. A group-level issue board allows you to view all issues from all projects in that group or descendant subgroups. Similarly, you can only filter by group labels for these
boards. When updating milestones and labels for an issue through the sidebar update mechanism, again only
group-level objects are available.
+One group issue board per group was made available in GitLab 10.6 Core after multiple group issue boards were originally introduced in [GitLab 10.0 Premium](https://about.gitlab.com/2017/09/22/gitlab-10-0-released/#group-issue-boards).
+
## Features per tier
Different issue board features are available in different [GitLab tiers](https://about.gitlab.com/pricing/), as shown in the following table:
diff --git a/doc/user/project/quick_actions.md b/doc/user/project/quick_actions.md
index 2f4ed3493c2..0ef8eddad20 100644
--- a/doc/user/project/quick_actions.md
+++ b/doc/user/project/quick_actions.md
@@ -42,3 +42,4 @@ do.
| `/tableflip` | Append the comment with `(╯°□°)╯︵ ┻━┻` |
| `/shrug` | Append the comment with `¯\_(ツ)_/¯` |
| <code>/copy_metadata #issue &#124; !merge_request</code> | Copy labels and milestone from other issue or merge request |
+| `/confidential` | Makes the issue confidential | \ No newline at end of file
diff --git a/doc/user/project/web_ide/index.md b/doc/user/project/web_ide/index.md
index 105d8a6ab61..b0143e45ab6 100644
--- a/doc/user/project/web_ide/index.md
+++ b/doc/user/project/web_ide/index.md
@@ -42,5 +42,26 @@ list.
An additional review mode is available when you open a merge request, which
shows you a preview of the merge request diff if you commit your changes.
+## View CI job logs
+
+> [Introduced in](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19279) [GitLab Core][ce] 11.0.
+
+The Web IDE can be used to quickly fix failing tests by opening the branch or
+merge request in the Web IDE and opening the logs of the failed job. The status
+of all jobs for the most recent pipeline and job traces for the current commit
+can be accessed by clicking the **Pipelines** button in the top right.
+
+The pipeline status is also shown at all times in the status bar in the bottom
+left.
+
+## Switching merge requests
+
+> [Introduced in](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19318) [GitLab Core][ce] 11.0.
+
+Switching between your authored and assigned merge requests can be done without
+leaving the Web IDE. Click the project name in the top left to open a list of
+merge requests. You will need to commit or discard all your changes before
+switching to a different merge request.
+
[ce]: https://about.gitlab.com/pricing/
[ee]: https://about.gitlab.com/pricing/
diff --git a/lib/api/commits.rb b/lib/api/commits.rb
index 684955a1b24..964780cba6a 100644
--- a/lib/api/commits.rb
+++ b/lib/api/commits.rb
@@ -15,19 +15,21 @@ module API
end
params do
optional :ref_name, type: String, desc: 'The name of a repository branch or tag, if not given the default branch is used'
- optional :since, type: DateTime, desc: 'Only commits after or on this date will be returned'
- optional :until, type: DateTime, desc: 'Only commits before or on this date will be returned'
- optional :path, type: String, desc: 'The file path'
- optional :all, type: Boolean, desc: 'Every commit will be returned'
+ optional :since, type: DateTime, desc: 'Only commits after or on this date will be returned'
+ optional :until, type: DateTime, desc: 'Only commits before or on this date will be returned'
+ optional :path, type: String, desc: 'The file path'
+ optional :all, type: Boolean, desc: 'Every commit will be returned'
+ optional :with_stats, type: Boolean, desc: 'Stats about each commit will be added to the response'
use :pagination
end
get ':id/repository/commits' do
- path = params[:path]
+ path = params[:path]
before = params[:until]
- after = params[:since]
- ref = params[:ref_name] || user_project.try(:default_branch) || 'master' unless params[:all]
+ after = params[:since]
+ ref = params[:ref_name] || user_project.try(:default_branch) || 'master' unless params[:all]
offset = (params[:page] - 1) * params[:per_page]
- all = params[:all]
+ all = params[:all]
+ with_stats = params[:with_stats]
commits = user_project.repository.commits(ref,
path: path,
@@ -47,7 +49,9 @@ module API
paginated_commits = Kaminari.paginate_array(commits, total_count: commit_count)
- present paginate(paginated_commits), with: Entities::Commit
+ serializer = with_stats ? Entities::CommitWithStats : Entities::Commit
+
+ present paginate(paginated_commits), with: serializer
end
desc 'Commit multiple file changes as one commit' do
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 22afcb9edf2..1cc8fcb8408 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -308,6 +308,10 @@ module API
expose :additions, :deletions, :total
end
+ class CommitWithStats < Commit
+ expose :stats, using: Entities::CommitStats
+ end
+
class CommitDetail < Commit
expose :stats, using: Entities::CommitStats, if: :stats
expose :status
@@ -358,7 +362,7 @@ module API
end
class Snippet < Grape::Entity
- expose :id, :title, :file_name, :description
+ expose :id, :title, :file_name, :description, :visibility
expose :author, using: Entities::UserBasic
expose :updated_at, :created_at
expose :project_id
@@ -412,6 +416,10 @@ module API
expose :state, :created_at, :updated_at
expose :due_date
expose :start_date
+
+ expose :web_url do |milestone, _options|
+ Gitlab::UrlBuilder.build(milestone)
+ end
end
class IssueBasic < ProjectEntity
diff --git a/lib/api/users.rb b/lib/api/users.rb
index 14b8a796c8e..e8df2c5a74a 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -531,18 +531,22 @@ module API
authenticate!
end
- desc 'Get the currently authenticated user' do
- success Entities::UserPublic
- end
- get do
- entity =
- if current_user.admin?
- Entities::UserWithAdmin
- else
- Entities::UserPublic
- end
+ # Enabling /user endpoint for the v3 version to allow oauth
+ # authentication through this endpoint.
+ version %w(v3 v4), using: :path do
+ desc 'Get the currently authenticated user' do
+ success Entities::UserPublic
+ end
+ get do
+ entity =
+ if current_user.admin?
+ Entities::UserWithAdmin
+ else
+ Entities::UserPublic
+ end
- present current_user, with: entity
+ present current_user, with: entity
+ end
end
desc "Get the currently authenticated user's SSH keys" do
diff --git a/lib/banzai/filter/milestone_reference_filter.rb b/lib/banzai/filter/milestone_reference_filter.rb
index b144bd8cf54..858e790005c 100644
--- a/lib/banzai/filter/milestone_reference_filter.rb
+++ b/lib/banzai/filter/milestone_reference_filter.rb
@@ -65,7 +65,7 @@ module Banzai
# We don't support IID lookups for group milestones, because IIDs can
# clash between group and project milestones.
if project.group && !params[:iid]
- finder_params[:group_ids] = [project.group.id]
+ finder_params[:group_ids] = project.group.self_and_ancestors.select(:id)
end
MilestonesFinder.new(finder_params).find_by(params)
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index e883964a090..61ae42a116b 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -1181,18 +1181,18 @@ module Gitlab
end
def compare_source_branch(target_branch_name, source_repository, source_branch_name, straight:)
- Gitlab::GitalyClient::StorageSettings.allow_disk_access do
- with_repo_branch_commit(source_repository, source_branch_name) do |commit|
- break unless commit
+ tmp_ref = "refs/tmp/#{SecureRandom.hex}"
- Gitlab::Git::Compare.new(
- self,
- target_branch_name,
- commit.sha,
- straight: straight
- )
- end
- end
+ return unless fetch_source_branch!(source_repository, source_branch_name, tmp_ref)
+
+ Gitlab::Git::Compare.new(
+ self,
+ target_branch_name,
+ tmp_ref,
+ straight: straight
+ )
+ ensure
+ delete_refs(tmp_ref)
end
def write_ref(ref_path, ref, old_ref: nil, shell: true)
diff --git a/lib/gitlab/gitaly_client/commit_service.rb b/lib/gitlab/gitaly_client/commit_service.rb
index a4cc64de80d..7f2e6441f16 100644
--- a/lib/gitlab/gitaly_client/commit_service.rb
+++ b/lib/gitlab/gitaly_client/commit_service.rb
@@ -179,6 +179,8 @@ module Gitlab
end
def list_commits_by_oid(oids)
+ return [] if oids.empty?
+
request = Gitaly::ListCommitsByOidRequest.new(repository: @gitaly_repo, oid: oids)
response = GitalyClient.call(@repository.storage, :commit_service, :list_commits_by_oid, request, timeout: GitalyClient.medium_timeout)
diff --git a/lib/gitlab/github_import/parallel_importer.rb b/lib/gitlab/github_import/parallel_importer.rb
index b02b123c98e..a77ac1e4fa6 100644
--- a/lib/gitlab/github_import/parallel_importer.rb
+++ b/lib/gitlab/github_import/parallel_importer.rb
@@ -15,6 +15,15 @@ module Gitlab
true
end
+ # This is a workaround for a Ruby 2.3.7 bug. rspec-mocks cannot restore
+ # the visibility of prepended modules. See
+ # https://github.com/rspec/rspec-mocks/issues/1231 for more details.
+ if Rails.env.test?
+ def self.requires_ci_cd_setup?
+ raise NotImplementedError
+ end
+ end
+
def initialize(project)
@project = project
end
diff --git a/lib/gitlab/metrics/subscribers/active_record.rb b/lib/gitlab/metrics/subscribers/active_record.rb
index 4b3e8d0a6a0..38f119cf06d 100644
--- a/lib/gitlab/metrics/subscribers/active_record.rb
+++ b/lib/gitlab/metrics/subscribers/active_record.rb
@@ -20,7 +20,7 @@ module Gitlab
define_histogram :gitlab_sql_duration_seconds do
docstring 'SQL time'
base_labels Transaction::BASE_LABELS
- buckets [0.001, 0.01, 0.1, 1.0, 10.0]
+ buckets [0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0]
end
def current_transaction
diff --git a/lib/gitlab/metrics/transaction.rb b/lib/gitlab/metrics/transaction.rb
index f3e48083c19..9f903e96585 100644
--- a/lib/gitlab/metrics/transaction.rb
+++ b/lib/gitlab/metrics/transaction.rb
@@ -140,7 +140,7 @@ module Gitlab
define_histogram :gitlab_transaction_duration_seconds do
docstring 'Transaction duration'
base_labels BASE_LABELS
- buckets [0.001, 0.01, 0.1, 1.0, 10.0]
+ buckets [0.1, 0.25, 0.5, 1.0, 2.5, 5.0]
end
define_histogram :gitlab_transaction_allocated_memory_bytes do
diff --git a/lib/gitlab/quick_actions/extractor.rb b/lib/gitlab/quick_actions/extractor.rb
index 075ff91700c..30c6806b68e 100644
--- a/lib/gitlab/quick_actions/extractor.rb
+++ b/lib/gitlab/quick_actions/extractor.rb
@@ -39,7 +39,7 @@ module Gitlab
content.delete!("\r")
content.gsub!(commands_regex) do
if $~[:cmd]
- commands << [$~[:cmd], $~[:arg]].reject(&:blank?)
+ commands << [$~[:cmd].downcase, $~[:arg]].reject(&:blank?)
''
else
$~[0]
@@ -102,14 +102,14 @@ module Gitlab
# /close
^\/
- (?<cmd>#{Regexp.union(names)})
+ (?<cmd>#{Regexp.new(Regexp.union(names).source, Regexp::IGNORECASE)})
(?:
[ ]
(?<arg>[^\n]*)
)?
(?:\n|$)
)
- }mx
+ }mix
end
def perform_substitutions(content, commands)
@@ -120,7 +120,7 @@ module Gitlab
end
substitution_definitions.each do |substitution|
- match_data = substitution.match(content)
+ match_data = substitution.match(content.downcase)
if match_data
command = [substitution.name.to_s]
command << match_data[1] unless match_data[1].empty?
diff --git a/lib/gitlab/quick_actions/substitution_definition.rb b/lib/gitlab/quick_actions/substitution_definition.rb
index 032c49ed159..688056e5d73 100644
--- a/lib/gitlab/quick_actions/substitution_definition.rb
+++ b/lib/gitlab/quick_actions/substitution_definition.rb
@@ -15,7 +15,7 @@ module Gitlab
return unless content
all_names.each do |a_name|
- content.gsub!(%r{/#{a_name} ?(.*)$}, execute_block(action_block, context, '\1'))
+ content.gsub!(%r{/#{a_name} ?(.*)$}i, execute_block(action_block, context, '\1'))
end
content
end
diff --git a/lib/gitlab/url_builder.rb b/lib/gitlab/url_builder.rb
index 824e2d7251f..e64033b0dba 100644
--- a/lib/gitlab/url_builder.rb
+++ b/lib/gitlab/url_builder.rb
@@ -26,6 +26,8 @@ module Gitlab
project_snippet_url(object.project, object)
when Snippet
snippet_url(object)
+ when Milestone
+ milestone_url(object)
else
raise NotImplementedError.new("No URL builder defined for #{object.class}")
end
diff --git a/lib/gitlab/verify/batch_verifier.rb b/lib/gitlab/verify/batch_verifier.rb
index 1ef369a4b67..167ba1b3149 100644
--- a/lib/gitlab/verify/batch_verifier.rb
+++ b/lib/gitlab/verify/batch_verifier.rb
@@ -7,13 +7,15 @@ module Gitlab
@batch_size = batch_size
@start = start
@finish = finish
+
+ fix_google_api_logger
end
# Yields a Range of IDs and a Hash of failed verifications (object => error)
def run_batches(&blk)
- relation.in_batches(of: batch_size, start: start, finish: finish) do |relation| # rubocop: disable Cop/InBatches
- range = relation.first.id..relation.last.id
- failures = run_batch(relation)
+ all_relation.in_batches(of: batch_size, start: start, finish: finish) do |batch| # rubocop: disable Cop/InBatches
+ range = batch.first.id..batch.last.id
+ failures = run_batch_for(batch)
yield(range, failures)
end
@@ -29,24 +31,56 @@ module Gitlab
private
- def run_batch(relation)
- relation.map { |upload| verify(upload) }.compact.to_h
+ def run_batch_for(batch)
+ batch.map { |upload| verify(upload) }.compact.to_h
end
def verify(object)
+ local?(object) ? verify_local(object) : verify_remote(object)
+ rescue => err
+ failure(object, err.inspect)
+ end
+
+ def verify_local(object)
expected = expected_checksum(object)
actual = actual_checksum(object)
- raise 'Checksum missing' unless expected.present?
- raise 'Checksum mismatch' unless expected == actual
+ return failure(object, 'Checksum missing') unless expected.present?
+ return failure(object, 'Checksum mismatch') unless expected == actual
+
+ success
+ end
+ # We don't calculate checksum for remote objects, so just check existence
+ def verify_remote(object)
+ return failure(object, 'Remote object does not exist') unless remote_object_exists?(object)
+
+ success
+ end
+
+ def success
nil
- rescue => err
- [object, err]
+ end
+
+ def failure(object, message)
+ [object, message]
+ end
+
+ # It's already set to Logger::INFO, but acts as if it is set to
+ # Logger::DEBUG, and this fixes it...
+ def fix_google_api_logger
+ if Object.const_defined?('Google::Apis')
+ Google::Apis.logger.level = Logger::INFO
+ end
end
# This should return an ActiveRecord::Relation suitable for calling #in_batches on
- def relation
+ def all_relation
+ raise NotImplementedError.new
+ end
+
+ # Should return true if the object is stored locally
+ def local?(_object)
raise NotImplementedError.new
end
@@ -59,6 +93,11 @@ module Gitlab
def actual_checksum(_object)
raise NotImplementedError.new
end
+
+ # Be sure to perform a hard check of the remote object (don't just check DB value)
+ def remote_object_exists?(object)
+ raise NotImplementedError.new
+ end
end
end
end
diff --git a/lib/gitlab/verify/job_artifacts.rb b/lib/gitlab/verify/job_artifacts.rb
index 03500a61074..dbadfbde9e3 100644
--- a/lib/gitlab/verify/job_artifacts.rb
+++ b/lib/gitlab/verify/job_artifacts.rb
@@ -11,10 +11,14 @@ module Gitlab
private
- def relation
+ def all_relation
::Ci::JobArtifact.all
end
+ def local?(artifact)
+ artifact.local_store?
+ end
+
def expected_checksum(artifact)
artifact.file_sha256
end
@@ -22,6 +26,10 @@ module Gitlab
def actual_checksum(artifact)
Digest::SHA256.file(artifact.file.path).hexdigest
end
+
+ def remote_object_exists?(artifact)
+ artifact.file.file.exists?
+ end
end
end
end
diff --git a/lib/gitlab/verify/lfs_objects.rb b/lib/gitlab/verify/lfs_objects.rb
index 970e2a7b718..d3f58a73ac7 100644
--- a/lib/gitlab/verify/lfs_objects.rb
+++ b/lib/gitlab/verify/lfs_objects.rb
@@ -11,8 +11,12 @@ module Gitlab
private
- def relation
- LfsObject.with_files_stored_locally
+ def all_relation
+ LfsObject.all
+ end
+
+ def local?(lfs_object)
+ lfs_object.local_store?
end
def expected_checksum(lfs_object)
@@ -22,6 +26,10 @@ module Gitlab
def actual_checksum(lfs_object)
LfsObject.calculate_oid(lfs_object.file.path)
end
+
+ def remote_object_exists?(lfs_object)
+ lfs_object.file.file.exists?
+ end
end
end
end
diff --git a/lib/gitlab/verify/rake_task.rb b/lib/gitlab/verify/rake_task.rb
index dd138e6b92b..e190eaddc79 100644
--- a/lib/gitlab/verify/rake_task.rb
+++ b/lib/gitlab/verify/rake_task.rb
@@ -45,7 +45,7 @@ module Gitlab
return unless verbose?
failures.each do |object, error|
- say " - #{verifier.describe(object)}: #{error.inspect}".color(:red)
+ say " - #{verifier.describe(object)}: #{error}".color(:red)
end
end
end
diff --git a/lib/gitlab/verify/uploads.rb b/lib/gitlab/verify/uploads.rb
index 0ffa71a6d72..01f09ab8df7 100644
--- a/lib/gitlab/verify/uploads.rb
+++ b/lib/gitlab/verify/uploads.rb
@@ -11,8 +11,12 @@ module Gitlab
private
- def relation
- Upload.with_files_stored_locally
+ def all_relation
+ Upload.all
+ end
+
+ def local?(upload)
+ upload.local?
end
def expected_checksum(upload)
@@ -22,6 +26,10 @@ module Gitlab
def actual_checksum(upload)
Upload.hexdigest(upload.absolute_path)
end
+
+ def remote_object_exists?(upload)
+ upload.build_uploader.file.exists?
+ end
end
end
end
diff --git a/lib/microsoft_teams/notifier.rb b/lib/microsoft_teams/notifier.rb
index c08d3e933a8..226ee1373db 100644
--- a/lib/microsoft_teams/notifier.rb
+++ b/lib/microsoft_teams/notifier.rb
@@ -30,7 +30,7 @@ module MicrosoftTeams
result = { 'sections' => [] }
result['title'] = options[:title]
- result['summary'] = options[:pretext]
+ result['summary'] = options[:summary]
result['sections'] << MicrosoftTeams::Activity.new(options[:activity]).prepare
attachments = options[:attachments]
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 5aa6e5c05e6..e8a5a15f410 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-06-11 09:18+0200\n"
-"PO-Revision-Date: 2018-06-11 09:18+0200\n"
+"POT-Creation-Date: 2018-06-12 18:57+1000\n"
+"PO-Revision-Date: 2018-06-12 18:57+1000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
@@ -262,6 +262,9 @@ msgstr ""
msgid "Add new directory"
msgstr ""
+msgid "Add reaction"
+msgstr ""
+
msgid "Add todo"
msgstr ""
@@ -4734,7 +4737,7 @@ msgstr ""
msgid "WikiEmptyIssueMessage|issue tracker"
msgstr ""
-msgid "WikiEmpty|A wiki is where you can store all the details about your project. This can include why you've created it, it's principles, how to use it, and so on."
+msgid "WikiEmpty|A wiki is where you can store all the details about your project. This can include why you've created it, its principles, how to use it, and so on."
msgstr ""
msgid "WikiEmpty|Create your first page"
diff --git a/package.json b/package.json
index 4a3dbb34bee..4e1ca905ee8 100644
--- a/package.json
+++ b/package.json
@@ -117,7 +117,7 @@
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-jasmine": "^2.1.0",
"eslint-plugin-promise": "^3.8.0",
- "eslint-plugin-vue": "^4.0.1",
+ "eslint-plugin-vue": "^4.5.0",
"ignore": "^3.3.7",
"istanbul": "^0.4.5",
"jasmine-core": "^2.9.0",
diff --git a/qa/qa/page/admin/settings/main.rb b/qa/qa/page/admin/settings/main.rb
index e7c1220c967..db3387b4557 100644
--- a/qa/qa/page/admin/settings/main.rb
+++ b/qa/qa/page/admin/settings/main.rb
@@ -6,11 +6,11 @@ module QA
include QA::Page::Settings::Common
view 'app/views/admin/application_settings/show.html.haml' do
- element :advanced_settings_section, 'Repository storage'
+ element :repository_storage_settings
end
def expand_repository_storage(&block)
- expand_section('Repository storage') do
+ expand_section(:repository_storage_settings) do
RepositoryStorage.perform(&block)
end
end
diff --git a/qa/qa/page/project/settings/advanced.rb b/qa/qa/page/project/settings/advanced.rb
index 5ef00504fdf..d7b2b66b587 100644
--- a/qa/qa/page/project/settings/advanced.rb
+++ b/qa/qa/page/project/settings/advanced.rb
@@ -4,9 +4,9 @@ module QA
module Settings
class Advanced < Page::Base
view 'app/views/projects/edit.html.haml' do
- element :project_path_field, 'f.text_field :path'
- element :project_name_field, 'f.text_field :name'
- element :rename_project_button, "f.submit 'Rename project'"
+ element :project_path_field, 'text_field :path'
+ element :project_name_field, 'text_field :name'
+ element :rename_project_button, "submit 'Rename project'"
end
def rename_to(path)
diff --git a/qa/qa/page/project/settings/ci_cd.rb b/qa/qa/page/project/settings/ci_cd.rb
index d5da9ea0099..1466bc2e0bf 100644
--- a/qa/qa/page/project/settings/ci_cd.rb
+++ b/qa/qa/page/project/settings/ci_cd.rb
@@ -6,31 +6,33 @@ module QA # rubocop:disable Naming/FileName
include Common
view 'app/views/projects/settings/ci_cd/show.html.haml' do
- element :runners_settings, 'Runners'
- element :secret_variables, 'Variables'
- element :auto_devops_section, 'Auto DevOps'
+ element :autodevops_settings
+ element :runners_settings
+ element :variables_settings
end
view 'app/views/projects/settings/ci_cd/_autodevops_form.html.haml' do
- element :enable_auto_devops_button, 'Enable Auto DevOps'
- element :domain_input, 'Domain'
+ element :enable_auto_devops_field, 'radio_button :enabled'
+ element :domain_field, 'text_field :domain'
+ element :enable_auto_devops_button, "%strong= s_('CICD|Enable Auto DevOps')"
+ element :domain_input, "%strong= _('Domain')"
element :save_changes_button, "submit 'Save changes'"
end
def expand_runners_settings(&block)
- expand_section('Runners') do
+ expand_section(:runners_settings) do
Settings::Runners.perform(&block)
end
end
def expand_secret_variables(&block)
- expand_section('Variables') do
+ expand_section(:variables_settings) do
Settings::SecretVariables.perform(&block)
end
end
def enable_auto_devops_with_domain(domain)
- expand_section('Auto DevOps') do
+ expand_section(:autodevops_settings) do
choose 'Enable Auto DevOps'
fill_in 'Domain', with: domain
click_on 'Save changes'
diff --git a/qa/qa/page/project/settings/main.rb b/qa/qa/page/project/settings/main.rb
index e3faa76b966..d8cf1d49dd2 100644
--- a/qa/qa/page/project/settings/main.rb
+++ b/qa/qa/page/project/settings/main.rb
@@ -6,11 +6,11 @@ module QA
include Common
view 'app/views/projects/edit.html.haml' do
- element :advanced_settings_section, 'Advanced'
+ element :advanced_settings
end
def expand_advanced_settings(&block)
- expand_section('Advanced settings') do
+ expand_section(:advanced_settings) do
Advanced.perform(&block)
end
end
diff --git a/qa/qa/page/project/settings/merge_request.rb b/qa/qa/page/project/settings/merge_request.rb
index 06d4937a4c8..d044d3715a9 100644
--- a/qa/qa/page/project/settings/merge_request.rb
+++ b/qa/qa/page/project/settings/merge_request.rb
@@ -5,17 +5,17 @@ module QA
class MergeRequest < QA::Page::Base
include Common
- view 'app/views/projects/_merge_request_merge_method_settings.html.haml' do
- element :radio_button_merge_ff
- end
-
view 'app/views/projects/edit.html.haml' do
- element :merge_request_settings, 'Merge request'
+ element :merge_request_settings
element :save_merge_request_changes
end
+ view 'app/views/projects/_merge_request_merge_method_settings.html.haml' do
+ element :radio_button_merge_ff
+ end
+
def enable_ff_only
- expand_section('Merge request') do
+ expand_section(:merge_request_settings) do
click_element :radio_button_merge_ff
click_element :save_merge_request_changes
end
diff --git a/qa/qa/page/project/settings/repository.rb b/qa/qa/page/project/settings/repository.rb
index 30900e74e90..1ed5f455a85 100644
--- a/qa/qa/page/project/settings/repository.rb
+++ b/qa/qa/page/project/settings/repository.rb
@@ -6,17 +6,21 @@ module QA
include Common
view 'app/views/projects/deploy_keys/_index.html.haml' do
- element :deploy_keys_section, 'Deploy Keys'
+ element :deploy_keys_settings
+ end
+
+ view 'app/views/projects/protected_branches/shared/_index.html.haml' do
+ element :protected_branches_settings
end
def expand_deploy_keys(&block)
- expand_section('Deploy Keys') do
+ expand_section(:deploy_keys_settings) do
DeployKeys.perform(&block)
end
end
def expand_protected_branches(&block)
- expand_section('Protected Branches') do
+ expand_section(:protected_branches_settings) do
ProtectedBranches.perform(&block)
end
end
diff --git a/qa/qa/page/settings/common.rb b/qa/qa/page/settings/common.rb
index a683a6829d5..f9f71aa4a72 100644
--- a/qa/qa/page/settings/common.rb
+++ b/qa/qa/page/settings/common.rb
@@ -4,19 +4,17 @@ module QA
module Common
# Click the Expand button present in the specified section
#
- # @param [String] name present in the container in the DOM
- def expand_section(name)
- page.within('#content-body') do
- page.within('section', text: name) do
- # Because it is possible to click the button before the JS toggle code is bound
- wait(reload: false) do
- click_button 'Expand' unless first('button', text: 'Collapse')
+ # @param [Symbol] and `element` name defined in a `view` block
+ def expand_section(element_name)
+ within_element(element_name) do
+ # Because it is possible to click the button before the JS toggle code is bound
+ wait(reload: false) do
+ click_button 'Expand' unless first('button', text: 'Collapse')
- page.has_content?('Collapse')
- end
-
- yield if block_given?
+ page.has_content?('Collapse')
end
+
+ yield if block_given?
end
end
end
diff --git a/qa/qa/runtime/browser.rb b/qa/qa/runtime/browser.rb
index a12d95683af..ecd273c6db8 100644
--- a/qa/qa/runtime/browser.rb
+++ b/qa/qa/runtime/browser.rb
@@ -102,19 +102,7 @@ module QA
def perform(&block)
visit(url)
- yield if block_given?
- rescue
- raise if block.nil?
-
- # RSpec examples will take care of screenshots on their own
- #
- unless block.binding.receiver.is_a?(RSpec::Core::ExampleGroup)
- screenshot_and_save_page
- end
-
- raise
- ensure
- clear! if block_given?
+ yield.tap { clear! } if block_given?
end
##
diff --git a/qa/qa/specs/features/merge_request/create_spec.rb b/qa/qa/specs/features/merge_request/create_spec.rb
index 0931e649e24..befbc0b281a 100644
--- a/qa/qa/specs/features/merge_request/create_spec.rb
+++ b/qa/qa/specs/features/merge_request/create_spec.rb
@@ -11,7 +11,7 @@ module QA
expect(page).to have_content('This is a merge request')
expect(page).to have_content('Great feature')
- expect(page).to have_content(/Opened [\w\s]+ a minute ago/)
+ expect(page).to have_content(/Opened [\w\s]+ ago/)
end
end
end
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb
index 773bf25ed44..fbafb4a4de8 100644
--- a/spec/controllers/application_controller_spec.rb
+++ b/spec/controllers/application_controller_spec.rb
@@ -458,6 +458,8 @@ describe ApplicationController do
end
context 'for sessionless users' do
+ render_views
+
before do
sign_out user
end
@@ -468,6 +470,14 @@ describe ApplicationController do
expect(response).to have_gitlab_http_status(403)
end
+ it 'renders the error message when the format was html' do
+ get :index,
+ private_token: create(:personal_access_token, user: user).token,
+ format: :html
+
+ expect(response.body).to have_content /accept the terms of service/i
+ end
+
it 'renders a 200 when the sessionless user accepted the terms' do
accept_terms(user)
diff --git a/spec/features/issues/user_uses_slash_commands_spec.rb b/spec/features/issues/user_uses_slash_commands_spec.rb
index fd0aa6cf3a3..dacca494755 100644
--- a/spec/features/issues/user_uses_slash_commands_spec.rb
+++ b/spec/features/issues/user_uses_slash_commands_spec.rb
@@ -153,6 +153,42 @@ feature 'Issues > User uses quick actions', :js do
end
end
+ describe 'make issue confidential' do
+ let(:issue) { create(:issue, project: project) }
+ let(:original_issue) { create(:issue, project: project) }
+
+ context 'when the current user can update issues' do
+ it 'does not create a note, and marks the issue as confidential' do
+ add_note("/confidential")
+
+ expect(page).not_to have_content "/confidential"
+ expect(page).to have_content 'Commands applied'
+ expect(page).to have_content "made the issue confidential"
+
+ expect(issue.reload).to be_confidential
+ end
+ end
+
+ context 'when the current user cannot update the issue' do
+ let(:guest) { create(:user) }
+ before do
+ project.add_guest(guest)
+ gitlab_sign_out
+ sign_in(guest)
+ visit project_issue_path(project, issue)
+ end
+
+ it 'does not create a note, and does not mark the issue as confidential' do
+ add_note("/confidential")
+
+ expect(page).not_to have_content 'Commands applied'
+ expect(page).not_to have_content "made the issue confidential"
+
+ expect(issue.reload).not_to be_confidential
+ end
+ end
+ end
+
describe 'move the issue to another project' do
let(:issue) { create(:issue, project: project) }
diff --git a/spec/fixtures/api/schemas/public_api/v4/commit/with_stats.json b/spec/fixtures/api/schemas/public_api/v4/commit/with_stats.json
new file mode 100644
index 00000000000..3b5dd547e69
--- /dev/null
+++ b/spec/fixtures/api/schemas/public_api/v4/commit/with_stats.json
@@ -0,0 +1,14 @@
+{
+ "type": "object",
+ "allOf": [
+ { "$ref": "basic.json" },
+ {
+ "required" : [
+ "stats"
+ ],
+ "properties": {
+ "stats": { "$ref": "../commit_stats.json" }
+ }
+ }
+ ]
+}
diff --git a/spec/fixtures/api/schemas/public_api/v4/commits_with_stats.json b/spec/fixtures/api/schemas/public_api/v4/commits_with_stats.json
new file mode 100644
index 00000000000..23511123ce4
--- /dev/null
+++ b/spec/fixtures/api/schemas/public_api/v4/commits_with_stats.json
@@ -0,0 +1,4 @@
+{
+ "type": "array",
+ "items": { "$ref": "commit/with_stats.json" }
+}
diff --git a/spec/fixtures/api/schemas/public_api/v4/milestones.json b/spec/fixtures/api/schemas/public_api/v4/milestones.json
index c3c42b6ee60..448e97d6c85 100644
--- a/spec/fixtures/api/schemas/public_api/v4/milestones.json
+++ b/spec/fixtures/api/schemas/public_api/v4/milestones.json
@@ -13,7 +13,8 @@
"created_at": { "type": "date" },
"updated_at": { "type": "date" },
"start_date": { "type": "date" },
- "due_date": { "type": "date" }
+ "due_date": { "type": "date" },
+ "web_url": { "type": "string" }
},
"required": [
"id", "iid", "title", "description", "state",
diff --git a/spec/fixtures/api/schemas/public_api/v4/snippets.json b/spec/fixtures/api/schemas/public_api/v4/snippets.json
index e37e9704649..d13d703e063 100644
--- a/spec/fixtures/api/schemas/public_api/v4/snippets.json
+++ b/spec/fixtures/api/schemas/public_api/v4/snippets.json
@@ -8,6 +8,7 @@
"title": { "type": "string" },
"file_name": { "type": ["string", "null"] },
"description": { "type": ["string", "null"] },
+ "visibility": { "type": "string" },
"web_url": { "type": "string" },
"created_at": { "type": "date" },
"updated_at": { "type": "date" },
diff --git a/spec/helpers/storage_helper_spec.rb b/spec/helpers/storage_helper_spec.rb
index 4627a1e1872..c580b78c908 100644
--- a/spec/helpers/storage_helper_spec.rb
+++ b/spec/helpers/storage_helper_spec.rb
@@ -1,21 +1,25 @@
-require 'spec_helper'
+require "spec_helper"
describe StorageHelper do
- describe '#storage_counter' do
- it 'formats bytes to one decimal place' do
- expect(helper.storage_counter(1.23.megabytes)).to eq '1.2 MB'
+ describe "#storage_counter" do
+ it "formats bytes to one decimal place" do
+ expect(helper.storage_counter(1.23.megabytes)).to eq("1.2 MB")
end
- it 'does not add decimals for sizes < 1 MB' do
- expect(helper.storage_counter(23.5.kilobytes)).to eq '24 KB'
+ it "does not add decimals for sizes < 1 MB" do
+ expect(helper.storage_counter(23.5.kilobytes)).to eq("24 KB")
end
- it 'does not add decimals for zeroes' do
- expect(helper.storage_counter(2.megabytes)).to eq '2 MB'
+ it "does not add decimals for zeroes" do
+ expect(helper.storage_counter(2.megabytes)).to eq("2 MB")
end
- it 'uses commas as thousands separator' do
- expect(helper.storage_counter(100_000_000_000_000_000)).to eq '90,949.5 TB'
+ it "uses commas as thousands separator" do
+ if Gitlab.rails5?
+ expect(helper.storage_counter(100_000_000_000_000_000_000_000)).to eq("86,736.2 EB")
+ else
+ expect(helper.storage_counter(100_000_000_000_000_000)).to eq("90,949.5 TB")
+ end
end
end
end
diff --git a/spec/javascripts/fixtures/images/green_box.png b/spec/javascripts/fixtures/images/green_box.png
new file mode 100644
index 00000000000..cd1ff9f9ade
--- /dev/null
+++ b/spec/javascripts/fixtures/images/green_box.png
Binary files differ
diff --git a/spec/javascripts/fixtures/images/red_box.png b/spec/javascripts/fixtures/images/red_box.png
new file mode 100644
index 00000000000..73b2927da0f
--- /dev/null
+++ b/spec/javascripts/fixtures/images/red_box.png
Binary files differ
diff --git a/spec/javascripts/ide/components/commit_sidebar/list_item_spec.js b/spec/javascripts/ide/components/commit_sidebar/list_item_spec.js
index cc7e0a3f26d..8f7cf24c22f 100644
--- a/spec/javascripts/ide/components/commit_sidebar/list_item_spec.js
+++ b/spec/javascripts/ide/components/commit_sidebar/list_item_spec.js
@@ -19,6 +19,7 @@ describe('Multi-file editor commit sidebar list item', () => {
vm = createComponentWithStore(Component, store, {
file: f,
actionComponent: 'stage-button',
+ activeFileKey: `staged-${f.key}`,
}).$mount();
});
@@ -89,4 +90,20 @@ describe('Multi-file editor commit sidebar list item', () => {
});
});
});
+
+ describe('is active', () => {
+ it('does not add active class when dont keys match', () => {
+ expect(vm.$el.classList).not.toContain('is-active');
+ });
+
+ it('adds active class when keys match', done => {
+ vm.keyPrefix = 'staged';
+
+ vm.$nextTick(() => {
+ expect(vm.$el.classList).toContain('is-active');
+
+ done();
+ });
+ });
+ });
});
diff --git a/spec/javascripts/ide/components/commit_sidebar/list_spec.js b/spec/javascripts/ide/components/commit_sidebar/list_spec.js
index 54625ef90f8..6fb52378386 100644
--- a/spec/javascripts/ide/components/commit_sidebar/list_spec.js
+++ b/spec/javascripts/ide/components/commit_sidebar/list_spec.js
@@ -17,6 +17,8 @@ describe('Multi-file editor commit sidebar list', () => {
action: 'stageAllChanges',
actionBtnText: 'stage all',
itemActionComponent: 'stage-button',
+ activeFileKey: 'staged-testing',
+ keyPrefix: 'staged',
});
vm.$store.state.rightPanelCollapsed = false;
diff --git a/spec/javascripts/ide/components/repo_commit_section_spec.js b/spec/javascripts/ide/components/repo_commit_section_spec.js
index 5e3e00a180b..531bcd6e540 100644
--- a/spec/javascripts/ide/components/repo_commit_section_spec.js
+++ b/spec/javascripts/ide/components/repo_commit_section_spec.js
@@ -56,7 +56,7 @@ describe('RepoCommitSection', () => {
vm.$store.state.entries[f.path] = f;
});
- return vm.$mount();
+ return vm;
}
beforeEach(done => {
@@ -64,6 +64,10 @@ describe('RepoCommitSection', () => {
vm = createComponent();
+ spyOn(vm, 'openPendingTab').and.callThrough();
+
+ vm.$mount();
+
spyOn(service, 'getTreeData').and.returnValue(
Promise.resolve({
headers: {
@@ -98,6 +102,7 @@ describe('RepoCommitSection', () => {
store.state.noChangesStateSvgPath = 'nochangessvg';
store.state.committedStateSvgPath = 'svg';
+ vm.$destroy();
vm = createComponentWithStore(Component, store).$mount();
expect(vm.$el.querySelector('.js-empty-state').textContent.trim()).toContain('No changes');
@@ -176,5 +181,12 @@ describe('RepoCommitSection', () => {
expect(store.state.openFiles.length).toBe(1);
expect(store.state.openFiles[0].pending).toBe(true);
});
+
+ it('calls openPendingTab', () => {
+ expect(vm.openPendingTab).toHaveBeenCalledWith({
+ file: vm.lastOpenedFile,
+ keyPrefix: 'unstaged',
+ });
+ });
});
});
diff --git a/spec/javascripts/ide/stores/mutations/file_spec.js b/spec/javascripts/ide/stores/mutations/file_spec.js
index e83961fcedc..52f83be8e8c 100644
--- a/spec/javascripts/ide/stores/mutations/file_spec.js
+++ b/spec/javascripts/ide/stores/mutations/file_spec.js
@@ -152,6 +152,53 @@ describe('IDE store file mutations', () => {
expect(localFile.mrChange.diff).toBe('ABC');
});
+
+ it('has diffMode replaced by default', () => {
+ mutations.SET_FILE_MERGE_REQUEST_CHANGE(localState, {
+ file: localFile,
+ mrChange: {
+ diff: 'ABC',
+ },
+ });
+
+ expect(localFile.mrChange.diffMode).toBe('replaced');
+ });
+
+ it('has diffMode new', () => {
+ mutations.SET_FILE_MERGE_REQUEST_CHANGE(localState, {
+ file: localFile,
+ mrChange: {
+ diff: 'ABC',
+ new_file: true,
+ },
+ });
+
+ expect(localFile.mrChange.diffMode).toBe('new');
+ });
+
+ it('has diffMode deleted', () => {
+ mutations.SET_FILE_MERGE_REQUEST_CHANGE(localState, {
+ file: localFile,
+ mrChange: {
+ diff: 'ABC',
+ deleted_file: true,
+ },
+ });
+
+ expect(localFile.mrChange.diffMode).toBe('deleted');
+ });
+
+ it('has diffMode renamed', () => {
+ mutations.SET_FILE_MERGE_REQUEST_CHANGE(localState, {
+ file: localFile,
+ mrChange: {
+ diff: 'ABC',
+ renamed_file: true,
+ },
+ });
+
+ expect(localFile.mrChange.diffMode).toBe('renamed');
+ });
});
describe('DISCARD_FILE_CHANGES', () => {
diff --git a/spec/javascripts/test_constants.js b/spec/javascripts/test_constants.js
index df59195e9f6..a820dd2d09c 100644
--- a/spec/javascripts/test_constants.js
+++ b/spec/javascripts/test_constants.js
@@ -2,3 +2,6 @@ export const FIXTURES_PATH = '/base/spec/javascripts/fixtures';
export const TEST_HOST = 'http://test.host';
export const DUMMY_IMAGE_URL = `${FIXTURES_PATH}/one_white_pixel.png`;
+
+export const GREEN_BOX_IMAGE_URL = `${FIXTURES_PATH}/images/green_box.png`;
+export const RED_BOX_IMAGE_URL = `${FIXTURES_PATH}/images/red_box.png`;
diff --git a/spec/javascripts/vue_shared/components/content_viewer/content_viewer_spec.js b/spec/javascripts/vue_shared/components/content_viewer/content_viewer_spec.js
index 383f0cd29ea..e2c34508b0d 100644
--- a/spec/javascripts/vue_shared/components/content_viewer/content_viewer_spec.js
+++ b/spec/javascripts/vue_shared/components/content_viewer/content_viewer_spec.js
@@ -3,6 +3,7 @@ import MockAdapter from 'axios-mock-adapter';
import axios from '~/lib/utils/axios_utils';
import contentViewer from '~/vue_shared/components/content_viewer/content_viewer.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
+import { GREEN_BOX_IMAGE_URL } from 'spec/test_constants';
describe('ContentViewer', () => {
let vm;
@@ -41,12 +42,12 @@ describe('ContentViewer', () => {
it('renders image preview', done => {
createComponent({
- path: 'test.jpg',
+ path: GREEN_BOX_IMAGE_URL,
fileSize: 1024,
});
setTimeout(() => {
- expect(vm.$el.querySelector('.image_file img').getAttribute('src')).toBe('test.jpg');
+ expect(vm.$el.querySelector('.image_file img').getAttribute('src')).toBe(GREEN_BOX_IMAGE_URL);
done();
});
@@ -59,9 +60,8 @@ describe('ContentViewer', () => {
});
setTimeout(() => {
- expect(vm.$el.querySelector('.file-info').textContent.trim()).toContain(
- 'test.abc (1.00 KiB)',
- );
+ expect(vm.$el.querySelector('.file-info').textContent.trim()).toContain('test.abc');
+ expect(vm.$el.querySelector('.file-info').textContent.trim()).toContain('(1.00 KiB)');
expect(vm.$el.querySelector('.btn.btn-default').textContent.trim()).toContain('Download');
done();
diff --git a/spec/javascripts/vue_shared/components/diff_viewer/diff_viewer_spec.js b/spec/javascripts/vue_shared/components/diff_viewer/diff_viewer_spec.js
new file mode 100644
index 00000000000..71d9145bf22
--- /dev/null
+++ b/spec/javascripts/vue_shared/components/diff_viewer/diff_viewer_spec.js
@@ -0,0 +1,70 @@
+import Vue from 'vue';
+import diffViewer from '~/vue_shared/components/diff_viewer/diff_viewer.vue';
+import mountComponent from 'spec/helpers/vue_mount_component_helper';
+import { GREEN_BOX_IMAGE_URL, RED_BOX_IMAGE_URL } from 'spec/test_constants';
+
+describe('DiffViewer', () => {
+ let vm;
+
+ function createComponent(props) {
+ const DiffViewer = Vue.extend(diffViewer);
+ vm = mountComponent(DiffViewer, props);
+ }
+
+ afterEach(() => {
+ vm.$destroy();
+ });
+
+ it('renders image diff', done => {
+ window.gon = {
+ relative_url_root: '',
+ };
+
+ createComponent({
+ diffMode: 'replaced',
+ newPath: GREEN_BOX_IMAGE_URL,
+ newSha: 'ABC',
+ oldPath: RED_BOX_IMAGE_URL,
+ oldSha: 'DEF',
+ projectPath: '',
+ });
+
+ setTimeout(() => {
+ expect(vm.$el.querySelector('.deleted .image_file img').getAttribute('src')).toBe(
+ `//raw/DEF/${RED_BOX_IMAGE_URL}`,
+ );
+
+ expect(vm.$el.querySelector('.added .image_file img').getAttribute('src')).toBe(
+ `//raw/ABC/${GREEN_BOX_IMAGE_URL}`,
+ );
+
+ done();
+ });
+ });
+
+ it('renders fallback download diff display', done => {
+ createComponent({
+ diffMode: 'replaced',
+ newPath: 'test.abc',
+ newSha: 'ABC',
+ oldPath: 'testold.abc',
+ oldSha: 'DEF',
+ });
+
+ setTimeout(() => {
+ expect(vm.$el.querySelector('.deleted .file-info').textContent.trim()).toContain(
+ 'testold.abc',
+ );
+ expect(vm.$el.querySelector('.deleted .btn.btn-default').textContent.trim()).toContain(
+ 'Download',
+ );
+
+ expect(vm.$el.querySelector('.added .file-info').textContent.trim()).toContain('test.abc');
+ expect(vm.$el.querySelector('.added .btn.btn-default').textContent.trim()).toContain(
+ 'Download',
+ );
+
+ done();
+ });
+ });
+});
diff --git a/spec/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer_spec.js b/spec/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer_spec.js
new file mode 100644
index 00000000000..b878286ae3f
--- /dev/null
+++ b/spec/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer_spec.js
@@ -0,0 +1,185 @@
+import Vue from 'vue';
+import imageDiffViewer from '~/vue_shared/components/diff_viewer/viewers/image_diff_viewer.vue';
+import mountComponent from 'spec/helpers/vue_mount_component_helper';
+import { GREEN_BOX_IMAGE_URL, RED_BOX_IMAGE_URL } from 'spec/test_constants';
+
+describe('ImageDiffViewer', () => {
+ let vm;
+
+ function createComponent(props) {
+ const ImageDiffViewer = Vue.extend(imageDiffViewer);
+ vm = mountComponent(ImageDiffViewer, props);
+ }
+
+ const triggerEvent = (eventName, el = vm.$el, clientX = 0) => {
+ const event = document.createEvent('MouseEvents');
+ event.initMouseEvent(
+ eventName,
+ true,
+ true,
+ window,
+ 1,
+ clientX,
+ 0,
+ clientX,
+ 0,
+ false,
+ false,
+ false,
+ false,
+ 0,
+ null,
+ );
+
+ el.dispatchEvent(event);
+ };
+
+ const dragSlider = (sliderElement, dragPixel = 20) => {
+ triggerEvent('mousedown', sliderElement);
+ triggerEvent('mousemove', document.body, dragPixel);
+ triggerEvent('mouseup', document.body);
+ };
+
+ afterEach(() => {
+ vm.$destroy();
+ });
+
+ it('renders image diff for replaced', done => {
+ createComponent({
+ diffMode: 'replaced',
+ newPath: GREEN_BOX_IMAGE_URL,
+ oldPath: RED_BOX_IMAGE_URL,
+ });
+
+ setTimeout(() => {
+ expect(vm.$el.querySelector('.added .image_file img').getAttribute('src')).toBe(
+ GREEN_BOX_IMAGE_URL,
+ );
+ expect(vm.$el.querySelector('.deleted .image_file img').getAttribute('src')).toBe(
+ RED_BOX_IMAGE_URL,
+ );
+
+ expect(vm.$el.querySelector('.view-modes-menu li.active').textContent.trim()).toBe('2-up');
+ expect(vm.$el.querySelector('.view-modes-menu li:nth-child(2)').textContent.trim()).toBe(
+ 'Swipe',
+ );
+ expect(vm.$el.querySelector('.view-modes-menu li:nth-child(3)').textContent.trim()).toBe(
+ 'Onion skin',
+ );
+
+ done();
+ });
+ });
+
+ it('renders image diff for new', done => {
+ createComponent({
+ diffMode: 'new',
+ newPath: GREEN_BOX_IMAGE_URL,
+ oldPath: '',
+ });
+
+ setTimeout(() => {
+ expect(vm.$el.querySelector('.added .image_file img').getAttribute('src')).toBe(
+ GREEN_BOX_IMAGE_URL,
+ );
+
+ done();
+ });
+ });
+
+ it('renders image diff for deleted', done => {
+ createComponent({
+ diffMode: 'deleted',
+ newPath: '',
+ oldPath: RED_BOX_IMAGE_URL,
+ });
+
+ setTimeout(() => {
+ expect(vm.$el.querySelector('.deleted .image_file img').getAttribute('src')).toBe(
+ RED_BOX_IMAGE_URL,
+ );
+
+ done();
+ });
+ });
+
+ describe('swipeMode', () => {
+ beforeEach(done => {
+ createComponent({
+ diffMode: 'replaced',
+ newPath: GREEN_BOX_IMAGE_URL,
+ oldPath: RED_BOX_IMAGE_URL,
+ });
+
+ setTimeout(() => {
+ done();
+ });
+ });
+
+ it('switches to Swipe Mode', done => {
+ vm.$el.querySelector('.view-modes-menu li:nth-child(2)').click();
+
+ vm.$nextTick(() => {
+ expect(vm.$el.querySelector('.view-modes-menu li.active').textContent.trim()).toBe('Swipe');
+ done();
+ });
+ });
+
+ it('drag handler is working', done => {
+ vm.$el.querySelector('.view-modes-menu li:nth-child(2)').click();
+
+ vm.$nextTick(() => {
+ expect(vm.$el.querySelector('.swipe-bar').style.left).toBe('1px');
+ expect(vm.$el.querySelector('.top-handle')).not.toBeNull();
+
+ dragSlider(vm.$el.querySelector('.swipe-bar'), 40);
+
+ vm.$nextTick(() => {
+ expect(vm.$el.querySelector('.swipe-bar').style.left).toBe('-20px');
+ done();
+ });
+ });
+ });
+ });
+
+ describe('onionSkin', () => {
+ beforeEach(done => {
+ createComponent({
+ diffMode: 'replaced',
+ newPath: GREEN_BOX_IMAGE_URL,
+ oldPath: RED_BOX_IMAGE_URL,
+ });
+
+ setTimeout(() => {
+ done();
+ });
+ });
+
+ it('switches to Onion Skin Mode', done => {
+ vm.$el.querySelector('.view-modes-menu li:nth-child(3)').click();
+
+ vm.$nextTick(() => {
+ expect(vm.$el.querySelector('.view-modes-menu li.active').textContent.trim()).toBe(
+ 'Onion skin',
+ );
+ done();
+ });
+ });
+
+ it('has working drag handler', done => {
+ vm.$el.querySelector('.view-modes-menu li:nth-child(3)').click();
+
+ vm.$nextTick(() => {
+ expect(vm.$el.querySelector('.dragger').style.left).toBe('100px');
+
+ dragSlider(vm.$el.querySelector('.dragger'));
+
+ vm.$nextTick(() => {
+ expect(vm.$el.querySelector('.dragger').style.left).toBe('20px');
+ expect(vm.$el.querySelector('.added.frame').style.opacity).toBe('0.2');
+ done();
+ });
+ });
+ });
+ });
+});
diff --git a/spec/javascripts/vue_shared/components/lib/utils/dom_utils_spec.js b/spec/javascripts/vue_shared/components/lib/utils/dom_utils_spec.js
new file mode 100644
index 00000000000..2388660b0c2
--- /dev/null
+++ b/spec/javascripts/vue_shared/components/lib/utils/dom_utils_spec.js
@@ -0,0 +1,13 @@
+import * as domUtils from '~/vue_shared/components/lib/utils/dom_utils';
+
+describe('domUtils', () => {
+ describe('pixeliseValue', () => {
+ it('should add px to a given Number', () => {
+ expect(domUtils.pixeliseValue(12)).toEqual('12px');
+ });
+
+ it('should not add px to 0', () => {
+ expect(domUtils.pixeliseValue(0)).toEqual('');
+ });
+ });
+});
diff --git a/spec/lib/banzai/filter/milestone_reference_filter_spec.rb b/spec/lib/banzai/filter/milestone_reference_filter_spec.rb
index f8fa9b2d13d..91d4a60ba95 100644
--- a/spec/lib/banzai/filter/milestone_reference_filter_spec.rb
+++ b/spec/lib/banzai/filter/milestone_reference_filter_spec.rb
@@ -3,7 +3,8 @@ require 'spec_helper'
describe Banzai::Filter::MilestoneReferenceFilter do
include FilterSpecHelper
- let(:group) { create(:group, :public) }
+ let(:parent_group) { create(:group, :public) }
+ let(:group) { create(:group, :public, parent: parent_group) }
let(:project) { create(:project, :public, group: group) }
it 'requires project context' do
@@ -340,6 +341,13 @@ describe Banzai::Filter::MilestoneReferenceFilter do
expect(doc.css('a')).to be_empty
end
+
+ it 'supports parent group references', :nested_groups do
+ milestone.update!(group: parent_group)
+
+ doc = reference_filter("See #{reference}")
+ expect(doc.css('a').first.text).to eq(milestone.name)
+ end
end
context 'group context' do
diff --git a/spec/lib/gitlab/git/commit_spec.rb b/spec/lib/gitlab/git/commit_spec.rb
index 5af982c7a54..ae69a362dda 100644
--- a/spec/lib/gitlab/git/commit_spec.rb
+++ b/spec/lib/gitlab/git/commit_spec.rb
@@ -421,6 +421,16 @@ describe Gitlab::Git::Commit, seed_helper: true do
end
end
+ describe '#batch_by_oid' do
+ context 'when oids is empty' do
+ it 'makes no Gitaly request' do
+ expect(Gitlab::GitalyClient).not_to receive(:call)
+
+ described_class.batch_by_oid(repository, [])
+ end
+ end
+ end
+
shared_examples 'extracting commit signature' do
context 'when the commit is signed' do
let(:commit_id) { '0b4bc9a49b562e85de7cc9e834518ea6828729b9' }
diff --git a/spec/lib/gitlab/quick_actions/extractor_spec.rb b/spec/lib/gitlab/quick_actions/extractor_spec.rb
index f7c288f2393..0166f6c2ee0 100644
--- a/spec/lib/gitlab/quick_actions/extractor_spec.rb
+++ b/spec/lib/gitlab/quick_actions/extractor_spec.rb
@@ -182,6 +182,14 @@ describe Gitlab::QuickActions::Extractor do
expect(msg).to eq "hello\nworld"
end
+ it 'extracts command case insensitive' do
+ msg = %(hello\n/PoWer @user.name %9.10 ~"bar baz.2"\nworld)
+ msg, commands = extractor.extract_commands(msg)
+
+ expect(commands).to eq [['power', '@user.name %9.10 ~"bar baz.2"']]
+ expect(msg).to eq "hello\nworld"
+ end
+
it 'does not extract noop commands' do
msg = %(hello\nworld\n/reopen\n/noop_command)
msg, commands = extractor.extract_commands(msg)
@@ -206,6 +214,14 @@ describe Gitlab::QuickActions::Extractor do
expect(msg).to eq "hello\nworld\nthis is great? SHRUG"
end
+ it 'extracts and performs substitution commands case insensitive' do
+ msg = %(hello\nworld\n/reOpen\n/sHRuG this is great?)
+ msg, commands = extractor.extract_commands(msg)
+
+ expect(commands).to eq [['reopen'], ['shrug', 'this is great?']]
+ expect(msg).to eq "hello\nworld\nthis is great? SHRUG"
+ end
+
it 'extracts and performs substitution commands with comments' do
msg = %(hello\nworld\n/reopen\n/substitution wow this is a thing.)
msg, commands = extractor.extract_commands(msg)
diff --git a/spec/lib/gitlab/url_builder_spec.rb b/spec/lib/gitlab/url_builder_spec.rb
index b81749cf428..9f495a5d50b 100644
--- a/spec/lib/gitlab/url_builder_spec.rb
+++ b/spec/lib/gitlab/url_builder_spec.rb
@@ -22,6 +22,31 @@ describe Gitlab::UrlBuilder do
end
end
+ context 'when passing a Milestone' do
+ let(:group) { create(:group) }
+ let(:project) { create(:project, :public, namespace: group) }
+
+ context 'belonging to a project' do
+ it 'returns a proper URL' do
+ milestone = create(:milestone, project: project)
+
+ url = described_class.build(milestone)
+
+ expect(url).to eq "#{Settings.gitlab['url']}/#{milestone.project.full_path}/milestones/#{milestone.iid}"
+ end
+ end
+
+ context 'belonging to a group' do
+ it 'returns a proper URL' do
+ milestone = create(:milestone, group: group)
+
+ url = described_class.build(milestone)
+
+ expect(url).to eq "#{Settings.gitlab['url']}/groups/#{milestone.group.full_path}/-/milestones/#{milestone.iid}"
+ end
+ end
+ end
+
context 'when passing a MergeRequest' do
it 'returns a proper URL' do
merge_request = build_stubbed(:merge_request, iid: 42)
diff --git a/spec/lib/gitlab/verify/job_artifacts_spec.rb b/spec/lib/gitlab/verify/job_artifacts_spec.rb
index ec490bdfde2..6e916a56564 100644
--- a/spec/lib/gitlab/verify/job_artifacts_spec.rb
+++ b/spec/lib/gitlab/verify/job_artifacts_spec.rb
@@ -21,15 +21,38 @@ describe Gitlab::Verify::JobArtifacts do
FileUtils.rm_f(artifact.file.path)
expect(failures.keys).to contain_exactly(artifact)
- expect(failure).to be_a(Errno::ENOENT)
- expect(failure.to_s).to include(artifact.file.path)
+ expect(failure).to include('No such file or directory')
+ expect(failure).to include(artifact.file.path)
end
it 'fails artifacts with a mismatched checksum' do
File.truncate(artifact.file.path, 0)
expect(failures.keys).to contain_exactly(artifact)
- expect(failure.to_s).to include('Checksum mismatch')
+ expect(failure).to include('Checksum mismatch')
+ end
+
+ context 'with remote files' do
+ let(:file) { double(:file) }
+
+ before do
+ stub_artifacts_object_storage
+ artifact.update!(file_store: ObjectStorage::Store::REMOTE)
+ expect(CarrierWave::Storage::Fog::File).to receive(:new).and_return(file)
+ end
+
+ it 'passes artifacts in object storage that exist' do
+ expect(file).to receive(:exists?).and_return(true)
+
+ expect(failures).to eq({})
+ end
+
+ it 'fails artifacts in object storage that do not exist' do
+ expect(file).to receive(:exists?).and_return(false)
+
+ expect(failures.keys).to contain_exactly(artifact)
+ expect(failure).to include('Remote object does not exist')
+ end
end
end
end
diff --git a/spec/lib/gitlab/verify/lfs_objects_spec.rb b/spec/lib/gitlab/verify/lfs_objects_spec.rb
index 0f890e2c7ce..2feaedd6f14 100644
--- a/spec/lib/gitlab/verify/lfs_objects_spec.rb
+++ b/spec/lib/gitlab/verify/lfs_objects_spec.rb
@@ -21,30 +21,37 @@ describe Gitlab::Verify::LfsObjects do
FileUtils.rm_f(lfs_object.file.path)
expect(failures.keys).to contain_exactly(lfs_object)
- expect(failure).to be_a(Errno::ENOENT)
- expect(failure.to_s).to include(lfs_object.file.path)
+ expect(failure).to include('No such file or directory')
+ expect(failure).to include(lfs_object.file.path)
end
it 'fails LFS objects with a mismatched oid' do
File.truncate(lfs_object.file.path, 0)
expect(failures.keys).to contain_exactly(lfs_object)
- expect(failure.to_s).to include('Checksum mismatch')
+ expect(failure).to include('Checksum mismatch')
end
context 'with remote files' do
+ let(:file) { double(:file) }
+
before do
stub_lfs_object_storage
+ lfs_object.update!(file_store: ObjectStorage::Store::REMOTE)
+ expect(CarrierWave::Storage::Fog::File).to receive(:new).and_return(file)
end
- it 'skips LFS objects in object storage' do
- local_failure = create(:lfs_object)
- create(:lfs_object, :object_storage)
+ it 'passes LFS objects in object storage that exist' do
+ expect(file).to receive(:exists?).and_return(true)
+
+ expect(failures).to eq({})
+ end
- failures = {}
- described_class.new(batch_size: 10).run_batches { |_, failed| failures.merge!(failed) }
+ it 'fails LFS objects in object storage that do not exist' do
+ expect(file).to receive(:exists?).and_return(false)
- expect(failures.keys).to contain_exactly(local_failure)
+ expect(failures.keys).to contain_exactly(lfs_object)
+ expect(failure).to include('Remote object does not exist')
end
end
end
diff --git a/spec/lib/gitlab/verify/uploads_spec.rb b/spec/lib/gitlab/verify/uploads_spec.rb
index 85768308edc..296866d3319 100644
--- a/spec/lib/gitlab/verify/uploads_spec.rb
+++ b/spec/lib/gitlab/verify/uploads_spec.rb
@@ -23,37 +23,44 @@ describe Gitlab::Verify::Uploads do
FileUtils.rm_f(upload.absolute_path)
expect(failures.keys).to contain_exactly(upload)
- expect(failure).to be_a(Errno::ENOENT)
- expect(failure.to_s).to include(upload.absolute_path)
+ expect(failure).to include('No such file or directory')
+ expect(failure).to include(upload.absolute_path)
end
it 'fails uploads with a mismatched checksum' do
upload.update!(checksum: 'something incorrect')
expect(failures.keys).to contain_exactly(upload)
- expect(failure.to_s).to include('Checksum mismatch')
+ expect(failure).to include('Checksum mismatch')
end
it 'fails uploads with a missing precalculated checksum' do
upload.update!(checksum: '')
expect(failures.keys).to contain_exactly(upload)
- expect(failure.to_s).to include('Checksum missing')
+ expect(failure).to include('Checksum missing')
end
context 'with remote files' do
+ let(:file) { double(:file) }
+
before do
stub_uploads_object_storage(AvatarUploader)
+ upload.update!(store: ObjectStorage::Store::REMOTE)
+ expect(CarrierWave::Storage::Fog::File).to receive(:new).and_return(file)
end
- it 'skips uploads in object storage' do
- local_failure = create(:upload)
- create(:upload, :object_storage)
+ it 'passes uploads in object storage that exist' do
+ expect(file).to receive(:exists?).and_return(true)
+
+ expect(failures).to eq({})
+ end
- failures = {}
- described_class.new(batch_size: 10).run_batches { |_, failed| failures.merge!(failed) }
+ it 'fails uploads in object storage that do not exist' do
+ expect(file).to receive(:exists?).and_return(false)
- expect(failures.keys).to contain_exactly(local_failure)
+ expect(failures.keys).to contain_exactly(upload)
+ expect(failure).to include('Remote object does not exist')
end
end
end
diff --git a/spec/lib/microsoft_teams/notifier_spec.rb b/spec/lib/microsoft_teams/notifier_spec.rb
index 3035693812f..c9756544bd6 100644
--- a/spec/lib/microsoft_teams/notifier_spec.rb
+++ b/spec/lib/microsoft_teams/notifier_spec.rb
@@ -8,7 +8,7 @@ describe MicrosoftTeams::Notifier do
let(:options) do
{
title: 'JohnDoe4/project2',
- pretext: '[[JohnDoe4/project2](http://localhost/namespace2/gitlabhq)] Issue [#1 Awesome issue](http://localhost/namespace2/gitlabhq/issues/1) opened by user6',
+ summary: '[[JohnDoe4/project2](http://localhost/namespace2/gitlabhq)] Issue [#1 Awesome issue](http://localhost/namespace2/gitlabhq/issues/1) opened by user6',
activity: {
title: 'Issue opened by user6',
subtitle: 'in [JohnDoe4/project2](http://localhost/namespace2/gitlabhq)',
diff --git a/spec/models/project_services/microsoft_teams_service_spec.rb b/spec/models/project_services/microsoft_teams_service_spec.rb
index 8d9ee96227f..3351c6280b4 100644
--- a/spec/models/project_services/microsoft_teams_service_spec.rb
+++ b/spec/models/project_services/microsoft_teams_service_spec.rb
@@ -225,10 +225,15 @@ describe MicrosoftTeamsService do
it 'calls Microsoft Teams API for pipeline events' do
data = Gitlab::DataBuilder::Pipeline.build(pipeline)
+ data[:markdown] = true
chat_service.execute(data)
- expect(WebMock).to have_requested(:post, webhook_url).once
+ message = ChatMessage::PipelineMessage.new(data)
+
+ expect(WebMock).to have_requested(:post, webhook_url)
+ .with(body: hash_including({ summary: message.summary }))
+ .once
end
end
diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb
index 7e3277c4cab..e73d1a252f5 100644
--- a/spec/requests/api/commits_spec.rb
+++ b/spec/requests/api/commits_spec.rb
@@ -18,14 +18,14 @@ describe API::Commits do
describe 'GET /projects/:id/repository/commits' do
let(:route) { "/projects/#{project_id}/repository/commits" }
- shared_examples_for 'project commits' do
+ shared_examples_for 'project commits' do |schema: 'public_api/v4/commits'|
it "returns project commits" do
commit = project.repository.commit
get api(route, current_user)
expect(response).to have_gitlab_http_status(200)
- expect(response).to match_response_schema('public_api/v4/commits')
+ expect(response).to match_response_schema(schema)
expect(json_response.first['id']).to eq(commit.id)
expect(json_response.first['committer_name']).to eq(commit.committer_name)
expect(json_response.first['committer_email']).to eq(commit.committer_email)
@@ -161,6 +161,23 @@ describe API::Commits do
end
end
+ context 'with_stats optional parameter' do
+ let(:project) { create(:project, :public, :repository) }
+
+ it_behaves_like 'project commits', schema: 'public_api/v4/commits_with_stats' do
+ let(:route) { "/projects/#{project_id}/repository/commits?with_stats=true" }
+
+ it 'include commits details' do
+ commit = project.repository.commit
+ get api(route, current_user)
+
+ expect(json_response.first['stats']['additions']).to eq(commit.stats.additions)
+ expect(json_response.first['stats']['deletions']).to eq(commit.stats.deletions)
+ expect(json_response.first['stats']['total']).to eq(commit.stats.total)
+ end
+ end
+ end
+
context 'with pagination params' do
let(:page) { 1 }
let(:per_page) { 5 }
diff --git a/spec/requests/api/snippets_spec.rb b/spec/requests/api/snippets_spec.rb
index b3e253befc6..c5456977b60 100644
--- a/spec/requests/api/snippets_spec.rb
+++ b/spec/requests/api/snippets_spec.rb
@@ -20,6 +20,7 @@ describe API::Snippets do
private_snippet.id)
expect(json_response.last).to have_key('web_url')
expect(json_response.last).to have_key('raw_url')
+ expect(json_response.last).to have_key('visibility')
end
it 'hides private snippets from regular user' do
@@ -112,6 +113,7 @@ describe API::Snippets do
expect(json_response['title']).to eq(snippet.title)
expect(json_response['description']).to eq(snippet.description)
expect(json_response['file_name']).to eq(snippet.file_name)
+ expect(json_response['visibility']).to eq(snippet.visibility)
end
it 'returns 404 for invalid snippet id' do
@@ -142,6 +144,7 @@ describe API::Snippets do
expect(json_response['title']).to eq(params[:title])
expect(json_response['description']).to eq(params[:description])
expect(json_response['file_name']).to eq(params[:file_name])
+ expect(json_response['visibility']).to eq(params[:visibility])
end
it 'returns 400 for missing parameters' do
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb
index 3377d67b644..a97c3f3461a 100644
--- a/spec/requests/api/users_spec.rb
+++ b/spec/requests/api/users_spec.rb
@@ -1123,58 +1123,63 @@ describe API::Users do
describe "GET /user" do
let(:personal_access_token) { create(:personal_access_token, user: user).token }
- context 'with regular user' do
- context 'with personal access token' do
- it 'returns 403 without private token when sudo is defined' do
- get api("/user?private_token=#{personal_access_token}&sudo=123")
+ shared_examples 'get user info' do |version|
+ context 'with regular user' do
+ context 'with personal access token' do
+ it 'returns 403 without private token when sudo is defined' do
+ get api("/user?private_token=#{personal_access_token}&sudo=123", version: version)
- expect(response).to have_gitlab_http_status(403)
+ expect(response).to have_gitlab_http_status(403)
+ end
end
- end
- it 'returns current user without private token when sudo not defined' do
- get api("/user", user)
+ it 'returns current user without private token when sudo not defined' do
+ get api("/user", user, version: version)
- expect(response).to have_gitlab_http_status(200)
- expect(response).to match_response_schema('public_api/v4/user/public')
- expect(json_response['id']).to eq(user.id)
- end
+ expect(response).to have_gitlab_http_status(200)
+ expect(response).to match_response_schema('public_api/v4/user/public')
+ expect(json_response['id']).to eq(user.id)
+ end
- context "scopes" do
- let(:path) { "/user" }
- let(:api_call) { method(:api) }
+ context "scopes" do
+ let(:path) { "/user" }
+ let(:api_call) { method(:api) }
- include_examples 'allows the "read_user" scope'
+ include_examples 'allows the "read_user" scope', version
+ end
end
- end
- context 'with admin' do
- let(:admin_personal_access_token) { create(:personal_access_token, user: admin).token }
+ context 'with admin' do
+ let(:admin_personal_access_token) { create(:personal_access_token, user: admin).token }
- context 'with personal access token' do
- it 'returns 403 without private token when sudo defined' do
- get api("/user?private_token=#{admin_personal_access_token}&sudo=#{user.id}")
+ context 'with personal access token' do
+ it 'returns 403 without private token when sudo defined' do
+ get api("/user?private_token=#{admin_personal_access_token}&sudo=#{user.id}", version: version)
- expect(response).to have_gitlab_http_status(403)
- end
+ expect(response).to have_gitlab_http_status(403)
+ end
- it 'returns initial current user without private token but with is_admin when sudo not defined' do
- get api("/user?private_token=#{admin_personal_access_token}")
+ it 'returns initial current user without private token but with is_admin when sudo not defined' do
+ get api("/user?private_token=#{admin_personal_access_token}", version: version)
- expect(response).to have_gitlab_http_status(200)
- expect(response).to match_response_schema('public_api/v4/user/admin')
- expect(json_response['id']).to eq(admin.id)
+ expect(response).to have_gitlab_http_status(200)
+ expect(response).to match_response_schema('public_api/v4/user/admin')
+ expect(json_response['id']).to eq(admin.id)
+ end
end
end
- end
- context 'with unauthenticated user' do
- it "returns 401 error if user is unauthenticated" do
- get api("/user")
+ context 'with unauthenticated user' do
+ it "returns 401 error if user is unauthenticated" do
+ get api("/user", version: version)
- expect(response).to have_gitlab_http_status(401)
+ expect(response).to have_gitlab_http_status(401)
+ end
end
end
+
+ it_behaves_like 'get user info', 'v3'
+ it_behaves_like 'get user info', 'v4'
end
describe "GET /user/keys" do
diff --git a/spec/services/quick_actions/interpret_service_spec.rb b/spec/services/quick_actions/interpret_service_spec.rb
index bd835a1fca6..743e281183e 100644
--- a/spec/services/quick_actions/interpret_service_spec.rb
+++ b/spec/services/quick_actions/interpret_service_spec.rb
@@ -323,6 +323,14 @@ describe QuickActions::InterpretService do
end
end
+ shared_examples 'confidential command' do
+ it 'marks issue as confidential if content contains /confidential' do
+ _, updates = service.execute(content, issuable)
+
+ expect(updates).to eq(confidential: true)
+ end
+ end
+
shared_examples 'shrug command' do
it 'appends ¯\_(ツ)_/¯ to the comment' do
new_content, _ = service.execute(content, issuable)
@@ -774,6 +782,11 @@ describe QuickActions::InterpretService do
let(:issuable) { issue }
end
+ it_behaves_like 'confidential command' do
+ let(:content) { '/confidential' }
+ let(:issuable) { issue }
+ end
+
context '/copy_metadata command' do
let(:todo_label) { create(:label, project: project, title: 'To Do') }
let(:inreview_label) { create(:label, project: project, title: 'In Review') }
@@ -919,6 +932,11 @@ describe QuickActions::InterpretService do
end
it_behaves_like 'empty command' do
+ let(:content) { '/confidential' }
+ let(:issuable) { issue }
+ end
+
+ it_behaves_like 'empty command' do
let(:content) { '/duplicate #{issue.to_reference}' }
let(:issuable) { issue }
end
diff --git a/spec/support/api/scopes/read_user_shared_examples.rb b/spec/support/api/scopes/read_user_shared_examples.rb
index 06ae8792c61..d7cef137989 100644
--- a/spec/support/api/scopes/read_user_shared_examples.rb
+++ b/spec/support/api/scopes/read_user_shared_examples.rb
@@ -1,10 +1,12 @@
-shared_examples_for 'allows the "read_user" scope' do
+shared_examples_for 'allows the "read_user" scope' do |api_version|
+ let(:version) { api_version || 'v4' }
+
context 'for personal access tokens' do
context 'when the requesting token has the "api" scope' do
let(:token) { create(:personal_access_token, scopes: ['api'], user: user) }
it 'returns a "200" response' do
- get api_call.call(path, user, personal_access_token: token)
+ get api_call.call(path, user, personal_access_token: token, version: version)
expect(response).to have_gitlab_http_status(200)
end
@@ -14,7 +16,7 @@ shared_examples_for 'allows the "read_user" scope' do
let(:token) { create(:personal_access_token, scopes: ['read_user'], user: user) }
it 'returns a "200" response' do
- get api_call.call(path, user, personal_access_token: token)
+ get api_call.call(path, user, personal_access_token: token, version: version)
expect(response).to have_gitlab_http_status(200)
end
@@ -28,7 +30,7 @@ shared_examples_for 'allows the "read_user" scope' do
end
it 'returns a "403" response' do
- get api_call.call(path, user, personal_access_token: token)
+ get api_call.call(path, user, personal_access_token: token, version: version)
expect(response).to have_gitlab_http_status(403)
end
diff --git a/spec/support/shared_examples/uploaders/object_storage_shared_examples.rb b/spec/support/shared_examples/uploaders/object_storage_shared_examples.rb
index 6352f1527cd..19800c6638f 100644
--- a/spec/support/shared_examples/uploaders/object_storage_shared_examples.rb
+++ b/spec/support/shared_examples/uploaders/object_storage_shared_examples.rb
@@ -76,26 +76,24 @@ shared_examples "migrates" do |to_store:, from_store: nil|
end
context 'when migrate! is occupied by another process' do
- let(:exclusive_lease_key) { "object_storage_migrate:#{subject.model.class}:#{subject.model.id}" }
-
before do
- @uuid = Gitlab::ExclusiveLease.new(exclusive_lease_key, timeout: 1.hour.to_i).try_obtain
+ @uuid = Gitlab::ExclusiveLease.new(subject.exclusive_lease_key, timeout: 1.hour.to_i).try_obtain
end
it 'does not execute migrate!' do
expect(subject).not_to receive(:unsafe_migrate!)
- expect { migrate(to) }.to raise_error('exclusive lease already taken')
+ expect { migrate(to) }.to raise_error(ObjectStorage::ExclusiveLeaseTaken)
end
it 'does not execute use_file' do
expect(subject).not_to receive(:unsafe_use_file)
- expect { subject.use_file }.to raise_error('exclusive lease already taken')
+ expect { subject.use_file }.to raise_error(ObjectStorage::ExclusiveLeaseTaken)
end
after do
- Gitlab::ExclusiveLease.cancel(exclusive_lease_key, @uuid)
+ Gitlab::ExclusiveLease.cancel(subject.exclusive_lease_key, @uuid)
end
end
diff --git a/spec/uploaders/object_storage_spec.rb b/spec/uploaders/object_storage_spec.rb
index 0bc5b6751b3..c7f5694ff43 100644
--- a/spec/uploaders/object_storage_spec.rb
+++ b/spec/uploaders/object_storage_spec.rb
@@ -321,7 +321,7 @@ describe ObjectStorage do
when_file_is_in_use do
expect(uploader).not_to receive(:unsafe_migrate!)
- expect { uploader.migrate!(described_class::Store::REMOTE) }.to raise_error('exclusive lease already taken')
+ expect { uploader.migrate!(described_class::Store::REMOTE) }.to raise_error(ObjectStorage::ExclusiveLeaseTaken)
end
end
@@ -329,7 +329,19 @@ describe ObjectStorage do
when_file_is_in_use do
expect(uploader).not_to receive(:unsafe_use_file)
- expect { uploader.use_file }.to raise_error('exclusive lease already taken')
+ expect { uploader.use_file }.to raise_error(ObjectStorage::ExclusiveLeaseTaken)
+ end
+ end
+
+ it 'can still migrate other files of the same model' do
+ uploader2 = uploader_class.new(object, :file)
+ uploader2.upload = create(:upload)
+ uploader.upload = create(:upload)
+
+ when_file_is_in_use do
+ expect(uploader2).to receive(:unsafe_migrate!)
+
+ uploader2.migrate!(described_class::Store::REMOTE)
end
end
end
diff --git a/spec/uploaders/workers/object_storage/migrate_uploads_worker_spec.rb b/spec/uploaders/workers/object_storage/migrate_uploads_worker_spec.rb
index aed62f97448..da490cb02af 100644
--- a/spec/uploaders/workers/object_storage/migrate_uploads_worker_spec.rb
+++ b/spec/uploaders/workers/object_storage/migrate_uploads_worker_spec.rb
@@ -11,6 +11,12 @@ describe ObjectStorage::MigrateUploadsWorker, :sidekiq do
let(:uploads) { Upload.all }
let(:to_store) { ObjectStorage::Store::REMOTE }
+ def perform(uploads)
+ described_class.new.perform(uploads.ids, model_class.to_s, mounted_as, to_store)
+ rescue ObjectStorage::MigrateUploadsWorker::Report::MigrationFailures
+ # swallow
+ end
+
shared_examples "uploads migration worker" do
describe '.enqueue!' do
def enqueue!
@@ -69,12 +75,6 @@ describe ObjectStorage::MigrateUploadsWorker, :sidekiq do
end
describe '#perform' do
- def perform
- described_class.new.perform(uploads.ids, model_class.to_s, mounted_as, to_store)
- rescue ObjectStorage::MigrateUploadsWorker::Report::MigrationFailures
- # swallow
- end
-
shared_examples 'outputs correctly' do |success: 0, failures: 0|
total = success + failures
@@ -82,7 +82,7 @@ describe ObjectStorage::MigrateUploadsWorker, :sidekiq do
it 'outputs the reports' do
expect(Rails.logger).to receive(:info).with(%r{Migrated #{success}/#{total} files})
- perform
+ perform(uploads)
end
end
@@ -90,7 +90,7 @@ describe ObjectStorage::MigrateUploadsWorker, :sidekiq do
it 'outputs upload failures' do
expect(Rails.logger).to receive(:warn).with(/Error .* I am a teapot/)
- perform
+ perform(uploads)
end
end
end
@@ -98,7 +98,7 @@ describe ObjectStorage::MigrateUploadsWorker, :sidekiq do
it_behaves_like 'outputs correctly', success: 10
it 'migrates files' do
- perform
+ perform(uploads)
expect(Upload.where(store: ObjectStorage::Store::LOCAL).count).to eq(0)
end
@@ -123,6 +123,17 @@ describe ObjectStorage::MigrateUploadsWorker, :sidekiq do
end
it_behaves_like "uploads migration worker"
+
+ describe "limits N+1 queries" do
+ it "to N*5" do
+ query_count = ActiveRecord::QueryRecorder.new { perform(uploads) }
+
+ more_projects = create_list(:project, 3, :with_avatar)
+
+ expected_queries_per_migration = 5 * more_projects.count
+ expect { perform(Upload.all) }.not_to exceed_query_limit(query_count).with_threshold(expected_queries_per_migration)
+ end
+ end
end
context "for FileUploader" do
@@ -130,15 +141,29 @@ describe ObjectStorage::MigrateUploadsWorker, :sidekiq do
let(:secret) { SecureRandom.hex }
let(:mounted_as) { nil }
+ def upload_file(project)
+ uploader = FileUploader.new(project)
+ uploader.store!(fixture_file_upload('spec/fixtures/doc_sample.txt'))
+ end
+
before do
stub_uploads_object_storage(FileUploader)
- projects.map do |project|
- uploader = FileUploader.new(project)
- uploader.store!(fixture_file_upload('spec/fixtures/doc_sample.txt'))
- end
+ projects.map(&method(:upload_file))
end
it_behaves_like "uploads migration worker"
+
+ describe "limits N+1 queries" do
+ it "to N*5" do
+ query_count = ActiveRecord::QueryRecorder.new { perform(uploads) }
+
+ more_projects = create_list(:project, 3)
+ more_projects.map(&method(:upload_file))
+
+ expected_queries_per_migration = 5 * more_projects.count
+ expect { perform(Upload.all) }.not_to exceed_query_limit(query_count).with_threshold(expected_queries_per_migration)
+ end
+ end
end
end
diff --git a/spec/views/errors/access_denied.html.haml_spec.rb b/spec/views/errors/access_denied.html.haml_spec.rb
new file mode 100644
index 00000000000..bde2f6f0169
--- /dev/null
+++ b/spec/views/errors/access_denied.html.haml_spec.rb
@@ -0,0 +1,7 @@
+require 'spec_helper'
+
+describe 'errors/access_denied' do
+ it 'does not fail to render when there is no message provided' do
+ expect { render }.not_to raise_error
+ end
+end
diff --git a/yarn.lock b/yarn.lock
index 7a417428ce2..65d78173a5b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -270,10 +270,14 @@ acorn@^3.0.4:
version "3.3.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"
-acorn@^5.0.0, acorn@^5.3.0, acorn@^5.5.0:
+acorn@^5.0.0, acorn@^5.3.0:
version "5.5.3"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9"
+acorn@^5.5.0:
+ version "5.6.2"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.6.2.tgz#b1da1d7be2ac1b4a327fb9eab851702c5045b4e7"
+
addressparser@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/addressparser/-/addressparser-1.0.1.tgz#47afbe1a2a9262191db6838e4fd1d39b40821746"
@@ -2903,12 +2907,11 @@ eslint-plugin-promise@^3.8.0:
version "3.8.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.8.0.tgz#65ebf27a845e3c1e9d6f6a5622ddd3801694b621"
-eslint-plugin-vue@^4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-4.0.1.tgz#afda92cfd7e7363b1fbdb1a772dd63359a9ce96a"
+eslint-plugin-vue@^4.5.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-4.5.0.tgz#09d6597f4849e31a3846c2c395fccf17685b69c3"
dependencies:
- require-all "^2.2.0"
- vue-eslint-parser "^2.0.1"
+ vue-eslint-parser "^2.0.3"
eslint-restricted-globals@^0.1.1:
version "0.1.1"
@@ -2987,30 +2990,25 @@ esprima@^4.0.0:
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
esquery@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa"
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708"
dependencies:
estraverse "^4.0.0"
esrecurse@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220"
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf"
dependencies:
- estraverse "~4.1.0"
- object-assign "^4.0.1"
+ estraverse "^4.1.0"
estraverse@^1.9.1:
version "1.9.3"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44"
-estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0:
+estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
-estraverse@~4.1.0:
- version "4.1.1"
- resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2"
-
esutils@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
@@ -6774,10 +6772,6 @@ requestretry@^1.2.2:
request "^2.74.0"
when "^3.7.7"
-require-all@^2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/require-all/-/require-all-2.2.0.tgz#b4420c233ac0282d0ff49b277fb880a8b5de0894"
-
require-directory@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
@@ -8046,7 +8040,7 @@ void-elements@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec"
-vue-eslint-parser@^2.0.1:
+vue-eslint-parser@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz#c268c96c6d94cfe3d938a5f7593959b0ca3360d1"
dependencies: