summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-16 06:07:12 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-16 06:07:12 +0000
commitb78b8c1103e1e9542891a1c333c8abcd4d7e10ab (patch)
treee6fd1cb9a6fbd4fcb6d9befb61a1773e5c8542c5 /app
parentfe0260eaa337339a131624a8b71d7a05a3664a18 (diff)
downloadgitlab-ce-b78b8c1103e1e9542891a1c333c8abcd4d7e10ab.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/graphql_shared/fragments/alert_detail_item.fragment.graphql1
-rw-r--r--app/graphql/types/alert_management/alert_type.rb10
-rw-r--r--app/graphql/types/group_type.rb11
3 files changed, 19 insertions, 3 deletions
diff --git a/app/assets/javascripts/graphql_shared/fragments/alert_detail_item.fragment.graphql b/app/assets/javascripts/graphql_shared/fragments/alert_detail_item.fragment.graphql
index 794fe0a6151..a15889613f5 100644
--- a/app/assets/javascripts/graphql_shared/fragments/alert_detail_item.fragment.graphql
+++ b/app/assets/javascripts/graphql_shared/fragments/alert_detail_item.fragment.graphql
@@ -5,7 +5,6 @@ fragment AlertDetailItem on AlertManagementAlert {
...AlertListItem
createdAt
monitoringTool
- metricsDashboardUrl
service
description
updatedAt
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