diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-06 00:08:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-06 00:08:47 +0300 |
commit | 3ef453aa1cf8cc5f90a728fa3ebc166090ff2e3e (patch) | |
tree | cfb343b2edfd02650e912e1b8f438a0e6a00a2d8 /app | |
parent | ec18750aa8538712b952b8265581fc3b3e037923 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
46 files changed, 527 insertions, 402 deletions
diff --git a/app/assets/javascripts/environments/components/environment_stop.vue b/app/assets/javascripts/environments/components/environment_stop.vue index c63d54d586d..ff74f81c98e 100644 --- a/app/assets/javascripts/environments/components/environment_stop.vue +++ b/app/assets/javascripts/environments/components/environment_stop.vue @@ -4,7 +4,6 @@ * Used in environments table. */ -import $ from 'jquery'; import { GlTooltipDirective, GlButton } from '@gitlab/ui'; import { s__ } from '~/locale'; import eventHub from '../event_hub'; @@ -40,7 +39,7 @@ export default { }, methods: { onClick() { - $(this.$el).tooltip('dispose'); + this.$root.$emit('bv::hide::tooltip', this.$options.stopEnvironmentTooltipId); eventHub.$emit('requestStopEnvironment', this.environment); }, onStopEnvironment(environment) { @@ -49,11 +48,12 @@ export default { } }, }, + stopEnvironmentTooltipId: 'stop-environment-button-tooltip', }; </script> <template> <gl-button - v-gl-tooltip + v-gl-tooltip="{ id: $options.stopEnvironmentTooltipId }" :loading="isLoading" :title="title" :aria-label="title" diff --git a/app/assets/javascripts/vue_shared/directives/tooltip.js b/app/assets/javascripts/vue_shared/directives/tooltip.js index 73e92728cb9..0eb505bfce8 100644 --- a/app/assets/javascripts/vue_shared/directives/tooltip.js +++ b/app/assets/javascripts/vue_shared/directives/tooltip.js @@ -1,5 +1,6 @@ import $ from 'jquery'; import '~/commons/bootstrap'; +import { parseBoolean } from '~/lib/utils/common_utils'; export default { bind(el) { @@ -9,6 +10,10 @@ export default { $(el).tooltip({ trigger: 'hover', delay, + // By default, sanitize is run even if there is no `html` or `template` present + // so let's optimize to only run this when necessary. + // https://github.com/twbs/bootstrap/blob/c5966de27395a407f9a3d20d0eb2ff8e8fb7b564/js/src/tooltip.js#L716 + sanitize: parseBoolean(el.dataset.html) || Boolean(el.dataset.template), }); }, diff --git a/app/assets/stylesheets/page_bundles/_pipeline_mixins.scss b/app/assets/stylesheets/page_bundles/_pipeline_mixins.scss new file mode 100644 index 00000000000..702df5750ec --- /dev/null +++ b/app/assets/stylesheets/page_bundles/_pipeline_mixins.scss @@ -0,0 +1,26 @@ +@mixin flat-connector-before($length: 44px) { + &::before { + content: ''; + position: absolute; + top: 48%; + left: -$length; + border-top: 2px solid $border-color; + width: $length; + height: 1px; + } +} + +@mixin build-content($border-radius: 30px) { + display: inline-block; + padding: 8px 10px 9px; + width: 100%; + border: 1px solid $border-color; + border-radius: $border-radius; + background-color: $white; + + &:hover { + background-color: $gray-darker; + border: 1px solid $dropdown-toggle-active-border-color; + color: $gl-text-color; + } +} diff --git a/app/assets/stylesheets/page_bundles/pipeline.scss b/app/assets/stylesheets/page_bundles/pipeline.scss new file mode 100644 index 00000000000..65ae34c1a80 --- /dev/null +++ b/app/assets/stylesheets/page_bundles/pipeline.scss @@ -0,0 +1,387 @@ +@import 'mixins_and_variables_and_functions'; +@import './pipeline_mixins'; + +/** + * Pipeline Page Bundle + * + * Styles used to render a single pipeline page. + * + * Includes its tabs: + * + * - [data-page='projects:pipelines:show'] + * - [data-page='projects:pipelines:dag'] + * - [data-page='projects:pipelines:builds'] + * - [data-page='projects:pipelines:failures'] + * - [data-page='projects:pipelines:tests'] + * - ... + */ + +.tab-pane { + .ci-table { + thead th { + border-top: 0; + } + } +} + +.build-failures { + .build-state { + padding: 20px 2px; + + .build-name { + font-weight: $gl-font-weight-normal; + } + + .stage { + color: $gl-text-color-secondary; + font-weight: $gl-font-weight-normal; + vertical-align: middle; + } + } + + .build-log { + border: 0; + line-height: initial; + } + + .build-trace-row td { + border-top: 0; + border-bottom-width: 1px; + border-bottom-style: solid; + padding-top: 0; + } + + .build-trace { + width: 100%; + text-align: left; + margin-top: $gl-padding; + } + + .build-name { + width: 196px; + + a { + font-weight: $gl-font-weight-bold; + color: $gl-text-color; + text-decoration: none; + + &:focus, + &:hover { + text-decoration: underline; + } + } + } + + .build-actions { + width: 70px; + text-align: right; + } + + .build-stage { + width: 140px; + } + + .ci-status-icon-failed { + padding: 10px 0 10px 12px; + width: 12px + 24px; // padding-left + svg width + } + + .build-icon svg { + width: 24px; + height: 24px; + vertical-align: middle; + } + + .build-state, + .build-trace-row { + > td:last-child { + padding-right: 0; + } + } + + @include media-breakpoint-down(sm) { + td:empty { + display: none; + } + + .ci-table { + margin-top: 2 * $gl-padding; + } + + .build-trace-container { + padding-top: $gl-padding; + padding-bottom: $gl-padding; + } + + .build-trace { + margin-bottom: 0; + margin-top: 0; + } + } +} + +.pipeline-tab-content { + display: flex; + width: 100%; + min-height: $dropdown-max-height-lg; + background-color: $gray-light; + padding: $gl-padding 0; + overflow: auto; +} + +// Pipeline graph, used at +// app/assets/javascripts/pipelines/components/graph/graph_component.vue +.pipeline-graph { + white-space: nowrap; + transition: max-height 0.3s, padding 0.3s; + + .stage-column-list, + .builds-container > ul { + padding: 0; + } + + a { + text-decoration: none; + color: $gl-text-color; + } + + svg { + vertical-align: middle; + } + + .stage-column { + display: inline-block; + vertical-align: top; + + &.left-margin { + &:not(:first-child) { + margin-left: 44px; + + .left-connector { + @include flat-connector-before; + } + } + } + + &.no-margin { + margin: 0; + } + + li { + list-style: none; + } + + // when downstream pipelines are present, the last stage isn't the last column + &:last-child:not(.has-downstream) { + .build { + // Remove right connecting horizontal line from first build in last stage + &:first-child::after { + border: 0; + } + // Remove right curved connectors from all builds in last stage + &:not(:first-child)::after { + border: 0; + } + // Remove opposite curve + .curve::before { + display: none; + } + } + } + + // when upstream pipelines are present, the first stage isn't the first column + &:first-child:not(.has-upstream) { + .build { + // Remove left curved connectors from all builds in first stage + &:not(:first-child)::before { + border: 0; + } + // Remove opposite curve + .curve::after { + display: none; + } + } + } + + // Curve first child connecting lines in opposite direction + .curve { + display: none; + + &::before, + &::after { + content: ''; + width: 21px; + height: 25px; + position: absolute; + top: -31px; + border-top: 2px solid $border-color; + } + + &::after { + left: -44px; + border-right: 2px solid $border-color; + border-radius: 0 20px; + } + + &::before { + right: -44px; + border-left: 2px solid $border-color; + border-radius: 20px 0 0; + } + } + } + + .stage-name { + margin: 0 0 15px 10px; + font-weight: $gl-font-weight-bold; + width: 176px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + line-height: 2.2em; + } + + .build { + position: relative; + width: 186px; + margin-bottom: 10px; + white-space: normal; + + .ci-job-dropdown-container { + // override dropdown.scss + .dropdown-menu li button { + padding: 0; + text-align: center; + } + } + + // ensure .build-content has hover style when action-icon is hovered + .ci-job-dropdown-container:hover .build-content { + @extend .build-content:hover; + } + + .ci-status-icon svg { + height: 24px; + width: 24px; + } + + .dropdown-menu-toggle { + background-color: transparent; + border: 0; + padding: 0; + + &:focus { + outline: none; + } + } + + .build-content { + @include build-content(); + } + + a.build-content:hover, + button.build-content:hover { + background-color: $gray-darker; + border: 1px solid $dropdown-toggle-active-border-color; + } + + // Connect first build in each stage with right horizontal line + &:first-child { + &::after { + content: ''; + position: absolute; + top: 48%; + right: -48px; + border-top: 2px solid $border-color; + width: 48px; + height: 1px; + } + } + + // Connect each build (except for first) with curved lines + &:not(:first-child) { + &::after, + &::before { + content: ''; + top: -49px; + position: absolute; + border-bottom: 2px solid $border-color; + width: 25px; + height: 69px; + } + + // Right connecting curves + &::after { + right: -25px; + border-right: 2px solid $border-color; + border-radius: 0 0 20px; + } + + // Left connecting curves + &::before { + left: -25px; + border-left: 2px solid $border-color; + border-radius: 0 0 0 20px; + } + } + + // Connect second build to first build with smaller curved line + &:nth-child(2) { + &::after, + &::before { + height: 29px; + top: -9px; + } + + .curve { + display: block; + } + } + } + + .ci-action-icon-container { + position: absolute; + right: 5px; + top: 50%; + transform: translateY(-50%); + + // Action Icons in big pipeline-graph nodes + &.ci-action-icon-wrapper { + height: 30px; + width: 30px; + border-radius: 100%; + display: block; + padding: 0; + line-height: 0; + + svg { + fill: $gl-text-color-secondary; + } + + .spinner { + top: 2px; + } + + &.play { + svg { + left: 1px; + top: 1px; + } + } + } + } + + .stage-action svg { + left: 1px; + top: -2px; + } +} + +// Triggers the dropdown in the big pipeline graph +.dropdown-counter-badge { + font-weight: 100; + font-size: 15px; + position: absolute; + right: 13px; + top: 8px; +} diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index d382fc6241f..48d37ead8e2 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -1,30 +1,3 @@ -@mixin flat-connector-before($length: 44px) { - &::before { - content: ''; - position: absolute; - top: 48%; - left: -$length; - border-top: 2px solid $border-color; - width: $length; - height: 1px; - } -} - -@mixin build-content($border-radius: 30px) { - display: inline-block; - padding: 8px 10px 9px; - width: 100%; - border: 1px solid $border-color; - border-radius: $border-radius; - background-color: $white; - - &:hover { - background-color: $gray-darker; - border: 1px solid $dropdown-toggle-active-border-color; - color: $gl-text-color; - } -} - .pipelines { .stage { max-width: 90px; @@ -278,378 +251,6 @@ border-bottom: 0; } -[data-page='projects:pipelines:show'] { - .tab-pane { - .ci-table { - thead th { - border-top: 0; - } - } - } - - .build-failures { - .build-state { - padding: 20px 2px; - - .build-name { - font-weight: $gl-font-weight-normal; - } - - .stage { - color: $gl-text-color-secondary; - font-weight: $gl-font-weight-normal; - vertical-align: middle; - } - } - - .build-log { - border: 0; - line-height: initial; - } - - .build-trace-row td { - border-top: 0; - border-bottom-width: 1px; - border-bottom-style: solid; - padding-top: 0; - } - - .build-trace { - width: 100%; - text-align: left; - margin-top: $gl-padding; - } - - .build-name { - width: 196px; - - a { - font-weight: $gl-font-weight-bold; - color: $gl-text-color; - text-decoration: none; - - &:focus, - &:hover { - text-decoration: underline; - } - } - } - - .build-actions { - width: 70px; - text-align: right; - } - - .build-stage { - width: 140px; - } - - .ci-status-icon-failed { - padding: 10px 0 10px 12px; - width: 12px + 24px; // padding-left + svg width - } - - .build-icon svg { - width: 24px; - height: 24px; - vertical-align: middle; - } - - .build-state, - .build-trace-row { - > td:last-child { - padding-right: 0; - } - } - - @include media-breakpoint-down(sm) { - td:empty { - display: none; - } - - .ci-table { - margin-top: 2 * $gl-padding; - } - - .build-trace-container { - padding-top: $gl-padding; - padding-bottom: $gl-padding; - } - - .build-trace { - margin-bottom: 0; - margin-top: 0; - } - } - } - - .pipeline-tab-content { - display: flex; - width: 100%; - min-height: $dropdown-max-height-lg; - background-color: $gray-light; - padding: $gl-padding 0; - overflow: auto; - } - - // Pipeline graph, used at - // app/assets/javascripts/pipelines/components/graph/graph_component.vue - .pipeline-graph { - white-space: nowrap; - transition: max-height 0.3s, padding 0.3s; - - .stage-column-list, - .builds-container > ul { - padding: 0; - } - - a { - text-decoration: none; - color: $gl-text-color; - } - - svg { - vertical-align: middle; - } - - .stage-column { - display: inline-block; - vertical-align: top; - - &.left-margin { - &:not(:first-child) { - margin-left: 44px; - - .left-connector { - @include flat-connector-before; - } - } - } - - &.no-margin { - margin: 0; - } - - li { - list-style: none; - } - - // when downstream pipelines are present, the last stage isn't the last column - &:last-child:not(.has-downstream) { - .build { - // Remove right connecting horizontal line from first build in last stage - &:first-child::after { - border: 0; - } - // Remove right curved connectors from all builds in last stage - &:not(:first-child)::after { - border: 0; - } - // Remove opposite curve - .curve::before { - display: none; - } - } - } - - // when upstream pipelines are present, the first stage isn't the first column - &:first-child:not(.has-upstream) { - .build { - // Remove left curved connectors from all builds in first stage - &:not(:first-child)::before { - border: 0; - } - // Remove opposite curve - .curve::after { - display: none; - } - } - } - - // Curve first child connecting lines in opposite direction - .curve { - display: none; - - &::before, - &::after { - content: ''; - width: 21px; - height: 25px; - position: absolute; - top: -31px; - border-top: 2px solid $border-color; - } - - &::after { - left: -44px; - border-right: 2px solid $border-color; - border-radius: 0 20px; - } - - &::before { - right: -44px; - border-left: 2px solid $border-color; - border-radius: 20px 0 0; - } - } - } - - .stage-name { - margin: 0 0 15px 10px; - font-weight: $gl-font-weight-bold; - width: 176px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - line-height: 2.2em; - } - - .build { - position: relative; - width: 186px; - margin-bottom: 10px; - white-space: normal; - - .ci-job-dropdown-container { - // override dropdown.scss - .dropdown-menu li button { - padding: 0; - text-align: center; - } - } - - // ensure .build-content has hover style when action-icon is hovered - .ci-job-dropdown-container:hover .build-content { - @extend .build-content:hover; - } - - .ci-status-icon svg { - height: 24px; - width: 24px; - } - - .dropdown-menu-toggle { - background-color: transparent; - border: 0; - padding: 0; - - &:focus { - outline: none; - } - } - - .build-content { - @include build-content(); - } - - a.build-content:hover, - button.build-content:hover { - background-color: $gray-darker; - border: 1px solid $dropdown-toggle-active-border-color; - } - - // Connect first build in each stage with right horizontal line - &:first-child { - &::after { - content: ''; - position: absolute; - top: 48%; - right: -48px; - border-top: 2px solid $border-color; - width: 48px; - height: 1px; - } - } - - // Connect each build (except for first) with curved lines - &:not(:first-child) { - &::after, - &::before { - content: ''; - top: -49px; - position: absolute; - border-bottom: 2px solid $border-color; - width: 25px; - height: 69px; - } - - // Right connecting curves - &::after { - right: -25px; - border-right: 2px solid $border-color; - border-radius: 0 0 20px; - } - - // Left connecting curves - &::before { - left: -25px; - border-left: 2px solid $border-color; - border-radius: 0 0 0 20px; - } - } - - // Connect second build to first build with smaller curved line - &:nth-child(2) { - &::after, - &::before { - height: 29px; - top: -9px; - } - - .curve { - display: block; - } - } - } - - .ci-action-icon-container { - position: absolute; - right: 5px; - top: 50%; - transform: translateY(-50%); - - // Action Icons in big pipeline-graph nodes - &.ci-action-icon-wrapper { - height: 30px; - width: 30px; - border-radius: 100%; - display: block; - padding: 0; - line-height: 0; - - svg { - fill: $gl-text-color-secondary; - } - - .spinner { - top: 2px; - } - - &.play { - svg { - left: 1px; - top: 1px; - } - } - } - } - - .stage-action svg { - left: 1px; - top: -2px; - } - } - - // Triggers the dropdown in the big pipeline graph - .dropdown-counter-badge { - font-weight: 100; - font-size: 15px; - position: absolute; - right: 13px; - top: 8px; - } -} - .ci-build-text, .ci-status-text { font-weight: 200; diff --git a/app/controllers/abuse_reports_controller.rb b/app/controllers/abuse_reports_controller.rb index 7d8016f763d..5e613c47fc5 100644 --- a/app/controllers/abuse_reports_controller.rb +++ b/app/controllers/abuse_reports_controller.rb @@ -3,6 +3,8 @@ class AbuseReportsController < ApplicationController before_action :set_user, only: [:new] + feature_category :users + def new @abuse_report = AbuseReport.new @abuse_report.user_id = @user.id diff --git a/app/controllers/admin/abuse_reports_controller.rb b/app/controllers/admin/abuse_reports_controller.rb index 31d825c235b..6f80ed3c172 100644 --- a/app/controllers/admin/abuse_reports_controller.rb +++ b/app/controllers/admin/abuse_reports_controller.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class Admin::AbuseReportsController < Admin::ApplicationController + feature_category :users + def index @abuse_reports = AbuseReportsFinder.new(params).execute end diff --git a/app/controllers/admin/appearances_controller.rb b/app/controllers/admin/appearances_controller.rb index 8405f2a5cf8..c2614a158b7 100644 --- a/app/controllers/admin/appearances_controller.rb +++ b/app/controllers/admin/appearances_controller.rb @@ -3,6 +3,8 @@ class Admin::AppearancesController < Admin::ApplicationController before_action :set_appearance, except: :create + feature_category :navigation + def show end diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index c05153921fe..786ba73a96f 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -17,6 +17,24 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController push_frontend_feature_flag(:ci_instance_variables_ui, default_enabled: true) end + feature_category :not_owned, [ + :general, :reporting, :metrics_and_profiling, :network, + :preferences, :update, :reset_health_check_token + ] + + feature_category :metrics, [ + :create_self_monitoring_project, + :status_create_self_monitoring_project, + :delete_self_monitoring_project, + :status_delete_self_monitoring_project + ] + + feature_category :source_code_management, [:repository, :clear_repository_check_states] + feature_category :continuous_integration, [:ci_cd, :reset_registration_token] + feature_category :collection, [:usage_data] + feature_category :integrations, [:integrations] + feature_category :pages, [:lets_encrypt_terms_of_service] + VALID_SETTING_PANELS = %w(general repository ci_cd reporting metrics_and_profiling network preferences).freeze diff --git a/app/controllers/admin/applications_controller.rb b/app/controllers/admin/applications_controller.rb index c017ecee054..449aa90b0e6 100644 --- a/app/controllers/admin/applications_controller.rb +++ b/app/controllers/admin/applications_controller.rb @@ -6,6 +6,8 @@ class Admin::ApplicationsController < Admin::ApplicationController before_action :set_application, only: [:show, :edit, :update, :destroy] before_action :load_scopes, only: [:new, :create, :edit, :update] + feature_category :authentication_and_authorization + def index applications = ApplicationsFinder.new.execute @applications = Kaminari.paginate_array(applications).page(params[:page]) diff --git a/app/controllers/admin/background_jobs_controller.rb b/app/controllers/admin/background_jobs_controller.rb index fc877142418..d4b906d5e33 100644 --- a/app/controllers/admin/background_jobs_controller.rb +++ b/app/controllers/admin/background_jobs_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true class Admin::BackgroundJobsController < Admin::ApplicationController + feature_category :not_owned end diff --git a/app/controllers/admin/broadcast_messages_controller.rb b/app/controllers/admin/broadcast_messages_controller.rb index 3233c765941..4660b0bfbb0 100644 --- a/app/controllers/admin/broadcast_messages_controller.rb +++ b/app/controllers/admin/broadcast_messages_controller.rb @@ -5,6 +5,8 @@ class Admin::BroadcastMessagesController < Admin::ApplicationController before_action :finder, only: [:edit, :update, :destroy] + feature_category :navigation + # rubocop: disable CodeReuse/ActiveRecord def index @broadcast_messages = BroadcastMessage.order(ends_at: :desc).page(params[:page]) diff --git a/app/controllers/admin/ci/variables_controller.rb b/app/controllers/admin/ci/variables_controller.rb index ca9b393550d..f30ee37fa58 100644 --- a/app/controllers/admin/ci/variables_controller.rb +++ b/app/controllers/admin/ci/variables_controller.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class Admin::Ci::VariablesController < Admin::ApplicationController + feature_category :continuous_integration + def show respond_to do |format| format.json { render_instance_variables } diff --git a/app/controllers/admin/cohorts_controller.rb b/app/controllers/admin/cohorts_controller.rb index e3df98b7917..d5cd9c55422 100644 --- a/app/controllers/admin/cohorts_controller.rb +++ b/app/controllers/admin/cohorts_controller.rb @@ -5,6 +5,8 @@ class Admin::CohortsController < Admin::ApplicationController track_unique_visits :index, target_id: 'i_analytics_cohorts' + feature_category :instance_statistics + def index if Gitlab::CurrentSettings.usage_ping_enabled cohorts_results = Rails.cache.fetch('cohorts', expires_in: 1.day) do diff --git a/app/controllers/admin/dashboard_controller.rb b/app/controllers/admin/dashboard_controller.rb index b7b535e70df..7d981d67840 100644 --- a/app/controllers/admin/dashboard_controller.rb +++ b/app/controllers/admin/dashboard_controller.rb @@ -6,6 +6,8 @@ class Admin::DashboardController < Admin::ApplicationController COUNTED_ITEMS = [Project, User, Group].freeze + feature_category :not_owned + # rubocop: disable CodeReuse/ActiveRecord def index @counts = Gitlab::Database::Count.approximate_counts(COUNTED_ITEMS) diff --git a/app/controllers/admin/deploy_keys_controller.rb b/app/controllers/admin/deploy_keys_controller.rb index 180f7d4c803..ed63e65d4df 100644 --- a/app/controllers/admin/deploy_keys_controller.rb +++ b/app/controllers/admin/deploy_keys_controller.rb @@ -4,6 +4,8 @@ class Admin::DeployKeysController < Admin::ApplicationController before_action :deploy_keys, only: [:index] before_action :deploy_key, only: [:destroy, :edit, :update] + feature_category :continuous_delivery + def index end diff --git a/app/controllers/admin/dev_ops_report_controller.rb b/app/controllers/admin/dev_ops_report_controller.rb index bed0d51c331..59b2200fb59 100644 --- a/app/controllers/admin/dev_ops_report_controller.rb +++ b/app/controllers/admin/dev_ops_report_controller.rb @@ -5,6 +5,8 @@ class Admin::DevOpsReportController < Admin::ApplicationController track_unique_visits :show, target_id: 'i_analytics_dev_ops_score' + feature_category :devops_reports + # rubocop: disable CodeReuse/ActiveRecord def show @metric = DevOpsReport::Metric.order(:created_at).last&.present diff --git a/app/controllers/admin/gitaly_servers_controller.rb b/app/controllers/admin/gitaly_servers_controller.rb index 0a5566bfe70..827791c8a4a 100644 --- a/app/controllers/admin/gitaly_servers_controller.rb +++ b/app/controllers/admin/gitaly_servers_controller.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class Admin::GitalyServersController < Admin::ApplicationController + feature_category :gitaly + def index @gitaly_servers = Gitaly::Server.all end diff --git a/app/controllers/admin/groups_controller.rb b/app/controllers/admin/groups_controller.rb index 6414792dd43..032e449f995 100644 --- a/app/controllers/admin/groups_controller.rb +++ b/app/controllers/admin/groups_controller.rb @@ -5,6 +5,8 @@ class Admin::GroupsController < Admin::ApplicationController before_action :group, only: [:edit, :update, :destroy, :project_update, :members_update] + feature_category :subgroups + def index @groups = groups.sort_by_attribute(@sort = params[:sort]) @groups = @groups.search(params[:name]) if params[:name].present? diff --git a/app/controllers/admin/health_check_controller.rb b/app/controllers/admin/health_check_controller.rb index 7668c799cba..e013b5fbd72 100644 --- a/app/controllers/admin/health_check_controller.rb +++ b/app/controllers/admin/health_check_controller.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class Admin::HealthCheckController < Admin::ApplicationController + feature_category :not_owned + def show @errors = HealthCheck::Utils.process_checks(checks) end diff --git a/app/controllers/admin/hook_logs_controller.rb b/app/controllers/admin/hook_logs_controller.rb index 8301b3aa880..444ad17f86d 100644 --- a/app/controllers/admin/hook_logs_controller.rb +++ b/app/controllers/admin/hook_logs_controller.rb @@ -8,6 +8,8 @@ class Admin::HookLogsController < Admin::ApplicationController respond_to :html + feature_category :integrations + def show end diff --git a/app/controllers/admin/hooks_controller.rb b/app/controllers/admin/hooks_controller.rb index 51b0f45c5be..c54d08191e6 100644 --- a/app/controllers/admin/hooks_controller.rb +++ b/app/controllers/admin/hooks_controller.rb @@ -5,6 +5,8 @@ class Admin::HooksController < Admin::ApplicationController before_action :hook_logs, only: :edit + feature_category :integrations + def index @hooks = SystemHook.all @hook = SystemHook.new diff --git a/app/controllers/admin/identities_controller.rb b/app/controllers/admin/identities_controller.rb index 327538f1e93..dcec50e882d 100644 --- a/app/controllers/admin/identities_controller.rb +++ b/app/controllers/admin/identities_controller.rb @@ -4,6 +4,8 @@ class Admin::IdentitiesController < Admin::ApplicationController before_action :user before_action :identity, except: [:index, :new, :create] + feature_category :authentication_and_authorization + def new @identity = Identity.new end diff --git a/app/controllers/admin/impersonation_tokens_controller.rb b/app/controllers/admin/impersonation_tokens_controller.rb index c35619a944e..c3166d5dd82 100644 --- a/app/controllers/admin/impersonation_tokens_controller.rb +++ b/app/controllers/admin/impersonation_tokens_controller.rb @@ -3,6 +3,8 @@ class Admin::ImpersonationTokensController < Admin::ApplicationController before_action :user + feature_category :authentication_and_authorization + def index set_index_vars end diff --git a/app/controllers/admin/impersonations_controller.rb b/app/controllers/admin/impersonations_controller.rb index 65fe22bd8f4..6c45b03455e 100644 --- a/app/controllers/admin/impersonations_controller.rb +++ b/app/controllers/admin/impersonations_controller.rb @@ -4,6 +4,8 @@ class Admin::ImpersonationsController < Admin::ApplicationController skip_before_action :authenticate_admin! before_action :authenticate_impersonator! + feature_category :authentication_and_authorization + def destroy original_user = stop_impersonation redirect_to admin_user_path(original_user), status: :found diff --git a/app/controllers/admin/instance_statistics_controller.rb b/app/controllers/admin/instance_statistics_controller.rb index 3aee26b97a2..dfbd704cb0c 100644 --- a/app/controllers/admin/instance_statistics_controller.rb +++ b/app/controllers/admin/instance_statistics_controller.rb @@ -7,6 +7,8 @@ class Admin::InstanceStatisticsController < Admin::ApplicationController track_unique_visits :index, target_id: 'i_analytics_instance_statistics' + feature_category :instance_statistics + def index end diff --git a/app/controllers/admin/integrations_controller.rb b/app/controllers/admin/integrations_controller.rb index 003a5d427f5..9a1d5a11f7f 100644 --- a/app/controllers/admin/integrations_controller.rb +++ b/app/controllers/admin/integrations_controller.rb @@ -4,6 +4,8 @@ class Admin::IntegrationsController < Admin::ApplicationController include IntegrationsActions include ServicesHelper + feature_category :integrations + private def find_or_initialize_integration(name) diff --git a/app/controllers/admin/jobs_controller.rb b/app/controllers/admin/jobs_controller.rb index 7b50a45a9cd..b800ca79d6b 100644 --- a/app/controllers/admin/jobs_controller.rb +++ b/app/controllers/admin/jobs_controller.rb @@ -3,6 +3,8 @@ class Admin::JobsController < Admin::ApplicationController BUILDS_PER_PAGE = 30 + feature_category :continuous_integration + def index # We need all builds for tabs counters @all_builds = Ci::JobsFinder.new(current_user: current_user).execute diff --git a/app/controllers/admin/keys_controller.rb b/app/controllers/admin/keys_controller.rb index 58ea19d1210..03383604e30 100644 --- a/app/controllers/admin/keys_controller.rb +++ b/app/controllers/admin/keys_controller.rb @@ -3,6 +3,8 @@ class Admin::KeysController < Admin::ApplicationController before_action :user, only: [:show, :destroy] + feature_category :authentication_and_authorization + def show @key = user.keys.find(params[:id]) diff --git a/app/controllers/admin/labels_controller.rb b/app/controllers/admin/labels_controller.rb index 6cb206c1686..be63bf4c7ce 100644 --- a/app/controllers/admin/labels_controller.rb +++ b/app/controllers/admin/labels_controller.rb @@ -3,6 +3,8 @@ class Admin::LabelsController < Admin::ApplicationController before_action :set_label, only: [:show, :edit, :update, :destroy] + feature_category :issue_tracking + def index @labels = Label.templates.page(params[:page]) end diff --git a/app/controllers/admin/plan_limits_controller.rb b/app/controllers/admin/plan_limits_controller.rb index 2620db8aec5..0a5cdc06d61 100644 --- a/app/controllers/admin/plan_limits_controller.rb +++ b/app/controllers/admin/plan_limits_controller.rb @@ -5,6 +5,8 @@ class Admin::PlanLimitsController < Admin::ApplicationController before_action :set_plan_limits + feature_category :not_owned + def create redirect_path = referer_path(request) || general_admin_application_settings_path diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index 9fe1f22c342..c4564478462 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -6,6 +6,9 @@ class Admin::ProjectsController < Admin::ApplicationController before_action :project, only: [:show, :transfer, :repository_check, :destroy] before_action :group, only: [:show, :transfer] + feature_category :projects, [:index, :show, :transfer, :destroy] + feature_category :source_code_management, [:repository_check] + def index params[:sort] ||= 'latest_activity_desc' @sort = params[:sort] diff --git a/app/controllers/admin/requests_profiles_controller.rb b/app/controllers/admin/requests_profiles_controller.rb index 24383455064..fbbe8c24637 100644 --- a/app/controllers/admin/requests_profiles_controller.rb +++ b/app/controllers/admin/requests_profiles_controller.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class Admin::RequestsProfilesController < Admin::ApplicationController + feature_category :not_owned + def index @profile_token = Gitlab::RequestProfiler.profile_token @profiles = Gitlab::RequestProfiler.all.group_by(&:request_path) diff --git a/app/controllers/admin/runner_projects_controller.rb b/app/controllers/admin/runner_projects_controller.rb index 774ce04d079..7761ffaac84 100644 --- a/app/controllers/admin/runner_projects_controller.rb +++ b/app/controllers/admin/runner_projects_controller.rb @@ -3,6 +3,8 @@ class Admin::RunnerProjectsController < Admin::ApplicationController before_action :project, only: [:create] + feature_category :continuous_integration + def create @runner = Ci::Runner.find(params[:runner_project][:runner_id]) diff --git a/app/controllers/admin/runners_controller.rb b/app/controllers/admin/runners_controller.rb index ba7e7d57b91..576b148fbff 100644 --- a/app/controllers/admin/runners_controller.rb +++ b/app/controllers/admin/runners_controller.rb @@ -5,6 +5,8 @@ class Admin::RunnersController < Admin::ApplicationController before_action :runner, except: [:index, :tag_list, :runner_setup_scripts] + feature_category :continuous_integration + def index finder = Ci::RunnersFinder.new(current_user: current_user, params: params) @runners = finder.execute diff --git a/app/controllers/admin/serverless/domains_controller.rb b/app/controllers/admin/serverless/domains_controller.rb index 1d4f10e033f..49cd9f7a36d 100644 --- a/app/controllers/admin/serverless/domains_controller.rb +++ b/app/controllers/admin/serverless/domains_controller.rb @@ -4,6 +4,8 @@ class Admin::Serverless::DomainsController < Admin::ApplicationController before_action :check_feature_flag before_action :domain, only: [:update, :verify, :destroy] + feature_category :serverless + def index @domain = PagesDomain.instance_serverless.first_or_initialize end diff --git a/app/controllers/admin/services_controller.rb b/app/controllers/admin/services_controller.rb index 1f4250639c4..379e74bb249 100644 --- a/app/controllers/admin/services_controller.rb +++ b/app/controllers/admin/services_controller.rb @@ -6,6 +6,8 @@ class Admin::ServicesController < Admin::ApplicationController before_action :service, only: [:edit, :update] before_action :whitelist_query_limiting, only: [:index] + feature_category :integrations + def index @services = Service.find_or_create_templates.sort_by(&:title) @existing_instance_types = Service.for_instance.pluck(:type) # rubocop: disable CodeReuse/ActiveRecord diff --git a/app/controllers/admin/sessions_controller.rb b/app/controllers/admin/sessions_controller.rb index e0bee6f48ea..3c811e7c3f5 100644 --- a/app/controllers/admin/sessions_controller.rb +++ b/app/controllers/admin/sessions_controller.rb @@ -7,6 +7,8 @@ class Admin::SessionsController < ApplicationController before_action :user_is_admin! + feature_category :authentication_and_authorization + def new if current_user_mode.admin_mode? redirect_to redirect_path, notice: _('Admin mode already enabled') diff --git a/app/controllers/admin/spam_logs_controller.rb b/app/controllers/admin/spam_logs_controller.rb index 689e502a221..67d991c8b03 100644 --- a/app/controllers/admin/spam_logs_controller.rb +++ b/app/controllers/admin/spam_logs_controller.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class Admin::SpamLogsController < Admin::ApplicationController + feature_category :not_owned + # rubocop: disable CodeReuse/ActiveRecord def index @spam_logs = SpamLog.order(id: :desc).page(params[:page]) diff --git a/app/controllers/admin/system_info_controller.rb b/app/controllers/admin/system_info_controller.rb index 657aa177ecf..f14305528a3 100644 --- a/app/controllers/admin/system_info_controller.rb +++ b/app/controllers/admin/system_info_controller.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class Admin::SystemInfoController < Admin::ApplicationController + feature_category :not_owned + EXCLUDED_MOUNT_OPTIONS = %w[ nobrowse read-only diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 7f7a82a3032..ea0a0b62735 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -7,6 +7,8 @@ class Admin::UsersController < Admin::ApplicationController before_action :check_impersonation_availability, only: :impersonate before_action :ensure_destroy_prerequisites_met, only: [:destroy] + feature_category :users + def index @users = User.filter_items(params[:filter]).order_name_asc @users = @users.search_with_secondary_emails(params[:search_query]) if params[:search_query].present? diff --git a/app/controllers/autocomplete_controller.rb b/app/controllers/autocomplete_controller.rb index 99fa17e202a..ac4ee14c6a9 100644 --- a/app/controllers/autocomplete_controller.rb +++ b/app/controllers/autocomplete_controller.rb @@ -3,6 +3,12 @@ class AutocompleteController < ApplicationController skip_before_action :authenticate_user!, only: [:users, :award_emojis, :merge_request_target_branches] + feature_category :users, [:users, :user] + feature_category :projects, [:projects] + feature_category :issue_tracking, [:award_emojis] + feature_category :code_review, [:merge_request_target_branches] + feature_category :continuous_delivery, [:deploy_keys_with_owners] + def users group = Autocomplete::GroupFinder .new(current_user, project, params) diff --git a/app/controllers/clusters/base_controller.rb b/app/controllers/clusters/base_controller.rb index 188805c6106..b1ffdf00b87 100644 --- a/app/controllers/clusters/base_controller.rb +++ b/app/controllers/clusters/base_controller.rb @@ -8,6 +8,8 @@ class Clusters::BaseController < ApplicationController helper_method :clusterable + feature_category :kubernetes_management + private def cluster diff --git a/app/services/issues/reopen_service.rb b/app/services/issues/reopen_service.rb index e2b1b5400c7..12dbff57ec5 100644 --- a/app/services/issues/reopen_service.rb +++ b/app/services/issues/reopen_service.rb @@ -5,6 +5,8 @@ module Issues def execute(issue) return issue unless can?(current_user, :reopen_issue, issue) + before_reopen(issue) + if issue.reopen event_service.reopen_issue(issue, current_user) create_note(issue, 'reopened') @@ -21,8 +23,14 @@ module Issues private + def before_reopen(issue) + # Overriden in EE + end + def create_note(issue, state = issue.state) SystemNoteService.change_status(issue, issue.project, current_user, state, nil) end end end + +Issues::ReopenService.prepend_if_ee('EE::Issues::ReopenService') diff --git a/app/views/layouts/_loading_hints.html.haml b/app/views/layouts/_loading_hints.html.haml index 0ef50d1b122..a75b602ff6b 100644 --- a/app/views/layouts/_loading_hints.html.haml +++ b/app/views/layouts/_loading_hints.html.haml @@ -6,5 +6,6 @@ - else %link{ { rel: 'preload', href: stylesheet_url('application'), as: 'style' }, ActionController::Base.asset_host ? { crossorigin: 'anonymous' } : {} } %link{ { rel: 'preload', href: stylesheet_url("highlight/themes/#{user_color_scheme}"), as: 'style' }, ActionController::Base.asset_host ? { crossorigin: 'anonymous' } : {} } +%link{ { rel: 'preload', href: asset_url("fontawesome-webfont.woff2?v=4.7.0"), as: 'font', type: 'font/woff2' }, ActionController::Base.asset_host ? { crossorigin: 'anonymous' } : {} } - if Gitlab::CurrentSettings.snowplow_enabled? && Gitlab::CurrentSettings.snowplow_collector_hostname %link{ rel: 'preconnect', href: Gitlab::CurrentSettings.snowplow_collector_hostname, crossorigin: '' } diff --git a/app/views/projects/pipelines/show.html.haml b/app/views/projects/pipelines/show.html.haml index 5b8ab455ec8..add84292849 100644 --- a/app/views/projects/pipelines/show.html.haml +++ b/app/views/projects/pipelines/show.html.haml @@ -2,6 +2,7 @@ - breadcrumb_title "##{@pipeline.id}" - page_title _('Pipeline') - pipeline_has_errors = @pipeline.builds.empty? && @pipeline.yaml_errors.present? +- add_page_specific_style 'page_bundles/pipeline' .js-pipeline-container{ data: { controller_action: "#{controller.action_name}" } } #js-pipeline-header-vue.pipeline-header-container{ data: {full_path: @project.full_path, retry_path: retry_project_pipeline_path(@pipeline.project, @pipeline), cancel_path: cancel_project_pipeline_path(@pipeline.project, @pipeline), delete_path: project_pipeline_path(@pipeline.project, @pipeline), pipeline_iid: @pipeline.iid, pipeline_id: @pipeline.id} } |