Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-05-21 00:08:53 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-21 00:08:53 +0300
commit22fe7d7df6b91040d6cecbfd78f24c563afed463 (patch)
tree8c2baf2ed9f93e13680e9288ad30adb4fa1ae04a /app
parente32f083f49a50ee2f7c217eb0d51d759958145f3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/controllers/admin/application_settings/appearances_controller.rb1
-rw-r--r--app/controllers/admin/broadcast_messages_controller.rb1
-rw-r--r--app/controllers/groups/autocomplete_sources_controller.rb3
-rw-r--r--app/controllers/groups/email_campaigns_controller.rb1
-rw-r--r--app/controllers/projects/usage_quotas_controller.rb1
-rw-r--r--app/controllers/pwa_controller.rb1
-rw-r--r--app/controllers/users/callouts_controller.rb1
-rw-r--r--app/controllers/users_controller.rb4
-rw-r--r--app/controllers/whats_new_controller.rb1
-rw-r--r--app/models/namespace/root_storage_statistics.rb33
10 files changed, 37 insertions, 10 deletions
diff --git a/app/controllers/admin/application_settings/appearances_controller.rb b/app/controllers/admin/application_settings/appearances_controller.rb
index 47b2356a60f..cf765c96a8f 100644
--- a/app/controllers/admin/application_settings/appearances_controller.rb
+++ b/app/controllers/admin/application_settings/appearances_controller.rb
@@ -4,6 +4,7 @@ class Admin::ApplicationSettings::AppearancesController < Admin::ApplicationCont
before_action :set_appearance, except: :create
feature_category :navigation
+ urgency :low
def show
end
diff --git a/app/controllers/admin/broadcast_messages_controller.rb b/app/controllers/admin/broadcast_messages_controller.rb
index 8b672929f88..865af244773 100644
--- a/app/controllers/admin/broadcast_messages_controller.rb
+++ b/app/controllers/admin/broadcast_messages_controller.rb
@@ -6,6 +6,7 @@ class Admin::BroadcastMessagesController < Admin::ApplicationController
before_action :finder, only: [:edit, :update, :destroy]
feature_category :navigation
+ urgency :low
# rubocop: disable CodeReuse/ActiveRecord
def index
diff --git a/app/controllers/groups/autocomplete_sources_controller.rb b/app/controllers/groups/autocomplete_sources_controller.rb
index a2eb475d360..171494e66bd 100644
--- a/app/controllers/groups/autocomplete_sources_controller.rb
+++ b/app/controllers/groups/autocomplete_sources_controller.rb
@@ -5,8 +5,7 @@ class Groups::AutocompleteSourcesController < Groups::ApplicationController
feature_category :team_planning, [:issues, :labels, :milestones, :commands]
feature_category :code_review, [:merge_requests]
- urgency :low, [:issues, :labels, :milestones, :commands]
- urgency :low, [:merge_requests]
+ urgency :low, [:issues, :labels, :milestones, :commands, :merge_requests, :members]
def members
render json: ::Groups::ParticipantsService.new(@group, current_user).execute(target)
diff --git a/app/controllers/groups/email_campaigns_controller.rb b/app/controllers/groups/email_campaigns_controller.rb
index 70c8a23d918..38087e3fc11 100644
--- a/app/controllers/groups/email_campaigns_controller.rb
+++ b/app/controllers/groups/email_campaigns_controller.rb
@@ -4,6 +4,7 @@ class Groups::EmailCampaignsController < Groups::ApplicationController
EMAIL_CAMPAIGNS_SCHEMA_URL = 'iglu:com.gitlab/email_campaigns/jsonschema/1-0-0'
feature_category :navigation
+ urgency :low
before_action :check_params
diff --git a/app/controllers/projects/usage_quotas_controller.rb b/app/controllers/projects/usage_quotas_controller.rb
index f45ee265432..07a3c010f4f 100644
--- a/app/controllers/projects/usage_quotas_controller.rb
+++ b/app/controllers/projects/usage_quotas_controller.rb
@@ -6,6 +6,7 @@ class Projects::UsageQuotasController < Projects::ApplicationController
layout "project_settings"
feature_category :utilization
+ urgency :low
def index
@hide_search_settings = true
diff --git a/app/controllers/pwa_controller.rb b/app/controllers/pwa_controller.rb
index 2345182a624..8de1b10e1f1 100644
--- a/app/controllers/pwa_controller.rb
+++ b/app/controllers/pwa_controller.rb
@@ -4,6 +4,7 @@ class PwaController < ApplicationController # rubocop:disable Gitlab/NamespacedC
layout 'errors'
feature_category :navigation
+ urgency :low
skip_before_action :authenticate_user!
diff --git a/app/controllers/users/callouts_controller.rb b/app/controllers/users/callouts_controller.rb
index fe308d9dd1e..f94ef9063c3 100644
--- a/app/controllers/users/callouts_controller.rb
+++ b/app/controllers/users/callouts_controller.rb
@@ -3,6 +3,7 @@
module Users
class CalloutsController < ApplicationController
feature_category :navigation
+ urgency :low
def create
if callout.persisted?
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 794d60e733d..37c4ffe2a5e 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -34,8 +34,8 @@ class UsersController < ApplicationController
feature_category :snippets, [:snippets]
# TODO: Set higher urgency after resolving https://gitlab.com/gitlab-org/gitlab/-/issues/357914
- urgency :low, [:show, :calendar_activities, :contributed, :activity, :projects, :groups]
- urgency :default, [:calendar, :followers, :following, :starred]
+ urgency :low, [:show, :calendar_activities, :contributed, :activity, :projects, :groups, :calendar]
+ urgency :default, [:followers, :following, :starred]
urgency :high, [:exists]
def show
diff --git a/app/controllers/whats_new_controller.rb b/app/controllers/whats_new_controller.rb
index 6f389aa4924..4decd7f1bee 100644
--- a/app/controllers/whats_new_controller.rb
+++ b/app/controllers/whats_new_controller.rb
@@ -9,6 +9,7 @@ class WhatsNewController < ApplicationController
before_action :check_valid_page_param, :set_pagination_headers
feature_category :navigation
+ urgency :low
def index
respond_to do |format|
diff --git a/app/models/namespace/root_storage_statistics.rb b/app/models/namespace/root_storage_statistics.rb
index 96715863892..6a0aa52393d 100644
--- a/app/models/namespace/root_storage_statistics.rb
+++ b/app/models/namespace/root_storage_statistics.rb
@@ -44,15 +44,28 @@ class Namespace::RootStorageStatistics < ApplicationRecord
def merged_attributes
attributes_from_project_statistics.merge!(
attributes_from_personal_snippets,
- attributes_from_namespace_statistics
+ attributes_from_namespace_statistics,
+ attributes_for_container_registry_size
) { |key, v1, v2| v1 + v2 }
end
+ def attributes_for_container_registry_size
+ return {} unless Feature.enabled?(:container_registry_namespace_statistics, namespace)
+
+ container_registry_size = namespace.container_repositories_size || 0
+
+ {
+ storage_size: container_registry_size,
+ container_registry_size: container_registry_size
+ }.with_indifferent_access
+ end
+
def attributes_from_project_statistics
from_project_statistics
- .take
- .attributes
- .slice(*STATISTICS_ATTRIBUTES)
+ .take
+ .attributes
+ .slice(*STATISTICS_ATTRIBUTES)
+ .with_indifferent_access
end
def from_project_statistics
@@ -74,7 +87,10 @@ class Namespace::RootStorageStatistics < ApplicationRecord
def attributes_from_personal_snippets
return {} unless namespace.user_namespace?
- from_personal_snippets.take.slice(SNIPPETS_SIZE_STAT_NAME)
+ from_personal_snippets
+ .take
+ .slice(SNIPPETS_SIZE_STAT_NAME)
+ .with_indifferent_access
end
def from_personal_snippets
@@ -102,7 +118,12 @@ class Namespace::RootStorageStatistics < ApplicationRecord
# guard clause.
return {} unless namespace.group_namespace?
- from_namespace_statistics.take.slice(*self.class.namespace_statistics_attributes)
+ from_namespace_statistics
+ .take
+ .slice(
+ *self.class.namespace_statistics_attributes
+ )
+ .with_indifferent_access
end
end