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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-16 09:07:12 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-16 09:07:12 +0300
commitb78b8c1103e1e9542891a1c333c8abcd4d7e10ab (patch)
treee6fd1cb9a6fbd4fcb6d9befb61a1773e5c8542c5 /app/graphql/types
parentfe0260eaa337339a131624a8b71d7a05a3664a18 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql/types')
-rw-r--r--app/graphql/types/alert_management/alert_type.rb10
-rw-r--r--app/graphql/types/group_type.rb11
2 files changed, 19 insertions, 2 deletions
diff --git a/app/graphql/types/alert_management/alert_type.rb b/app/graphql/types/alert_management/alert_type.rb
index a13453f9194..5784c7a4872 100644
--- a/app/graphql/types/alert_management/alert_type.rb
+++ b/app/graphql/types/alert_management/alert_type.rb
@@ -114,7 +114,9 @@ module Types
field :metrics_dashboard_url,
GraphQL::Types::String,
null: true,
- description: 'URL for metrics embed for the alert.'
+ description: 'URL for metrics embed for the alert.',
+ deprecated: { reason: 'Returns no data. Underlying feature was removed in 16.0',
+ milestone: '16.0' }
field :runbook,
GraphQL::Types::String,
@@ -145,6 +147,12 @@ module Types
def notes
object.ordered_notes
end
+
+ def metrics_dashboard_url
+ return if Feature.enabled?(:remove_monitor_metrics)
+
+ object.metrics_dashboard_url
+ end
end
end
end
diff --git a/app/graphql/types/group_type.rb b/app/graphql/types/group_type.rb
index d352d82a52e..da2c06d04b7 100644
--- a/app/graphql/types/group_type.rb
+++ b/app/graphql/types/group_type.rb
@@ -167,6 +167,11 @@ module Types
null: false,
description: 'Total size of the dependency proxy cached images.'
+ field :dependency_proxy_total_size_in_bytes,
+ GraphQL::Types::Int,
+ null: false,
+ description: 'Total size of the dependency proxy cached images in bytes.'
+
field :dependency_proxy_image_prefix,
GraphQL::Types::String,
null: false,
@@ -279,10 +284,14 @@ module Types
def dependency_proxy_total_size
ActiveSupport::NumberHelper.number_to_human_size(
- group.dependency_proxy_manifests.sum(:size) + group.dependency_proxy_blobs.sum(:size)
+ dependency_proxy_total_size_in_bytes
)
end
+ def dependency_proxy_total_size_in_bytes
+ group.dependency_proxy_manifests.sum(:size) + group.dependency_proxy_blobs.sum(:size)
+ end
+
def dependency_proxy_setting
group.dependency_proxy_setting || group.create_dependency_proxy_setting
end