diff options
Diffstat (limited to 'app')
34 files changed, 155 insertions, 239 deletions
diff --git a/app/assets/javascripts/clusters/components/applications.vue b/app/assets/javascripts/clusters/components/applications.vue index 5b206b82fe0..13e8617c515 100644 --- a/app/assets/javascripts/clusters/components/applications.vue +++ b/app/assets/javascripts/clusters/components/applications.vue @@ -1,7 +1,6 @@ <script> import _ from 'underscore'; import helmInstallIllustration from '@gitlab/svgs/dist/illustrations/kubernetes-installation.svg'; -import { GlLoadingIcon } from '@gitlab/ui'; import elasticsearchLogo from 'images/cluster_app_logos/elasticsearch.png'; import gitlabLogo from 'images/cluster_app_logos/gitlab.png'; import helmLogo from 'images/cluster_app_logos/helm.png'; @@ -24,7 +23,6 @@ export default { applicationRow, clipboardButton, LoadingButton, - GlLoadingIcon, }, props: { type: { @@ -298,12 +296,7 @@ export default { /> </span> </div> - <div v-else class="input-group"> - <input type="text" class="form-control js-endpoint" readonly /> - <gl-loading-icon - class="position-absolute align-self-center ml-2 js-ingress-ip-loading-icon" - /> - </div> + <input v-else type="text" class="form-control js-endpoint" readonly value="?" /> <p class="form-text text-muted"> {{ s__(`ClusterIntegration|Point a wildcard DNS to this @@ -552,12 +545,13 @@ export default { /> </span> </div> - <div v-else class="input-group"> - <input type="text" class="form-control js-endpoint" readonly /> - <gl-loading-icon - class="position-absolute align-self-center ml-2 js-knative-ip-loading-icon" - /> - </div> + <input + v-else + type="text" + class="form-control js-knative-endpoint" + readonly + value="?" + /> </div> <p class="form-text text-muted col-12"> diff --git a/app/assets/javascripts/environments/index.js b/app/assets/javascripts/environments/index.js index b53d42f202b..6af66d0f86e 100644 --- a/app/assets/javascripts/environments/index.js +++ b/app/assets/javascripts/environments/index.js @@ -1,5 +1,4 @@ import Vue from 'vue'; -import canaryCalloutMixin from 'ee_else_ce/environments/mixins/canary_callout_mixin'; import environmentsComponent from './components/environments_app.vue'; import { parseBoolean } from '../lib/utils/common_utils'; import Translate from '../vue_shared/translate'; @@ -12,7 +11,6 @@ export default () => components: { environmentsComponent, }, - mixins: [canaryCalloutMixin], data() { const environmentsData = document.querySelector(this.$options.el).dataset; @@ -34,7 +32,6 @@ export default () => cssContainerClass: this.cssContainerClass, canCreateEnvironment: this.canCreateEnvironment, canReadEnvironment: this.canReadEnvironment, - ...this.canaryCalloutProps, }, }); }, diff --git a/app/assets/javascripts/environments/mixins/canary_callout_mixin.js b/app/assets/javascripts/environments/mixins/canary_callout_mixin.js deleted file mode 100644 index f6d3d67b777..00000000000 --- a/app/assets/javascripts/environments/mixins/canary_callout_mixin.js +++ /dev/null @@ -1,5 +0,0 @@ -export default { - computed: { - canaryCalloutProps() {}, - }, -}; diff --git a/app/assets/javascripts/environments/mixins/environments_mixin.js b/app/assets/javascripts/environments/mixins/environments_mixin.js index a5812b173dc..71b6b578196 100644 --- a/app/assets/javascripts/environments/mixins/environments_mixin.js +++ b/app/assets/javascripts/environments/mixins/environments_mixin.js @@ -3,13 +3,13 @@ */ import _ from 'underscore'; import Visibility from 'visibilityjs'; -import EnvironmentsStore from 'ee_else_ce/environments/stores/environments_store'; import Poll from '../../lib/utils/poll'; import { getParameterByName } from '../../lib/utils/common_utils'; import { s__ } from '../../locale'; import Flash from '../../flash'; import eventHub from '../event_hub'; +import EnvironmentsStore from '../stores/environments_store'; import EnvironmentsService from '../services/environments_service'; import tablePagination from '../../vue_shared/components/table_pagination.vue'; import environmentTable from '../components/environments_table.vue'; diff --git a/app/assets/javascripts/environments/stores/environments_store.js b/app/assets/javascripts/environments/stores/environments_store.js index 5fb420e9da5..ac9a31c202c 100644 --- a/app/assets/javascripts/environments/stores/environments_store.js +++ b/app/assets/javascripts/environments/stores/environments_store.js @@ -1,6 +1,4 @@ import { parseIntPagination, normalizeHeaders } from '~/lib/utils/common_utils'; -import { setDeployBoard } from 'ee_else_ce/environments/stores/helpers'; - /** * Environments Store. * @@ -33,14 +31,6 @@ export default class EnvironmentsStore { * If the `size` is bigger than 1, it means it should be rendered as a folder. * In those cases we add `isFolder` key in order to render it properly. * - * Top level environments - when the size is 1 - with `rollout_status` - * can render a deploy board. We add `isDeployBoardVisible` and `deployBoardData` - * keys to those environments. - * The first key will let's us know if we should or not render the deploy board. - * It will be toggled when the user clicks to seee the deploy board. - * - * The second key will allow us to update the environment with the received deploy board data. - * * @param {Array} environments * @returns {Array} */ @@ -73,7 +63,6 @@ export default class EnvironmentsStore { filtered = Object.assign(filtered, env); } - filtered = setDeployBoard(oldEnvironmentState, filtered); return filtered; }); @@ -82,20 +71,6 @@ export default class EnvironmentsStore { return filteredEnvironments; } - /** - * Stores the pagination information needed to render the pagination for the - * table. - * - * Normalizes the headers to uppercase since they can be provided either - * in uppercase or lowercase. - * - * Parses to an integer the normalized ones needed for the pagination component. - * - * Stores the normalized and parsed information. - * - * @param {Object} pagination = {} - * @return {Object} - */ setPagination(pagination = {}) { const normalizedHeaders = normalizeHeaders(pagination); const paginationInformation = parseIntPagination(normalizedHeaders); diff --git a/app/assets/javascripts/environments/stores/helpers.js b/app/assets/javascripts/environments/stores/helpers.js deleted file mode 100644 index 8eba6c00601..00000000000 --- a/app/assets/javascripts/environments/stores/helpers.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Deploy boards are EE only. - * - * @param {Object} environment - * @returns {Object} - */ -// eslint-disable-next-line import/prefer-default-export -export const setDeployBoard = (oldEnvironmentState, environment) => environment; diff --git a/app/assets/javascripts/pages/groups/details/index.js b/app/assets/javascripts/pages/groups/details/index.js deleted file mode 100644 index 3bcaa0f0232..00000000000 --- a/app/assets/javascripts/pages/groups/details/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import initGroupDetails from '../shared/group_details'; - -document.addEventListener('DOMContentLoaded', () => { - initGroupDetails('details'); -}); diff --git a/app/assets/javascripts/pages/groups/shared/group_details.js b/app/assets/javascripts/pages/groups/shared/group_details.js deleted file mode 100644 index 01ef3f1db2b..00000000000 --- a/app/assets/javascripts/pages/groups/shared/group_details.js +++ /dev/null @@ -1,31 +0,0 @@ -/* eslint-disable no-new */ - -import { getPagePath } from '~/lib/utils/common_utils'; -import { ACTIVE_TAB_SHARED, ACTIVE_TAB_ARCHIVED } from '~/groups/constants'; -import NewGroupChild from '~/groups/new_group_child'; -import notificationsDropdown from '~/notifications_dropdown'; -import NotificationsForm from '~/notifications_form'; -import ProjectsList from '~/projects_list'; -import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation'; -import GroupTabs from './group_tabs'; - -export default function initGroupDetails(actionName = 'show') { - const newGroupChildWrapper = document.querySelector('.js-new-project-subgroup'); - const loadableActions = [ACTIVE_TAB_SHARED, ACTIVE_TAB_ARCHIVED]; - const paths = window.location.pathname.split('/'); - const subpath = paths[paths.length - 1]; - let action = loadableActions.includes(subpath) ? subpath : getPagePath(1); - if (actionName && action === actionName) { - action = 'show'; // 'show' resets GroupTabs to default action through base class - } - - new GroupTabs({ parentEl: '.groups-listing', action }); - new ShortcutsNavigation(); - new NotificationsForm(); - notificationsDropdown(); - new ProjectsList(); - - if (newGroupChildWrapper) { - new NewGroupChild(newGroupChildWrapper); - } -} diff --git a/app/assets/javascripts/pages/groups/shared/group_tabs.js b/app/assets/javascripts/pages/groups/show/group_tabs.js index c6fe61d2bd9..c6fe61d2bd9 100644 --- a/app/assets/javascripts/pages/groups/shared/group_tabs.js +++ b/app/assets/javascripts/pages/groups/show/group_tabs.js diff --git a/app/assets/javascripts/pages/groups/show/index.js b/app/assets/javascripts/pages/groups/show/index.js index af924e74f1f..3a45fd70d02 100644 --- a/app/assets/javascripts/pages/groups/show/index.js +++ b/app/assets/javascripts/pages/groups/show/index.js @@ -1,5 +1,28 @@ -import initGroupDetails from '../shared/group_details'; +/* eslint-disable no-new */ + +import { getPagePath } from '~/lib/utils/common_utils'; +import { ACTIVE_TAB_SHARED, ACTIVE_TAB_ARCHIVED } from '~/groups/constants'; +import NewGroupChild from '~/groups/new_group_child'; +import notificationsDropdown from '~/notifications_dropdown'; +import NotificationsForm from '~/notifications_form'; +import ProjectsList from '~/projects_list'; +import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation'; +import GroupTabs from './group_tabs'; document.addEventListener('DOMContentLoaded', () => { - initGroupDetails(); + const newGroupChildWrapper = document.querySelector('.js-new-project-subgroup'); + const loadableActions = [ACTIVE_TAB_SHARED, ACTIVE_TAB_ARCHIVED]; + const paths = window.location.pathname.split('/'); + const subpath = paths[paths.length - 1]; + const action = loadableActions.includes(subpath) ? subpath : getPagePath(1); + + new GroupTabs({ parentEl: '.groups-listing', action }); + new ShortcutsNavigation(); + new NotificationsForm(); + notificationsDropdown(); + new ProjectsList(); + + if (newGroupChildWrapper) { + new NewGroupChild(newGroupChildWrapper); + } }); diff --git a/app/assets/javascripts/pages/users/user_tabs.js b/app/assets/javascripts/pages/users/user_tabs.js index 7f800d20835..636308c5401 100644 --- a/app/assets/javascripts/pages/users/user_tabs.js +++ b/app/assets/javascripts/pages/users/user_tabs.js @@ -91,7 +91,6 @@ export default class UserTabs { this.actions = Object.keys(this.loaded); this.bindEvents(); - // TODO: refactor to make this configurable via constructor params with a default value of 'show' if (this.action === 'show') { this.action = this.defaultAction; } 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 348c407f1b5..09a50d25020 100644 --- a/app/assets/javascripts/pipelines/components/graph/stage_column_component.vue +++ b/app/assets/javascripts/pipelines/components/graph/stage_column_component.vue @@ -1,6 +1,5 @@ <script> import _ from 'underscore'; -import stageColumnMixin from 'ee_else_ce/pipelines/mixins/stage_column_mixin'; import JobItem from './job_item.vue'; import JobGroupDropdown from './job_group_dropdown.vue'; @@ -9,7 +8,6 @@ export default { JobItem, JobGroupDropdown, }, - mixins: [stageColumnMixin], props: { title: { type: String, @@ -34,6 +32,9 @@ export default { groupId(group) { return `ci-badge-${_.escape(group.name)}`; }, + buildConnnectorClass(index) { + return index === 0 && !this.isFirstColumn ? 'left-connector' : ''; + }, pipelineActionRequestComplete() { this.$emit('refreshPipelineGraph'); }, diff --git a/app/assets/javascripts/pipelines/mixins/graph_pipeline_bundle_mixin.js b/app/assets/javascripts/pipelines/mixins/graph_pipeline_bundle_mixin.js deleted file mode 100644 index 9177943f88a..00000000000 --- a/app/assets/javascripts/pipelines/mixins/graph_pipeline_bundle_mixin.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - methods: { - clickTriggeredByPipeline() {}, - clickTriggeredPipeline() {}, - }, -}; diff --git a/app/assets/javascripts/pipelines/mixins/stage_column_mixin.js b/app/assets/javascripts/pipelines/mixins/stage_column_mixin.js deleted file mode 100644 index 64283ed0e58..00000000000 --- a/app/assets/javascripts/pipelines/mixins/stage_column_mixin.js +++ /dev/null @@ -1,7 +0,0 @@ -export default { - methods: { - buildConnnectorClass(index) { - return index === 0 && !this.isFirstColumn ? 'left-connector' : ''; - }, - }, -}; diff --git a/app/assets/javascripts/pipelines/pipeline_details_bundle.js b/app/assets/javascripts/pipelines/pipeline_details_bundle.js index 8adbd39edd4..dc9befe6349 100644 --- a/app/assets/javascripts/pipelines/pipeline_details_bundle.js +++ b/app/assets/javascripts/pipelines/pipeline_details_bundle.js @@ -2,9 +2,8 @@ import Vue from 'vue'; import Flash from '~/flash'; import Translate from '~/vue_shared/translate'; import { __ } from '~/locale'; -import pipelineGraph from 'ee_else_ce/pipelines/components/graph/graph_component.vue'; -import GraphEEMixin from 'ee_else_ce/pipelines/mixins/graph_pipeline_bundle_mixin'; import PipelinesMediator from './pipeline_details_mediator'; +import pipelineGraph from './components/graph/graph_component.vue'; import pipelineHeader from './components/header_component.vue'; import eventHub from './event_hub'; @@ -23,7 +22,6 @@ export default () => { components: { pipelineGraph, }, - mixins: [GraphEEMixin], data() { return { mediator, @@ -46,10 +44,6 @@ export default () => { }, on: { refreshPipelineGraph: this.requestRefreshPipelineGraph, - onClickTriggeredBy: (parentPipeline, pipeline) => - this.clickTriggeredByPipeline(parentPipeline, pipeline), - onClickTriggered: (parentPipeline, pipeline) => - this.clickTriggeredPipeline(parentPipeline, pipeline), }, }); }, diff --git a/app/assets/stylesheets/framework/common.scss b/app/assets/stylesheets/framework/common.scss index d47931a49e4..aad5150c0b5 100644 --- a/app/assets/stylesheets/framework/common.scss +++ b/app/assets/stylesheets/framework/common.scss @@ -376,21 +376,18 @@ img.emoji { .prepend-top-default { margin-top: $gl-padding !important; } .prepend-top-16 { margin-top: 16px; } .prepend-top-20 { margin-top: 20px; } -.prepend-top-32 { margin-top: 32px; } .prepend-left-4 { margin-left: 4px; } .prepend-left-5 { margin-left: 5px; } .prepend-left-8 { margin-left: 8px; } .prepend-left-10 { margin-left: 10px; } .prepend-left-default { margin-left: $gl-padding; } .prepend-left-20 { margin-left: 20px; } -.prepend-left-32 { margin-left: 32px; } .append-right-4 { margin-right: 4px; } .append-right-5 { margin-right: 5px; } .append-right-8 { margin-right: 8px; } .append-right-10 { margin-right: 10px; } .append-right-default { margin-right: $gl-padding; } .append-right-20 { margin-right: 20px; } -.prepend-right-32 { margin-right: 32px; } .append-bottom-0 { margin-bottom: 0; } .append-bottom-4 { margin-bottom: $gl-padding-4; } .append-bottom-5 { margin-bottom: 5px; } @@ -399,7 +396,6 @@ img.emoji { .append-bottom-15 { margin-bottom: 15px; } .append-bottom-20 { margin-bottom: 20px; } .append-bottom-default { margin-bottom: $gl-padding; } -.prepend-bottom-32 { margin-bottom: 32px; } .inline { display: inline-block; } .center { text-align: center; } .vertical-align-middle { vertical-align: middle; } diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index 8e53876eb4f..1349845f300 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -693,6 +693,10 @@ } } +.project-empty-note-panel { + border-bottom: 1px solid $border-color; +} + .project-stats, .project-buttons { .scrolling-tabs-container { diff --git a/app/assets/stylesheets/pages/settings.scss b/app/assets/stylesheets/pages/settings.scss index 54126577f93..4f9d96da4bd 100644 --- a/app/assets/stylesheets/pages/settings.scss +++ b/app/assets/stylesheets/pages/settings.scss @@ -23,10 +23,7 @@ } .settings { - // border-top for each item except the top one - + .settings { - border-top: 1px solid $border-color; - } + border-bottom: 1px solid $gray-darker; &:first-of-type { margin-top: 10px; diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 0192b1c253e..4e50106398a 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -58,24 +58,11 @@ class GroupsController < Groups::ApplicationController def show respond_to do |format| - format.html do - render_show_html - end - - format.atom do - render_details_view_atom - end - end - end - - def details - respond_to do |format| - format.html do - render_details_html - end + format.html format.atom do - render_details_view_atom + load_events + render layout: 'xml.atom' end end end @@ -132,19 +119,6 @@ class GroupsController < Groups::ApplicationController protected - def render_show_html - render 'groups/show' - end - - def render_details_html - render 'groups/show' - end - - def render_details_view_atom - load_events - render layout: 'xml.atom', template: 'groups/show' - end - # rubocop: disable CodeReuse/ActiveRecord def authorize_create_group! allowed = if params[:parent_id].present? @@ -204,8 +178,8 @@ class GroupsController < Groups::ApplicationController .includes(:namespace) @events = EventCollection - .new(@projects, offset: params[:offset].to_i, filter: event_filter) - .to_a + .new(@projects, offset: params[:offset].to_i, filter: event_filter) + .to_a Events::RenderService .new(current_user) diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb index 9d028dccad7..4a9ed123161 100644 --- a/app/helpers/groups_helper.rb +++ b/app/helpers/groups_helper.rb @@ -4,7 +4,6 @@ module GroupsHelper def group_overview_nav_link_paths %w[ groups#show - groups#details groups#activity groups#subgroups analytics#show diff --git a/app/presenters/project_presenter.rb b/app/presenters/project_presenter.rb index 161eebcfb3f..000b7c433a2 100644 --- a/app/presenters/project_presenter.rb +++ b/app/presenters/project_presenter.rb @@ -42,7 +42,11 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated def empty_repo_statistics_anchors [ - license_anchor_data + license_anchor_data, + commits_anchor_data, + branches_anchor_data, + tags_anchor_data, + files_anchor_data ].compact.select { |item| item.is_link } end @@ -51,7 +55,9 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated new_file_anchor_data, readme_anchor_data, changelog_anchor_data, - contribution_guide_anchor_data + contribution_guide_anchor_data, + autodevops_anchor_data, + kubernetes_cluster_anchor_data ].compact.reject { |item| item.is_link } end diff --git a/app/validators/sha_validator.rb b/app/validators/sha_validator.rb index 77e7cfa4f6b..085fca4d65d 100644 --- a/app/validators/sha_validator.rb +++ b/app/validators/sha_validator.rb @@ -2,7 +2,7 @@ class ShaValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) - return if value.blank? || Commit.valid_hash?(value) + return if value.blank? || value.match(/\A\h{40}\z/) record.errors.add(attribute, 'is not a valid SHA') end diff --git a/app/views/layouts/header/_new_dropdown.haml b/app/views/layouts/header/_new_dropdown.haml index 438340464bd..5a66b02c048 100644 --- a/app/views/layouts/header/_new_dropdown.haml +++ b/app/views/layouts/header/_new_dropdown.haml @@ -38,4 +38,4 @@ %li= link_to _('New project'), new_project_path, class: 'qa-global-new-project-link' - if current_user.can_create_group? %li= link_to _('New group'), new_group_path - %li= link_to _('New snippet'), new_snippet_path, class: 'qa-global-new-snippet-link' + %li= link_to _('New snippet'), new_snippet_path diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml index 1ec368f8910..f659c89dd30 100644 --- a/app/views/layouts/nav/_dashboard.html.haml +++ b/app/views/layouts/nav/_dashboard.html.haml @@ -29,7 +29,7 @@ - if dashboard_nav_link?(:snippets) = nav_link(controller: 'dashboard/snippets', html_options: { class: ["d-none d-xl-block", ("d-lg-block" unless has_extra_nav_icons?)] }) do - = link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets qa-snippets-link', title: _('Snippets') do + = link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets', title: _('Snippets') do = _('Snippets') - if any_dashboard_nav_link?([:groups, :milestones, :activity, :snippets]) diff --git a/app/views/layouts/nav/sidebar/_group.html.haml b/app/views/layouts/nav/sidebar/_group.html.haml index eefe86eb6b4..21ea9f3b2f3 100644 --- a/app/views/layouts/nav/sidebar/_group.html.haml +++ b/app/views/layouts/nav/sidebar/_group.html.haml @@ -20,14 +20,13 @@ = _('Overview') %ul.sidebar-sub-level-items - = nav_link(path: ['groups#show', 'groups#details', 'groups#activity', 'groups#subgroups'], html_options: { class: "fly-out-top-item" } ) do + = nav_link(path: ['groups#show', 'groups#activity', 'groups#subgroups'], html_options: { class: "fly-out-top-item" } ) do = link_to group_path(@group) do %strong.fly-out-top-item-name = _('Overview') %li.divider.fly-out-top-item - - = nav_link(path: ['groups#show', 'groups#details', 'groups#subgroups'], html_options: { class: 'home' }) do - = link_to details_group_path(@group), title: _('Group details') do + = nav_link(path: ['groups#show', 'groups#subgroups'], html_options: { class: 'home' }) do + = link_to group_path(@group), title: _('Group details') do %span = _('Details') @@ -41,9 +40,9 @@ - if group_sidebar_link?(:contribution_analytics) = nav_link(path: 'analytics#show') do - = link_to group_analytics_path(@group), title: _('Contribution Analytics'), data: { placement: 'right' } do + = link_to group_analytics_path(@group), title: 'Contribution Analytics', data: {placement: 'right'} do %span - = _('Contribution Analytics') + Contribution Analytics = render_if_exists "layouts/nav/ee/epic_link", group: @group diff --git a/app/views/projects/_flash_messages.html.haml b/app/views/projects/_flash_messages.html.haml index b72f0e39b23..7a5fff96676 100644 --- a/app/views/projects/_flash_messages.html.haml +++ b/app/views/projects/_flash_messages.html.haml @@ -5,5 +5,4 @@ - if current_user && can?(current_user, :download_code, project) = render 'shared/no_ssh' = render 'shared/no_password' - - unless project.empty_repo? - = render 'shared/auto_devops_implicitly_enabled_banner', project: project + = render 'shared/auto_devops_implicitly_enabled_banner', project: project diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index 4ac5a74c85c..1d7287410ea 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -57,10 +57,7 @@ - if can?(current_user, :download_code, @project) %nav.project-stats .nav-links.quick-links - - if @project.empty_repo? - = render 'stat_anchor_list', anchors: @project.empty_repo_statistics_anchors - - else - = render 'stat_anchor_list', anchors: @project.statistics_anchors(show_auto_devops_callout: show_auto_devops_callout) + = render 'stat_anchor_list', anchors: @project.statistics_anchors(show_auto_devops_callout: show_auto_devops_callout) .home-panel-home-desc.mt-1 - if @project.description.present? diff --git a/app/views/projects/blob/_header_content.html.haml b/app/views/projects/blob/_header_content.html.haml index 88fa31a73b0..4bef45932d0 100644 --- a/app/views/projects/blob/_header_content.html.haml +++ b/app/views/projects/blob/_header_content.html.haml @@ -1,7 +1,7 @@ .file-header-content = blob_icon blob.mode, blob.name - %strong.file-title-name.qa-file-title-name + %strong.file-title-name = blob.name = copy_file_path_button(blob.path) diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index 9fa31c147eb..081990ac9b7 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -7,64 +7,89 @@ %div{ class: [container_class, ("limit-container-width" unless fluid_layout)] } = render "home_panel" - %h4.prepend-top-0.append-bottom-8 - = _('The repository for this project is empty') + .project-empty-note-panel + %h4.append-bottom-20 + = _('The repository for this project is empty') - - if @project.can_current_user_push_code? - %p.append-bottom-0 - = _('You can create files directly in GitLab using one of the following options.') + - if @project.can_current_user_push_code? + %p + - link_to_cli = link_to _('command line instructions'), '#repo-command-line-instructions' + = _('If you already have files you can push them using the %{link_to_cli} below.').html_safe % { link_to_cli: link_to_cli } + %p + %em + - link_to_protected_branches = link_to _('Learn more about protected branches'), help_page_path('user/project/protected_branches') + = _('Note that the master branch is automatically protected. %{link_to_protected_branches}').html_safe % { link_to_protected_branches: link_to_protected_branches } - .project-buttons.qa-quick-actions - = render 'stat_anchor_list', anchors: @project.empty_repo_statistics_buttons + %hr + %p + - link_to_auto_devops_settings = link_to(s_('AutoDevOps|enable Auto DevOps'), project_settings_ci_cd_path(@project, anchor: 'autodevops-settings')) + - link_to_add_kubernetes_cluster = link_to(s_('AutoDevOps|add a Kubernetes cluster'), new_project_cluster_path(@project)) + = s_('AutoDevOps|You can automatically build and test your application if you %{link_to_auto_devops_settings} for this project. You can automatically deploy it as well, if you %{link_to_add_kubernetes_cluster}.').html_safe % { link_to_auto_devops_settings: link_to_auto_devops_settings, link_to_add_kubernetes_cluster: link_to_add_kubernetes_cluster } - - if can?(current_user, :push_code, @project) - .empty-wrapper.prepend-top-32 - %h3#repo-command-line-instructions.page-title-empty - = _('Command line instructions') + %hr %p - = _('You can also upload existing files from your computer using the instructions below.') - .git-empty.js-git-empty - %fieldset - %h5= _('Git global setup') - %pre.bg-light - :preserve - git config --global user.name "#{h git_user_name}" - git config --global user.email "#{h git_user_email}" + = _('Otherwise it is recommended you start with one of the options below.') + .prepend-top-20 + + %nav.project-buttons + .scrolling-tabs-container.inner-page-scroll-tabs.is-smaller.qa-quick-actions + .fade-left= icon('angle-left') + .fade-right= icon('angle-right') + .nav-links.scrolling-tabs.quick-links + = render 'stat_anchor_list', anchors: @project.empty_repo_statistics_buttons + + - if can?(current_user, :push_code, @project) + %div + .prepend-top-20 + .empty_wrapper + %h3#repo-command-line-instructions.page-title-empty + = _('Command line instructions') + .git-empty.js-git-empty + %fieldset + %h5= _('Git global setup') + %pre.bg-light + :preserve + git config --global user.name "#{h git_user_name}" + git config --global user.email "#{h git_user_email}" + + %fieldset + %h5= _('Create a new repository') + %pre.bg-light + :preserve + git clone #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} + cd #{h @project.path} + touch README.md + git add README.md + git commit -m "add README" + - if @project.can_current_user_push_to_default_branch? + %span>< + git push -u origin master - %fieldset - %h5= _('Create a new repository') - %pre.bg-light - :preserve - git clone #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} - cd #{h @project.path} - touch README.md - git add README.md - git commit -m "add README" - - if @project.can_current_user_push_to_default_branch? - %span>< - git push -u origin master + %fieldset + %h5= _('Existing folder') + %pre.bg-light + :preserve + cd existing_folder + git init + git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} + git add . + git commit -m "Initial commit" + - if @project.can_current_user_push_to_default_branch? + %span>< + git push -u origin master - %fieldset - %h5= _('Push an existing folder') - %pre.bg-light - :preserve - cd existing_folder - git init - git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} - git add . - git commit -m "Initial commit" - - if @project.can_current_user_push_to_default_branch? - %span>< - git push -u origin master + %fieldset + %h5= _('Existing Git repository') + %pre.bg-light + :preserve + cd existing_repo + git remote rename origin old-origin + git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} + - if @project.can_current_user_push_to_default_branch? + %span>< + git push -u origin --all + git push -u origin --tags - %fieldset - %h5= _('Push an existing Git repository') - %pre.bg-light - :preserve - cd existing_repo - git remote rename origin old-origin - git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} - - if @project.can_current_user_push_to_default_branch? - %span>< - git push -u origin --all - git push -u origin --tags + - if can? current_user, :remove_project, @project + .prepend-top-20 + = link_to _('Remove project'), [@project.namespace.becomes(Namespace), @project], data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-inverted btn-remove float-right" diff --git a/app/views/projects/settings/operations/_error_tracking.html.haml b/app/views/projects/settings/operations/_error_tracking.html.haml index 451a79becc3..6b15331db01 100644 --- a/app/views/projects/settings/operations/_error_tracking.html.haml +++ b/app/views/projects/settings/operations/_error_tracking.html.haml @@ -2,7 +2,7 @@ - setting = error_tracking_setting -%section.settings.expanded.no-animate +%section.settings.expanded.border-0.no-animate .settings-header %h4 = _('Error Tracking') diff --git a/app/views/projects/settings/operations/show.html.haml b/app/views/projects/settings/operations/show.html.haml index 6f777305a54..2822debe426 100644 --- a/app/views/projects/settings/operations/show.html.haml +++ b/app/views/projects/settings/operations/show.html.haml @@ -2,6 +2,5 @@ - page_title _('Operations Settings') - breadcrumb_title _('Operations Settings') -= render_if_exists 'projects/settings/operations/incidents' = render 'projects/settings/operations/error_tracking', expanded: true = render_if_exists 'projects/settings/operations/tracing' diff --git a/app/views/shared/_file_highlight.html.haml b/app/views/shared/_file_highlight.html.haml index d7e57fc0d01..5073e6ad48f 100644 --- a/app/views/shared/_file_highlight.html.haml +++ b/app/views/shared/_file_highlight.html.haml @@ -1,4 +1,4 @@ -.file-content.code.js-syntax-highlight.qa-file-content +.file-content.code.js-syntax-highlight .line-numbers - if blob.data.present? - link_icon = icon('link') diff --git a/app/views/shared/snippets/_form.html.haml b/app/views/shared/snippets/_form.html.haml index 6f2ddc5bdba..3007da0c189 100644 --- a/app/views/shared/snippets/_form.html.haml +++ b/app/views/shared/snippets/_form.html.haml @@ -9,7 +9,7 @@ .form-group.row = f.label :title, class: 'col-form-label col-sm-2' .col-sm-10 - = f.text_field :title, class: 'form-control qa-snippet-title', required: true, autofocus: true + = f.text_field :title, class: 'form-control', required: true, autofocus: true = render 'shared/form_elements/description', model: @snippet, project: @project, form: f @@ -21,7 +21,7 @@ .col-sm-10 .file-holder.snippet .js-file-title.file-title - = f.text_field :file_name, placeholder: "Optionally name this file to add code highlighting, e.g. example.rb for Ruby.", class: 'form-control snippet-file-name qa-snippet-file-name' + = f.text_field :file_name, placeholder: "Optionally name this file to add code highlighting, e.g. example.rb for Ruby.", class: 'form-control snippet-file-name' .file-content.code %pre#editor= @snippet.content = f.hidden_field :content, class: 'snippet-file-content' @@ -31,7 +31,7 @@ .form-actions - if @snippet.new_record? - = f.submit 'Create snippet', class: "btn-success btn qa-create-snippet-button" + = f.submit 'Create snippet', class: "btn-success btn" - else = f.submit 'Save changes', class: "btn-success btn" diff --git a/app/views/shared/snippets/_header.html.haml b/app/views/shared/snippets/_header.html.haml index 0c07eae8643..a43296aa806 100644 --- a/app/views/shared/snippets/_header.html.haml +++ b/app/views/shared/snippets/_header.html.haml @@ -1,6 +1,6 @@ .detail-page-header .detail-page-header-body - .snippet-box.qa-snippet-box.has-tooltip.inline.append-right-5{ title: snippet_visibility_level_description(@snippet.visibility_level, @snippet), data: { container: "body" } } + .snippet-box.has-tooltip.inline.append-right-5{ title: snippet_visibility_level_description(@snippet.visibility_level, @snippet), data: { container: "body" } } %span.sr-only = visibility_level_label(@snippet.visibility_level) = visibility_level_icon(@snippet.visibility_level, fw: false) @@ -17,11 +17,11 @@ = render "snippets/actions" .snippet-header.limited-header-width - %h2.snippet-title.prepend-top-0.append-bottom-0.qa-snippet-title + %h2.snippet-title.prepend-top-0.append-bottom-0 = markdown_field(@snippet, :title) - if @snippet.description.present? - .description.qa-snippet-description + .description .wiki = markdown_field(@snippet, :description) %textarea.hidden.js-task-list-field @@ -34,7 +34,7 @@ .embed-snippet .input-group .input-group-prepend - %button.btn.btn-svg.embed-toggle.input-group-text.qa-embed-type{ 'data-toggle': 'dropdown', type: 'button' } + %button.btn.btn-svg.embed-toggle.input-group-text{ 'data-toggle': 'dropdown', type: 'button' } %span.js-embed-action= _("Embed") = sprite_icon('angle-down', size: 12, css_class: 'caret-down') %ul.dropdown-menu.dropdown-menu-selectable.embed-toggle-list |